It is currently September 19th, 2017, 6:57 pm Advanced search

Installing a MQTT Broker on your XIOS XS

Everything related to running TOFU for Linux on XIOS XS

Installing a MQTT Broker on your XIOS XS

Postby snappy46 » September 7th, 2017, 5:58 pm

For those interested I compiled mosquitto MQTT broker for the Pivos Xios XS so that I wouldn't have to run a computer 24/7 to serve my Internet Of Things (IOT) devices that uses MQTT protocol for communication. I build various sensor/control devices using the ESP8266 module which can be control remotely using the MQTT protocol. This is very much for the programmer/electronic hobbiest so I am not sure how much use it's going to be for anyone else but it never hurt to post it. I also build a custom Android app to send/receive commmand to/from the devices through the MQTT broker. A quick google search of MQTT(broker, client), Mosquitto and ESP8266(arduino) IOT should help those interested in experimenting with this concept.

Anyhow here it is:

******* Warning *******

** Although this is a simple fairly straight and safe process you attempt at your own risk **

*** Please read through the whole process before you try this to make sure you understand all the steps.***

1) First you'll need to download the following files :



2) Copy those 2 files to your xios using whatever method you have available. I recommend to copy them on the pivos xios /root directory to make sure the executable can be run. Using ssh to log into the Pivos use the following command:

Code: Select all
# cd /root
# cp [location_of_file]/mosquitto .
# chmod 755 mosquitto

# cp [location_of_file]/mosquitto.conf .

3) Now you should be able to run the program using the following command:

Code: Select all
/root/mosquitto -c /root/mosquitto.conf

*** Please note that root is the only user available on the Pivos xios therefore you must run this program as root. A warning from the program will tell you that you should not do that but no other option is available.***

4) Mosquitto is now running and the terminal screen can be closed. Mosquitto should keep running.

5) If you wish to kill mosquitto without rebooting you Pivos you can always use ssh to log into the pivos xios and issue the killall command to stop the MQTT Broker:

Code: Select all
killall mosquitto

That's all folks!!! One more use for your beloved Pivos Xios. It should be noted that unless you have hundreds of devices connected to the MQTT broker very little processing power is required to run the MQTT broker. It is a very light service.
Posts: 58
Joined: March 27th, 2013, 9:20 am

Re: Installing a MQTT Broker on your XIOS XS

Postby aasoror » September 17th, 2017, 9:19 am

Thanks for sharing snappy :)
User avatar
Pivos Employee
Posts: 14213
Joined: September 26th, 2011, 5:18 pm

Return to TOFULinux on XIOS XS

Who is online

Users browsing this forum: No registered users and 0 guests