@@ -2,6 +2,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/open62541:"
SRC_URI:append = " \
file://0001-examples-client-allow-configurable-server.patch \
+ file://0002-examples-pubsub-fix-missing-pthread.h-include-in-RT-.patch \
"
EXTRA_OECMAKE = "-DUA_BUILD_EXAMPLES=1"
@@ -6,18 +6,19 @@ Subject: [PATCH] examples: client: allow configurable server
* Enable a remote server URL to be provided as an argument.
* Default to localhost if no arguments are provided.
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/open62541/open62541/pull/8045]
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
+Signed-off-by: Thorsten Lannynd <t-lannynd@ti.com>
---
- examples/client.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
+ examples/client.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/examples/client.c b/examples/client.c
-index f04bed9..dfc56f5 100644
+index bc54d8504..42290dd0c 100644
--- a/examples/client.c
+++ b/examples/client.c
-@@ -29,13 +29,18 @@ nodeIter(UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, voi
+@@ -31,6 +31,11 @@ nodeIter(UA_NodeId childId, UA_Boolean isInverse,
}
int main(int argc, char *argv[]) {
@@ -29,27 +30,25 @@ index f04bed9..dfc56f5 100644
UA_Client *client = UA_Client_new();
UA_ClientConfig_setDefault(UA_Client_getConfig(client));
- /* Listing endpoints */
+@@ -38,7 +43,7 @@ int main(int argc, char *argv[]) {
UA_EndpointDescription* endpointArray = NULL;
size_t endpointArraySize = 0;
-- UA_StatusCode retval = UA_Client_getEndpoints(client, "opc.tcp://localhost:4840",
-+ UA_StatusCode retval = UA_Client_getEndpoints(client, ua_server,
- &endpointArraySize, &endpointArray);
+ UA_StatusCode retval =
+- UA_Client_getEndpoints(client, "opc.tcp://localhost:4840",
++ UA_Client_getEndpoints(client, "ua_server",
+ &endpointArraySize, &endpointArray);
if(retval != UA_STATUSCODE_GOOD) {
printf("Could not get the endpoints\n");
- UA_Array_delete(endpointArray, endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
-@@ -52,8 +57,8 @@ int main(int argc, char *argv[]) {
- UA_Array_delete(endpointArray,endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
-
- /* Connect to a server */
-- /* anonymous connect would be: retval = UA_Client_connect(client, "opc.tcp://localhost:4840"); */
-- retval = UA_Client_connect_username(client, "opc.tcp://localhost:4840", "user1", "password");
-+ /* anonymous connect would be: retval = UA_Client_connect(client, ua_server); */
-+ retval = UA_Client_connect_username(client, ua_server, "user1", "password");
+@@ -58,8 +63,8 @@ int main(int argc, char *argv[]) {
+ /* Create a client and connect */
+ client = UA_Client_new();
+ UA_ClientConfig_setDefault(UA_Client_getConfig(client));
+- /* Anonymous connect: UA_Client_connect(client, "opc.tcp://localhost:4840"); */
+- retval = UA_Client_connectUsername(client, "opc.tcp://localhost:4840",
++ /* Anonymous connect: UA_Client_connect(client, "ua_server"); */
++ retval = UA_Client_connectUsername(client, "ua_server",
+ "user1", "password");
if(retval != UA_STATUSCODE_GOOD) {
printf("Could not connect\n");
- UA_Client_delete(client);
- return EXIT_FAILURE;
--
-2.7.4
-
+2.34.1
new file mode 100644
@@ -0,0 +1,30 @@
+From 3c3fbc17c9d649d20ea5c86e5581b6a4409447f3 Mon Sep 17 00:00:00 2001
+From: Thorsten Lannynd <t-lannynd@ti.com>
+Date: Wed, 13 May 2026 14:54:39 -0500
+Subject: [PATCH] examples: pubsub: fix missing pthread.h include in RT
+ state machine example
+
+Include header file, to fix error of implicit declaration of
+pthread_create.
+
+Upstream-Status: Submitted [https://github.com/open62541/open62541/pull/8044]
+
+Signed-off-by: Thorsten Lannynd <t-lannynd@ti.com>
+---
+ .../pubsub_realtime/server_pubsub_subscribe_rt_state_machine.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/examples/pubsub_realtime/server_pubsub_subscribe_rt_state_machine.c b/examples/pubsub_realtime/server_pubsub_subscribe_rt_state_machine.c
+index 0fb4243ae..f41d718ec 100644
+--- a/examples/pubsub_realtime/server_pubsub_subscribe_rt_state_machine.c
++++ b/examples/pubsub_realtime/server_pubsub_subscribe_rt_state_machine.c
+@@ -19,6 +19,7 @@
+ #include <poll.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <pthread.h>
+
+ #define PUBSUB_CONFIG_FIELD_COUNT 10
+
+--
+2.34.1
similarity index 100%
rename from meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend
rename to meta-arago-extras/recipes-connectivity/open62541/open62541_1.5.4.bbappend
meta-openembedded bumped the version to 1.5.4 [1]. Add a new patch to fix a compile issue related to missing the pthread.h file in an include and port the example client patch. [1] https://git.openembedded.org/meta-openembedded/commit/?id=63130ebd0830923e7c6feee9fef7bca9f02d994c Signed-off-by: Thorsten Lannynd <t-lannynd@ti.com> --- .../open62541/open62541-arago.inc | 1 + ...les-client-allow-configurable-server.patch | 43 +++++++++---------- ...fix-missing-pthread.h-include-in-RT-.patch | 30 +++++++++++++ ...41_%.bbappend => open62541_1.5.4.bbappend} | 0 4 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 meta-arago-extras/recipes-connectivity/open62541/open62541/0002-examples-pubsub-fix-missing-pthread.h-include-in-RT-.patch rename meta-arago-extras/recipes-connectivity/open62541/{open62541_%.bbappend => open62541_1.5.4.bbappend} (100%)