Search code examples
ceclipseazure-iot-hubazure-iot-sdkarduino-esp8266

Use Azure IoT Plugin for C within Eclipse


Very new to C, Eclipse, and basically everything else I am trying to work with in this project. I have an Arduino Feather HUZZAH (ESP8266). I have flashed the firmware with the esp_iot_sdk and installed Eclipse on to machine through the unofficial Espressif Dev Kit in order to write the code for the board.

The code I wrote is working well but now I need to find a way to send the collected data to Azure's IoT Hub. I found this plugin for talking to the Azure IoT Hub but cannot figure out how in the world to get it installed using Eclipse.

Even if someone could show me how to get a simple POST request going in C, using a library or not, that would be awesome! Thanks for your help.


Solution

  • So you want to run azure-iot-sdk on ESP8266 with Tensilica Xtensa LX106 MCU.

    The first thing you need to do is to port azure-iot-sdk C library to Xtensa platform, using the Espressif Dev Kit toolchain.

    Normally, this is officially done by Microsoft. Unfortunately, Xtensa LX106 might not be on the list(roadmap?) yet.

    So I think you can do some porting work yourself, following some tutorials from Microsoft. This link works for Linux host, but given that fact that Xtensa toolchain only supports windows for now, you might end up writing some cmd, bat or generic makefile/cmake file, in which you need to have the cross-compile toolchain(aka xtensa-lx106-elf-gcc) specified.

    Hopefully, it's not complicated or cumbersome.

    After you have done with this, you need some static or dynamic library assembly depending on your settings, the next step is to specify the library path in your eclipse project, and don't forget to include the azure-iot-sdk header folder to your project, as the snapshot shows.

    You should be good to go after the above steps.

    enter image description here