This library provides an implementation of OPC/UA by porting the Fraunhofer open62541
for the Arduino Opta microPLC
family.
- Compile and upload
examples/opcua_server
arduino-cli compile --fqbn arduino:mbed_opta:opta -v examples/opcua_server -u -p /dev/ttyACM0
- Connect Arduino Opta Ethernet port with a DHCP-enabled router, switch, etc.
- Open a serial monitor
$ cat /dev/ttyACM0
[2024-06-21 02:30:19.000 (UTC+0000)] info/eventloop Starting the EventLoop
[2024-06-21 02:30:19.000 (UTC+0000)] warn/server AccessControl: Unconfigured AccessControl. Users have all permissions.
[2024-06-21 02:30:19.000 (UTC+0000)] info/server AccessControl: Anonymous login is enabled
[2024-06-21 02:30:19.000 (UTC+0000)] warn/server x509 Certificate Authentication configured, but no encrypting SecurityPolicy. This can leak credentials on the network.
[2024-06-21 02:30:19.000 (UTC+0000)] info/server Arduino Opta IP: 192.168.8.137
[2024-06-21 02:30:19.000 (UTC+0000)] info/server Arduino Opta Variant: Arduino Opta WiFi
[2024-06-21 02:30:19.000 (UTC+0000)] info/server stack: size = 16384 | free = 14936 | used = 1448 | max = 5124
[2024-06-21 02:30:19.000 (UTC+0000)] info/server o1heap: capacity: 261984 | allocated: 66784 | peak_allocated: 68896
[2024-06-21 02:30:19.000 (UTC+0000)] warn/server Maximum SecureChannels count not enough for the maximum Sessions count
[2024-06-21 02:30:19.000 (UTC+0000)] info/network TCP | Listening on all interfaces
[2024-06-21 02:30:19.000 (UTC+0000)] info/network TCP 604353888 | Creating listen socket for "127.0.0.1" (with local hostname "192.168.8.137") on port 4840
[2024-06-21 02:30:19.000 (UTC+0000)] info/server New DiscoveryUrl added: opc.tcp://192.168.8.137:4840
cd /tmp
git clone https://github.com/FreeOpcUa/opcua-client-gui && cd opcua-client-gui
python3 -m pip install --upgrade pyopenssl
python3 -m pip install --upgrade .
"target.macros_add": [
...
+ "MBED_HEAP_STATS_ENABLED=1",
+ "MBED_STACK_STATS_ENABLED=1",
+ "MBED_MEM_TRACING_ENABLED=1"
- Recompile
libmbed.a
cd ArduinoCore-mbed
./mbed-os-to-arduino -a -g OPTA:OPTA