2024-04-21 11:55 PM
Dear community,
I'm currently having a problem setting up an OPCUA client. Using the open62541 package, I was able to connect to an OPCUA server created in Node-Red. I was able to both read and write to the server's addresses. The connection was made synchronously (ua_client_connect).
However, when I used another computer, the connection to the Node-Red server is made asynchronously (the ua_client_connect function doesn't work, but the ua_client_connect_async function does). Unfortunately, I'm not able to do either reading or writing because the read and write functions are not identical to those of the synchronous connection.
Therefore, do you have an example of an OPCUA client using the open62541 library that allows asynchronous reading and writing?
I've already used the following link (https://github.com/open62541/open62541/blob/master/examples/client_async.c) but the problem is that the UA_SessionState is not equal to UA_SESSIONSTATE_ACTIVATED.
Board used : B-U585I-IOT02A
Thanks for your response,
Sincerely,
Nicolas Gnanalingam
2024-04-30 07:12 AM
Hello @Nicolas_G ,
Your question looks to concern more the Open62541 API than ST product or ecosystem, as your issue seems to be at very high userland level. I advise you to try to get support from their public GitHub, as we do not have the expertise on this OPC UA library.
Kind regards,
Erwan.