C

This guide provides a walk-through of how to install the MQTT Client for C programming language.

Installing C MQTT Client

This documentation uses Paho MQTT as a client library Make sure that libssl-dev is installed:

sudo apt-get install libssl-dev

Clone the repository into your device:

git clone https://github.com/eclipse/paho.mqtt.c.git

Enter the downloaded folder and build:

cd paho.mqtt.c
make

or install the library:

sudo make install

Running the code

Compile your code as the following example:

gcc mqtt_test.c -o qubitro_publish -lpaho-mqtt3c

Run your code:

./qubitro_publish

Connect Device

Start connecting devices by following the guide :