IoTivity-Lite is a lightweight implementation of the Open Connectivity Foundation (OCF) standards for the Internet of Things (IoT).
Hardware Components
Arduino AVR
X 1
Arduino ARM
X 1
X 1

Architecture (1).png

Porting iotivity constrained to arduino

The port target the arduino AVR(Mega2560)and ARM architectures, mostly arduino SAMD(arduino MKRZERO, though andy SAMD board should work) as well as the arduino Due. Though most feature should be supported on SAMD boards, use the arduino Due for more stable deployment of secuirty features. The ipadapter for network requirement is based around the Wiznet w5500 shield, dependant arduino C++ libraries were adapted by providing C wrappers. an SD card is used to provide pesistant storage for security build.this is made available via the C adapter libarduino-sdfat

Preparing Arduino Cores and Tools

I updated socket.cpp based on the mainline iotivity_1_2(arduino adapter) comment regarding the fix required on the socket.cpp code for the udp receive method the patch is arduino_socket.patch. apply this patch to your socket.cpp file.

The iotivity constrained logging system is not directly compatible with arduino at it is. More, it needs to handle different architecture. a library is provided for this as libarduino-serial. Still one need to patch the oc_log.h to declare the the different logging methods.

The arduino Time library target C++ code, though adding attribute like extern C or _cplusplus, it uses method overloading that is not acceptable from C perspective. i provide a basic tweak to make it usable. one can write a C++ class around it a provide a cleaner C wrapper or just make it plain C.

Build tools

Note: Arduino sdk depends on the building platform thus one will need to define the path to arduino-home(arduino core, libraries… path) in the manually. For ARM board(SAM/SAMD), intall toolchain and cores via the Arduino IDE(see picture): arm_tools_cores.PNG



Please Login to comment
Notify of