Getting started with C SDK for Labeeb IoT Devices
The main purpose of this SDK is to provide the simplest way to connect your device to Labeeb IoT Platform.With this C SDK ,connecting to Labeeb will be simply functions calls.
What can be done with Labeeb IoT C SDK for devices
Using this SDK ,you will be able to communicate and publish data to LAbeeb IoT through MQTT protocol.
MQTT connectivity :
Connect to Labeeb IoT server.
Publish data to Labeeb IoT platform.
Close the MQTT connection.
Before you start using this SDK you need to install :
1) libssl :
For Linux , use the following command for Debian/Ubuntu :
2) MQTT paho C :
For more details, check: https://eclipse.org/paho/clients/c/
Hands on Using the SDK to push data to Labeeb through MQTT
In this tutorial, we will take the most common case in IoT devices, which is sending data to Labeeb IoT,to do that , follow the steps :
SDK files :
Extract the compressed file , you will find a folder called CSDK,open the C code file (labeeb.c).
Publish the data to a specific topic :
Use the topic of the device , data model name to publish data :
Compile the C code with a linked library :
Run the code :