IoTivity is an open source software framework enabling seamless device-to-device connectivity to address the emerging needs of the Internet of Things,for more details, click https://www.iotivity.org
The demo is the detailed implement of IoTivity based on IoTivity-constrained. User can run different features on ESP32 via
- support IPv4 OIC server
- support IPv4 OIC client
- support IPv6 OIC server
- support IPv6 OIC client
- support RGB light control
- support interact with other IoTvity device
The ESP32 Board control RGB light by the following configuration.
|ESP32 GPIO||RGB light|
user can change GPIO in
lightbulb.c if needed.
Compiling and flashing the project
Compiling the esp32-iotivity is the same as compiling any other project based on the ESP-IDF:
- You can clone the total project into an empty directory by using command:
git clone https://github.com/espressif/esp32-iotivity.git cd esp32-iotivity git submodule update --init --recursive
- make sure that you had cloned all the submodules. The esp32-iotivity project has the
iotivity-constrainedas the submodule.
Set the latest default configuration by
make menuconfigto config your serial port, WiFi ssid and password, IPv4 or IPv6, iotivity server or iotivity client, enable light control or disable light control, and enable or disable debug log.
- make sure that your router can support IPv4 multicast and IPv6 multicast.
choose two ESP32 board, one as iotivity server, the other as iotivity client, server board connect to the RGB light by
make SERVER=1 flash monitorto compile & flashing & running the server.
reconfigure client environment by
make clean && make defconfig && make menuconfig.
make CLIENT=1 flash monitorto compile & flashing & running the client.
More details are in the esp-idf README.