MQTT stands for Message Queue Telemetry Transport. It's a protocol designed for low-bandwidth, high latency networks. You can learn more about it here.

The Bluefruit LE Connect App allows you to send and receive data using the MQTT protocol. For example - this can be useful for making sensor readings from a Bluefruit device viewable on the web.

To access the MQTT settings, simply click the MQTT button in the top right corner of the UART Terminal.

Configuration

Firstly, you will need an adafruit.io account in order to log and collect your data. You can make one here. To learn more about adafruit.io, check out the guide for it here.

Once you have your adafruit.io account set up, connect to your device using the Bluefruit LE Connect app and open the UART mode.  In the UART module, tap the "MQTT X" button at the top of the screen.

Under SERVER, enter "io.adafruit.com" as the server address and "1883" as the port.

Before filling in the necessary information, you will need to make 3 feeds on your adafruit.io account.

You can name them anything you like, but in this example will name the feed used to display data received by the board as "rx"), and another used to display data entered through the app as "tx". We'll also have a third feed named "output" which will display new data on the Bluefruit LE Connect app, called "output".

Under PUBLISH, enter in <username>/f/<respective feed name> for both UART RX and TX.

Under SUBSCRIBE, use your third output feed name as input.

Finally, under ADVANCED, use your adafruit.io username. Under Password, use your adafruit.io account's KEY. This can be found under the settings of your adafruit.io account.

DO NOT USE YOUR ADAFRUIT.IO ACCOUNT PASSWORD. Simply use the generated key for your account.

Example

Here are some examples of feeds created using the Bluefruit LE Connect app in the same manor as described above.

Received Data

This is an example of an RX feed that presents data sent from an Adafruit Feather Bluefruit and is received by iPhone using the Bluefruit LE Connect app via MQTT. The data is sent using an ASCII Numeric format similar to how plotter data is sent. You can see the plotter feature here.

Written Data

This is an example of a TX feed that presents data sent from the Bluefruit LE Connect app to adafruit.io via MQTT.

Output Data

This is an example of an output feed that presents data created on adafruit.io sent to the Bluefruit LE Connect app via MQTT

This guide was first published on Feb 20, 2015. It was last updated on Feb 20, 2015. This page (MQTT) was last updated on Nov 19, 2019.