Porting OPC-UA Pub/Sub to nRF52840 Microcontroller


Portation of the OPC UA Stack


OPC UA, ANSI C, nRF52840


The overall topic is connectivity, both wired and wireless, between a device with constrained resources and a regular computer. The primary goal is to port the OPC UA stack reference implementation on a Nordic Semiconductor device. It is of interest whether it can be done and what the trade offs are and footprint is. Many proof of concepts will gradually try to build towards a working solution. If successful it could fulfil the promise of the OPC Foundation that the devices will indeed become unified. Ultimately it might be possible to decide whether it is feasible to run OPC UA on a constrained device and what the limitations are. This report will by no means be a guide to what should be done or what good practices are with the new technology, because it is a standard still being developed. We are waiting to see fully operational or commercial implementations having all features included from the specification.

Initial Position

There are already two implementations for OPC UA. One is only a reference implementation of the OPC UA and serves as a guide how it could be done. It is provided by the OPC Foundation. The other is an open source attempt to implement the OPC UA specifcation and is not the focus of this project. Both SDKs have in common that they mostly provide code for Computers based on Linux or Windows. The leading questions were whether it could be ported onto an embedded device running OpenWSN, does the new SDK part Publisher/Subscribe already work and what is the impact on the platform.


The framework has been successfully been ported. Although it comes with some limitations, as the constrained platform lacks crucial things like multicasting. It was still early for both the platform operating system and the OPC UA to be used in a productive environment. With the learnings it is possible to further pursue the OPC UA technology and implement a forked version better suited for an embedded environment.

Project facts

Project duration: 1 Semester
Man hours invested: 180h
Team size: 1 Student


Institute of Mobile and Distributed Systems | FHNW

Project team

Florjancic Andreas


Weck Wolfgang (wolfgang.weck@fhnw.ch)
Amberg Thomas (thomas.amberg@fhnw.ch)

<< zurück