MQTT is a messaging protocol that has become the default protocol of IOT.
The best way of understanding MQTT and MQTT-SN is to use them. To get started you need two things:
- An MQTT or MQTT-SN broker
- An MQTT or MQTT-SN client
The most popular MQTT broker is the free open source mosquitto broker. Installation instructions and detailed tutorials are available here.
The most popular MQTT clients are the mosquitto_sub and pub clients which come with Mosquitto .
You will need to install mosquitto first to gain access to these clients.
There are also graphical clients available like MQTT explorer which many people prefer.Take a look at.
- MQTT explorer
- MQTTLens -Chrome extension -Tutorial here
- MQTT Client –Android App
MQTT clients are also available in all of the main programming languages.
On This site I provide examples using Python, Nodejs and JavaScript, and C as well as Arduino.
This site and newsletter is dedicated to help you learn and master the MQTT and MQTT-SN protocols, and use them in your applications.
MQTT vs MQTT-SN
This can be somewhat confusing for beginners. MQTT is the most popular protocol and is fully standardised. It use TCP as the transport protocol.
MQTT-SN was created later and based on MQTT but uses UDP as the transport protocol, and is not as yet fully standardised.
Currently there is very limited support for the MQTT-SN protocol but that seems to be changing.
There is currently,as far as I am ware, only one MQTT-SN broker the RSMB (really small messaging broker). The mosquitto broker started life as the RSMB broker.
Sign Up for Steve’s Latest Posts and stay in touch.
Getting Started
I Recommend you start your journey into MQTT with the short MQTT course.