Rob "drtorq" Reilly Demos Low-Power, Low-Bandwidth MQTT Messaging Protocol on the BeagleBone Black

Needing to replace a sadly-defunct CHIP single-board computer, Reilly showcases Mosquitto running on the BeagleBone Black.

Rob "drtorq" Reilly continues his regular Off-The-Shelf Hacker series for The New Stack with a look at getting the Mosquitto MQTT broker up an -running on the BeagleBone Black single-board computer — replacing an earlier build based on the sadly-defunct NextThingCo CHIP.

The BeagleBone Black makes a great low-power MQTT broker. (📷: Gareth Halfacree)

The MQ Telemetry Transport protocol, originally designed by Andy Stanford-Clark and Arlen Nipper in 1999 as a means to monitor an oil pipeline over a TCP/IP network, operates with a message broker and one or more client devices. MQTT clients send status messages to the broker, which processes the message and forwards it to its final destination in a bandwidth-efficient manner. The low computational requirements of MQTT have made it popular for monitoring sensor networks based on low-power microcontrollers, though the message broker needs a little more grunt - such as that provided by a low-cost single-board computer.

"We explored using a CHIP single board computer to run the Mosquitto MQTT broker, back in 2017. While the gadget worked fine, it got pushed to the back of the desk due to other projects," writes Reilly by way of introduction. "Sad to say, the CHIP-based broker gave up the ghost about six months ago. The board no longer boots and the vendor has also since gone out of business.

"What to do with a few new MQTT projects on the horizon? The old BeagleBone Black in the parts bin should make a fine MQTT broker. This week’s instalment covers the essentials of running the Mosquitto broker on the 'Bone.'"

Reilly's write-up covers the installation of Debian Linux onto the BeagleBone Black, extending the apt package manager to use the Debian Testing repository, then the installation of the Mosquitto MQTT software. The process is pleasingly straightforward: Only two packages need to be installed, and messages can start to be passed from any machine on the same network to the BeagleBone Black.

That's only the beginning of the story, of course. "I plan on putting the BeagleBone in some kind of enclosure so I can use it to consolidate MQTT messages from my sprinkler controller and outdoor intrusion detection grid," Reilly writes. "It would certainly be nice to also start logging inside lighting use with my ESP8266-equipped lamps."

The full write-up is available over on The New Stack now.

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles