Skip to content
SeventhSERGIO edited this page Jun 28, 2018 · 31 revisions

Repository

git clone https://github.com/SeventhSERGIO/intel_edison.git

MQTT

Updating the MQTT* C client library on the Intel® Edison board

opkg install coreutils

opkg remove paho-mqtt-dev

opkg remove paho-mqtt --force-depends

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

cd paho.mqtt.c

export prefix=/usr; make install

Compile a mqtt program

Subscribe

gcc -L/home/root/paho.mqtt.c/build/output mqtt_asynchronous_sub.c -lpaho-mqtt3c -o mqtt_asynchronous_sub

Publish

gcc -L/home/root/paho.mqtt.c/build/output mqtt_asynchronous_pub.c -lpaho-mqtt3c -o mqtt_asynchronous_pub

The Python client can be downloaded and installed from PyPI using the pip tool:

pip install paho-mqtt

Clone this wiki locally