OPC-UA working with WiFi but not with ETH

black.m
Posts: 1
Joined: Mon May 08, 2023 9:31 am

OPC-UA working with WiFi but not with ETH

Postby black.m » Mon Jan 26, 2026 9:45 am

Hello,

I am currently trying to get OPC UA (open62541) running on my ESP32-WROVER.

At the moment, everything works fine when using WiFi. However, as soon as I switch from WiFi to Ethernet, I can no longer reliably connect to the OPC UA server. Sometimes it works, but most of the time I only see that a client is trying to connect, while the connection itself never succeeds.

Code: Select all

[2026-01-26 09:42:05.708 (UTC+0000)] info/userland     20 Variablen erfolgreich erstellt
[2026-01-26 09:42:05.715 (UTC+0000)] info/network       TCP network layer listening on opc.tcp://10.16.200.9:4840/
Time synchronization event received
[2026-01-26 10:42:10.901 (UTC+0100)] info/network       Connection 57 | New connection over TCP
[2026-01-26 10:42:10.927 (UTC+0100)] info/channel       Connection 57 | SecureChannel 1 | SecureChannel opened with SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#None and a revised lifetime of 300.00s
[2026-01-26 10:42:11.199 (UTC+0100)] info/channel       Connection 57 | SecureChannel 1 | CloseSecureChannel
[2026-01-26 10:42:11.212 (UTC+0100)] info/network       Connection 57 | Closed
[2026-01-26 10:42:11.234 (UTC+0100)] info/network       Connection 57 | New connection over TCP
[2026-01-26 10:42:11.259 (UTC+0100)] info/channel       Connection 57 | SecureChannel 2 | SecureChannel opened with SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#None and a revised lifetime of 600.00s
With WiFi I use:

Code: Select all

UA_UInt16 waitMs = UA_Server_run_iterate(serverOPC, false);
When using Ethernet, I tried setting the parameter to true. In that case, the connection is established slightly more often, but it still fails in about 4 out of 5 attempts.

The funny thing is that sometimes it works perfectly with Ethernet, but as soon as I restart the ESP, it stops working again.
To me, this looks like a timing issue, but I honestly have no idea where to start debugging.

robin2906
Posts: 13
Joined: Tue May 06, 2025 4:50 pm

Re: OPC-UA working with WiFi but not with ETH

Postby robin2906 » Tue Mar 10, 2026 1:27 pm

Hi @black.m ,

What version of open62541 are you using ? 1.5 ?

Best regards,

Who is online

Users browsing this forum: Amazon [Bot], Baidu [Spider], Google [Bot] and 4 guests