Skip to content
 
 

Repository files navigation

OPC UA Server on ESP32

Build Status

It is aimed to run OPC UA server on ESP32 board (xtensa toolchain). The information model is handled under models.c/h file. It contains a temperature sensor(DHT22) read port 4, a callback method to call ESP32-WROOM on board LED and 2 relays, which can be controlled as OPCUA objects.

On Board LED : GPIO 2
DHT22 Sensor : GPIO 4
RELAY 0      : GPIO 32
RELAY 1      : GPIO 33

It is tested by UAExpert and also Matrikon Mobile IOS OPC UA Client. So if you face any problems with other clients please let me know.

Prerequisites

Getting Started

It is required to have locally configured ESP-IDF (https://github.com/espressif/esp-idf).

git clone --recursive https://github.com/espressif/esp-idf.git <your-esp-idf-root-path>
export IDF_PATH=<your-esp-idf-root-path>
export PATH=$PATH:<xtensa-toolchain-path>
cd <your-esp-idf-root-path>/examples/
git clone https://github.com/cmbahadir opcua-esp32
cd opcua-esp32
idf.py build

Open62541 stack functionaliy is provided by open62541.c and open62541.h files. If you want to dive into OPC UA part, it is advised to check Open62541 project.

Also, if you want to build open62541.c/.h/.lib from source, note the changes on https://github.com/cmbahadir/opcua-esp32/blob/master/components/open62541lib/README.md in order to be xtensa-toolchain compatible.

  • I haven't analyzed the required modifications on open62541.c/.h files, these are just a result of trial and error process, so an explanatory contribution would be great. :)

License

This project is licensed under the Mozilla Public License Version 2.0 which is inherited from Open62541 project - see the LICENSE.md file for details.

About

Embedded OPC UA Server on ESP32 based on open62541 project

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages