TB-3239 · REV C · Technical newsheet

Device profile

WIZnet board becomes an OPC UA server for 5 dollars of UART hardware

WIZnet OPC UA Node v1.0.1 runs an OPC UA server on a WIZnet Pico board, turning UART sensor lines into subscribable SCADA variables. Measured RSA-2048 handshake: 1.2 s on RP2350, 5.1 s on RP2040.

By Nathan Brooks5 min read962 words

Features

  • Firmware v1.0.1 exposes three float channels as OPC UA variables from a single UART line at opc.tcp://192.168.11.2:4840
  • RSA-2048 handshake measured at 1.2 s on RP2350 at 150 MHz versus 5.1 s on RP2040 at 200 MHz
  • Socket bug fix cut connection failures from 4 in 8,400 connects to 0 in 9,000 (ioLibrary issue #127)
  • Server supports up to 4 simultaneous clients, limited by 4 hardware TCP sockets
  • Unencrypted, uncertified reference design tested only with UaExpert and asyncua clients
WIZnet OPC UA Node: Put Any UART Value on Your SCADA
Device photoWIZnet OPC UA Node: Put Any UART Value on Your SCADA — geralt / pixabay

A firmware release called WIZnet OPC UA Node v1.0.1 turns a WIZnet Pico-class board into a standalone OPC UA server, so any device that can print numbers over UART can feed a SCADA or HMI directly over Ethernet — with no gateway PC and no custom middleware. Send the board one line, $DATA:23.50,101.32,65.20, and three floating-point values appear as OPC UA variables named Channel_1 through Channel_3, browsable, readable and subscribable at opc.tcp://192.168.11.2:4840.

The design targets machine retrofits, pump and water monitoring, HVAC, energy metering, greenhouses and test benches — anywhere a sensor, PLC or old machine has a serial output but no network port. The channels are plain floats and carry no semantics; the meaning is left to the integrator. On the sender side, any UART and one printf suffice: Arduino, STM32, a sensor module or a PLC serial port all work. The default line rate in the worked examples is 115200 baud, with the sender's TX wired to GP1, RX to GP0, and shared ground.

Why the TCP/IP chip changes the architecture

The WIZnet chip — the W6300, or the W5500 inside the W55RP20 — handles TCP/IP in hardware. The microcontroller runs no software network stack at all; it hands data to the chip's sockets. The developers measured what that buys: on the W6300-EVB-Pico2, an encrypted connection keeps the CPU busy with cryptography math for about 1.2 seconds, yet replies on other connections still go out in under a millisecond and no client gets disconnected. With a software stack, the network would have frozen along with the CPU.

Why RP2040 boards stay on unencrypted OPC UA

Encryption proved to be the dividing line between the two supported processors. An encrypted OPC UA connection starts with RSA-2048, and with the same Mbed TLS build the numbers diverge sharply:

  • RP2350 at 150 MHz: 1.2 s handshake
  • RP2040 at 200 MHz: 5.1 s — four times slower despite the higher clock

RSA is essentially repeated big-number multiplication. The RP2350 can execute a 32-bit × 32-bit multiply in one instruction; the RP2040 cannot, and splits the same work into many small steps. Five seconds sits right where many OPC UA clients time out. The recommendation follows from the measurement: the prebuilt None image ships without encryption or signing and belongs on a controlled network; encrypted firmware is documented separately.

What the stress test found

The team ran long-duration and high-volume tests before publishing. Two defects surfaced:

  • Free memory dropped 5.7 KB over 24 hours. The suspected leak was not one: replies sent while the Ethernet cable was unplugged are never confirmed, so the server retains them for resend. That queue is capped at 16 per client, and once it filled, memory stabilized.
  • Roughly 1 connection in 2,000 was rejected immediately. The cause was the stock WIZnet ioLibrary listen() function, which panics and closes the socket if a client arrives at the exact moment the socket is returning to the ready state (ioLibrary issue #127). Version 1.0.1 ships its own implementation: 4 failures in 8,400 connects before the fix, 0 in 9,000 after.

Full conditions, tools and raw numbers are published in the project's test results.

How deployment works

Flashing takes a .uf2 file from the Releases page, dropped onto the board's BOOTSEL-mounted USB drive. A console command, OPCUA:, confirms the running state. The board holds a fixed address of 192.168.11.2 with no DHCP; the host PC takes a static address such as 192.168.11.100/24, and a ping must answer before configuration continues. In UaExpert, the client used for the published walkthrough, the endpoint is added under Custom Discovery and the security policy selected is None - None (uatcp-uasc-uabinary).

The address space exposes Device diagnostics — FwVersion, IPAddress, Uptime_s, FreeHeap, LinkStatus — alongside the three channels. Until data arrives, the channels return the status code Bad_WaitingForInitialData rather than a default zero, a deliberate choice to keep a SCADA from logging fabricated values. A sample Arduino sketch reads three analog inputs as tank level in percent, line pressure in bar and flow in liters per minute, and prints one $DATA: line per second. The board requires a 3.3 V sender or a level shifter on a 5 V board's TX line; a climbing error count after typing UART on the console indicates a baud-rate or line-format mismatch.

What the server does not do

The developers publish the limits plainly:

  • Anonymous access only; the server accepts any client certificate, so it belongs on a controlled network
  • A slimmed-down server: reads and subscriptions work; history, alarms, events and PubSub do not exist
  • Interoperability verified only with UaExpert and asyncua; the developers ask users to test their own SCADA or PLC client first
  • Not certified — it has not run the OPC Foundation's official test tool and is positioned as a reference design, not a finished product
  • A maximum of 4 simultaneous clients, limited by the 4 hardware sockets; the session table could hold 8, but the sockets run out first
  • Encrypted connections are established one at a time, about 1.2 s each; simultaneous encrypted clients may receive Bad_TcpServerTooBusy and must retry

A companion project, WIZnet ArduCAM Stream, puts an HTTPS camera with login on the same board family, on the reasoning that numbers say what happened while a picture says why.

The open question for plant integrators is whether a three-channel, unsigned, unencrypted OPC UA endpoint with no certification is acceptable on their networks — or whether the RP2350's 1.2-second encrypted handshake is the configuration that will actually clear industrial review.

via hackster.io (Source)

Filed under

  • opc-ua
  • wiznet
  • embedded
  • scada
  • industrial-networking
Share this article:

More from Nathan Brooks

Nathan Brooks

Show full bio

Staff writer covering people, launches and day-to-day practice in Instruments, test and measurement at Testbench Report.

105 articles

Application notes

« Previous articleNext article »