---
title: "WIZnet Pico OPC UA Server"
url: "https://maker.wiznet.io/TheoIm/projects/wiznet-opc-ua-server/"
markdown_url: "https://maker.wiznet.io/TheoIm/projects/wiznet-opc-ua-server/md"
type: "WCC: WIZnet Created Content"
author: "theo"
author_url: "https://maker.wiznet.io/TheoIm/"
original_author: "Theo"
published: "2026-12-01"
language: "en"
hardware: ["WIZnet W55RP20-EVB-Pico", "WIZnet W6300-EVB-Pico2"]
likes: 0
views: 10
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# WIZnet Pico OPC UA Server

> An embedded OPC UA server that exposes UART sensor data directly to SCADA systems over Ethernet, without an external gateway or PC.

Original author: Theo

## Components

- **WIZnet W55RP20-EVB-Pico** x 1 ([docs](https://wiznet.io/products/powered-by-raspberry-pi/w55rp20-evb-pico))
- **WIZnet W6300-EVB-Pico2** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W6300/w6300-evb-pico2))

## Article

## Overview

A sensor or an old machine prints numbers on a UART. Your SCADA only speaks OPC UA. This firmware turns a WIZnet Pico board into the OPC UA server that sits between them.

Send the board one line, and the three numbers appear as OPC UA variables `Channel_1` to `Channel_3`. Any OPC UA client can browse them, read them and subscribe to them. There is no PC or gateway box in between.

```
sensor / PLC / MCU --UART--> WIZnet Pico board --Ethernet--> OPC UA client
                             (OPC UA server)    opc.tcp://192.168.11.2:4840
```

![](https://maker.wiznet.io/upload/ckeditor5/46990ca673574f1c9003aa312979bef5.png)

| Item | Value |
| --- | --- |
| OPC UA endpoint | `opc.tcp://192.168.11.2:4840` |
| Board IP | `192.168.11.2` (fixed, no DHCP) |
| UART input | UART0, GP0 = TX, GP1 = RX, 115200 bps, 8N1 |
| Data line | `$DATA:<ch1>,<ch2>,<ch3>` followed by CR or LF |
| Clients at once | 4 |

The WIZnet chip handles TCP/IP in hardware. The MCU does not run a software network stack. It only passes data to the chip's sockets.

---

## How It Compares

We looked for other OPC UA servers that run on a microcontroller and compared what each one has published. Names are withheld.

|  | Encryption | Clients at once | Longest published test | Where the numbers come from |
| --- | --- | --- | --- | --- |
| **This project** | Basic256Sha256 (RP2350 board) | 4 | 24 hours, 0 reboots | Measured, raw results in the repository |
| Open-source server A (same MCU family, software TCP/IP, 8 MB external RAM) | Basic256Sha256 | 1 tested with encryption (4 configured) | About 10 minutes | Measured by its author |
| Research implementation B (Cortex-M7 class) | Not stated | Up to 5 | Not stated | Conference paper |
| Commercial module C | Basic256Sha256 | 2 (documented limit) | Not published | Product manual |

> **Note:** The test conditions differ, so this table is not a speed ranking. It shows what each source has tested and published. Based on public documents as of 2026-12-01.

---

## Required Hardware and Software

### Hardware

- W55RP20-EVB-Pico or W6300-EVB-Pico2

- USB cable and Ethernet cable

- USB-to-TTL adapter, 3.3 V (optional, it stands in for a sensor)

Choose the board by the security policy you need:

| MCU | Board | Policy |
| --- | --- | --- |
| RP2350 | W6300-EVB-Pico2 | Basic256Sha256 (encrypted) |
| RP2040 | W55RP20-EVB-Pico | None |

> **Note:** An encrypted OPC UA connection starts with an RSA-2048 handshake. It takes 1.2 s on the RP2350 and 5.1 s on the RP2040, which is where many clients time out. Use RP2040 boards with the None policy on a network you control.

### Software

- UaExpert, the free OPC UA client from Unified Automation

- A serial terminal such as Tera Term

---

## How to Run the OPC UA Node

### Step 1: Flash the firmware

1. Download the `.uf2` file for your board from the [v1.0.1 release](https://github.com/theoim/WIZnet_OPCUA_Node/releases/tag/v1.0.1).

2. Hold **BOOTSEL** and plug in the USB cable. A drive appears.

3. Copy the `.uf2` file to the drive. The board restarts.

4. Open the board's COM port in the terminal and type `OPCUA`.

```
[OPC UA] state=RUNNING network=on endpoint=opc.tcp://192.168.11.2:4840 channels=3
```

> **Note:** The board does not echo what you type. In Tera Term, set Transmit to `CR+LF` and turn on Local echo.

### Step 2: Set the PC address

1. Connect the board to the PC with the Ethernet cable.

2. Set the PC's Ethernet adapter to `192.168.11.100`, subnet mask `255.255.255.0`.

3. Run `ping 192.168.11.2` and check that the board answers.

### Step 3: Connect with UaExpert

1. Select **Server > Add**.

2. Under **Custom Discovery**, double-click the add-server line and enter `opc.tcp://192.168.11.2:4840`.

3. Expand **WIZnet OPC UA Node**, select **None - None (uatcp-uasc-uabinary)**, click **OK** and connect.

![](https://maker.wiznet.io/upload/ckeditor5/6cb56508ae224f139f5317cdba77c48e.png)

The address space looks like this:

```
Objects
└── WIZnet-OPCUA-Node
    ├── Device        FwVersion, IPAddress, Uptime_s, FreeHeap, LinkStatus, ...
    └── Channels
        ├── Channel_1
        ├── Channel_2
        └── Channel_3
```

### Step 4: Send a value and watch it change

1. Drag `Channel_1` to `Channel_3` into the **Data Access View**.

2. Type this line in the terminal:

```
$DATA:23.50,101.32,65.20
```

The board answers `[DATA] ok ch1=23.500 ch2=101.320 ch3=65.200` and UaExpert shows the new values.

![](https://maker.wiznet.io/upload/ckeditor5/ceb30de1d0ec4cb8987856bca9b5825a.png)

---

## How to Connect a Real Sensor

Any device with a UART can feed the node. It only has to print one line.

| Item | Value |
| --- | --- |
| Port | UART0, GP0 = TX, GP1 = RX (3.3 V logic) |
| Format | 115200 bps, 8N1, no flow control |
| Line | `$DATA:<ch1>,<ch2>,<ch3>` followed by CR or LF |

1. Connect the sender's TX to **GP1** and its RX to **GP0**.

2. Connect the grounds together.

3. Send the `$DATA:` line at the rate you need.

[ IMAGE: photo/small/OPC_UA_W55RP20_TTL_connection.jpg ]

An Arduino sketch that sends three analog readings once a second:

```
void setup() { Serial1.begin(115200); }

void loop() {
  float level    = analogRead(A0) * 100.0 / 1023;  // tank level, %
  float pressure = analogRead(A1) * 10.0 / 1023;   // line pressure, bar
  float flow     = analogRead(A2) * 50.0 / 1023;   // flow, L/min
  Serial1.print("$DATA:");
  Serial1.print(level, 2);    Serial1.print(',');
  Serial1.print(pressure, 2); Serial1.print(',');
  Serial1.println(flow, 2);   // println ends the line with CR+LF
  delay(1000);
}
```

> **Note:** Use a 3.3 V sender, or put a level shifter on a 5 V sender's TX line.

---

## Testing

| Test | Board | Result |
| --- | --- | --- |
| 24 hours: two clients (one encrypted), 10 UART lines per second, cable down for 20 s every 2 hours | W6300-EVB-Pico2 | 0 reboots, 864,002 / 864,002 lines, 0 unexpected client losses, 12 / 12 link recoveries |
| Read response time (None) | W55RP20-EVB-Pico | p50 1.9 ms, p99 3 to 5 ms |
| 100 monitored items (None) | W55RP20-EVB-Pico | 1,000 notifications per second, all received |
| Capacity | W6300-EVB-Pico2 | 4 clients x 100 monitored items |
| Opening one encrypted channel | W6300-EVB-Pico2 | 1,233 ms |
| 9,000 connect and disconnect cycles | W6300-EVB-Pico2 | 0 resets |

Free heap fell by 5,764 bytes over the 24 hours. A follow-up test showed that this is a bounded resend queue and not a leak: the drop stopped after the queue filled.

Conditions, tools and raw numbers are in the [test results](https://github.com/theoim/WIZnet_OPCUA_Node/blob/main/docs/test-results.md).

---

## Troubleshooting

### UaExpert does not find the server

Run `ping 192.168.11.2` from the PC. No answer means the PC is not on the `192.168.11.x` network or the cable is not connected. Type `NET` in the terminal and check that the link is up.

### A fifth client cannot connect

The board accepts 4 clients at once, one per hardware socket. UaExpert counts as one. Close the clients you are not using. A client that disappeared without closing its session frees its place within about 35 s.

### Channel values read Bad_WaitingForInitialData

No value has arrived since the board started. Send a `$DATA:` line. The node reports "no data yet" instead of a 0 that a SCADA could log as a real value.

### UART values do not arrive

Type `UART` in the terminal. A rising error count means the board receives lines it cannot read. Check that the sender uses 115200 bps, 8N1, and that each line starts with `$DATA:` and ends with CR or LF.

### An encrypted connect is refused with Bad_TcpServerTooBusy

Encrypted connections are set up one at a time. When several arrive together, the server refuses a late one at once instead of letting it time out. Connect again after a moment, and start clients a few seconds apart.

---

## Before You Deploy

- **Anonymous access only.** User name and password login is not implemented, and the server accepts any client certificate. Keep the node on a network you control.

- **Security builds embed a test key.** Generate your own certificate for each installation. See [Build and security](https://github.com/theoim/WIZnet_OPCUA_Node/blob/main/docs/build-and-security.md).

- **Opening an encrypted connection pauses the server for about 1.2 s.** Other clients' reads wait and their connections stay up. Give clients a timeout of 5 s or more.

- **Reduced OPC UA feature set.** Reading values and subscriptions are supported. PubSub, history, events and alarms are not.

- **Tested with UaExpert and the Python **`**asyncua**`** library only.** Test with your own SCADA or PLC client before you rely on it.

- **Not certified.** The server has not been through the OPC Foundation Compliance Test Tool. Treat it as a reference design.

---

## Extending

- Source code and documents: <https://github.com/theoim/WIZnet_OPCUA_Node>

- Encrypted firmware, another IP address or another board: [Build and security](https://github.com/theoim/WIZnet_OPCUA_Node/blob/main/docs/build-and-security.md)

- Node list, diagnostics and status codes: [Reference](https://github.com/theoim/WIZnet_OPCUA_Node/blob/main/docs/reference.md)

- A wired HTTPS camera on the same board family: <https://github.com/theoim/WIZnet_ArduCAM_Stream>

Project code is Apache-2.0. open62541 is MPL-2.0, Mbed TLS is Apache-2.0, the Raspberry Pi Pico SDK is BSD-3-Clause and the WIZnet ioLibrary is MIT.

---

Source: https://maker.wiznet.io/TheoIm/projects/wiznet-opc-ua-server/
