mobile | classic
Dataweek Electronics & Communications Technology Magazine

Follow us on:
Follow us on Facebook Share via Twitter Share via LinkedIn


Electronics Buyers' Guide

Electronics Manufacturing & Production Handbook 2019


Quectel supports MQTT protocol for IoT
31 January 2018, Telecoms, Datacoms, Wireless, IoT

The term Internet of Things (IoT) is used to describe the practice of connecting devices through the use of the Internet. The IoT is already connecting computing devices, appliances, humans and other living beings through the In-ternet. Accumulating data and knowledge through these Things would improve a vast array of items and experiences throughout the world. The IoT is made of events and signals of many different kinds and requires a standardised mode of communication.

In a report published by IBM on the future of the Internet of Things, the number of connected devices is forecast to surpass 30 billion in 2020, up from 2,5 billion in 2009 and 10 billion today. The connected devices need a protocol with which to communicate only when it is required. Devices with constrained resources should be able to communicate with various other heterogeneous devices.

MQ Telemetry Transport Protocol (MQTTP or simply MQTT) is described on the website as a machine-to-machine (M2M) / IoT connectivity protocol. This protocol is so lightweight that it can be supported by some of the smallest measuring and monitoring devices, and it can transmit data over far reaching, sometimes intermittent networks.

MQTT is a publish/subscribe messaging transport protocol that is optimised to connect physical world devices and events with enterprise servers and other consumers. It is designed to overcome the challenges of connecting the rapidly expanding physical world of sensors, actuators, phones and tablets with established software processing technologies. These principles also turn out to make this protocol ideal for the emerging M2M or IoT world of connected devices where bandwidth and battery power are at a premium. The following are the five most important things to know about MQTT protocol.

MQTT publish subscribe architecture

The MQTT messages are delivered asynchronously (‘pushed’) through publish subscribe architecture. The protocol works by exchanging a series of MQTT control packets in a defined way. Each control packet has a specific purpose and every bit in the packet is carefully crafted to reduce the data transmitted over the network. An MQTT topology has a server and a client, each of which communicates through different control packets. Table 1 briefly describes each of these control packets.

Ideal for constrained networks

MQTT control packet headers are kept as small as possible. Each MQTT control packet consists of three parts: a fixed header, a variable header and a payload. Each packet has a 2 Byte fixed header, while not all packets have the variable headers and payload. A variable header contains the packet identifier if used by the control packet. A payload up to 256 MB could be attached in the packets.

Having a small header overhead makes this protocol appropriate for IoT by lowering the amount of data transmitted over networks constrained by factors like low bandwidth, high latency, data limits and fragile connections.

MQTT network architecture.
MQTT network architecture.

Quality of Service

Quality of Service (QoS) levels determine how each MQTT message is delivered, and must be specified for every message sent. It is important to choose the proper QoS value for every message, because this value determines how the client and the server communicate to deliver the message. Three QoS for message delivery could be achieved using MQTT:

• QoS 0 (At most once) – where messages are delivered according to the best efforts of the operating environment. Messages loss can occur.

• QoS 1 (At least once) – where messages are assured to arrive but duplicates can occur.

• QoS 2 (Exactly once) – where message are assured to arrive exactly once.

There is a simple rule when considering the performance impact of QoS, namely ‘the higher the QoS, the lower the performance’. MQTT provides flexibility to the IoT devices, to choose the appropriate QoS they would need for their functional and environment requirements.

Abnormal disconnect notification

When an MQTT client connects to the MQTT server it can define a topic and a message that needs to be published automatically on that topic when it unexpectedly disconnects. This is also called the ‘Last Will and Testament’ (LWT). When the client unexpectedly disconnects, the keep alive timer at the server side detects that the client has not sent any message or the keep alive PINGREQ, hence the server immediately publishes the Will message on the Will topic specified by the client.

The LWT feature can be useful in some scenarios. For example for a remote MQTT client, this feature can be used to detect when the IoT device goes out of the network. The LWT feature can be used to create notifications for an application that is monitoring the client activity.

Clients are very simple to implement

MQTT is an open protocol, standardised by the OASIS Technical Committee. This makes it easy to adopt for the wide variety of IoT devices, platforms and operating systems. Many applications of MQTT can be developed just by implementing the CONNECT, PUBLISH, SUBSCRIBE and DISCONNECT control packets. A variety of MQTT client libraries are made available through the Eclipse Paho project. Eclipse Paho MQTT client libraries can be downloaded from

The IBM MessageSight messaging appliance helps to deliver the performance, value and simplicity that organisations need for accommodating this multitude of devices and processing large volumes of events in real-time. IBM MessageSight is built from the ground up with new technology to provide high scalability, and extends existing messaging networks by adding fast transaction rates, consistently lower latency, and extensive scaling in the number of concurrent devices that can be connected. It is also suitable for deployment in a demilitarised zone (DMZ).

In summary, MQTT is a protocol built for M2M and IoT which can help provide revolutionary performance, and opens up new areas for messaging use cases for billions of things connected through the Internet. The IBM Redbooks publication ‘Building Realtime Mobile Solutions with MQTT and IBM MessageSight’ covers the theory and real-world scenarios for using MQTT along with IBM MessageSight for mobile and other Internet of Things applications.

Supplied By: Icorp Technologies
Tel: +27 11 781 2029
Fax: 086 555 7808
  Share on Facebook Share via Twitter Share via LinkedIn    

Further reading:

  • The ultimate wireless mesh for Industrial IoT in SA?
    29 May 2019, Altron Arrow, This Week's Editor's Pick, Telecoms, Datacoms, Wireless, IoT
    Analog Devices’ SmartMesh could help with predictive maintenance of the largely metal and concrete buildings which include industrial plants, data centres, commercial buildings, bridges and tunnels.
  • Passive RFID using UHF delivers long-range benefits in the IoT
    29 May 2019, Avnet South Africa, This Week's Editor's Pick, Telecoms, Datacoms, Wireless, IoT
    In order to support the use of UHF RFID as an IoT solution, a global alliance was formed in 2014 by Google, Intel, Impinj, Smartrac and AIM.
  • To ICASA or not to ICASA wireless modules?
    29 May 2019, Otto Wireless, This Week's Editor's Pick, Telecoms, Datacoms, Wireless, IoT
    When selecting a wireless module, purchasing an ICASA approved device or module from the approved supplier is critical.
  • Using a COTS-based SDR platform for streamlined 5G development
    29 May 2019, Rugged Interconnect Technologies, This Week's Editor's Pick, Telecoms, Datacoms, Wireless, IoT
    The latest SDR products offer solutions with integrated I/O, ARM processors, and large FPGAs that include intellectual property (IP) for accessing, routing and processing digital data.
  • Waveguide antennas for millimetre-wave
    29 May 2019, RF Design, Telecoms, Datacoms, Wireless, IoT
    Pasternack has released a new line of waveguide antennas designed to address R&D, military/aerospace, experimental radar, test and measurement, and wireless communication applications from 40 GHz to 220 ...
  • Multi-constellation GNSS module
    29 May 2019, Altron Arrow, Telecoms, Datacoms, Wireless, IoT
    Telit’s new GE310-GNSS is an IoT (Internet of Things) module with GSM/GPRS, multi-constellation satellite positioning and Bluetooth functionality, packaged in a 270 mm² form factor. The module enables ...
  • RF front-ends for 5G deployments
    29 May 2019, Hi-Q Electronics, Telecoms, Datacoms, Wireless, IoT
    Sky5 LiTE, recently unveiled by Skyworks, is a fully integrated front-end solution for mass tier 5G cellular applications. The baseband agnostic platform supports up to 100 MHz bandwidth for 5G new radio ...
  • GNSS module for lane-accurate positioning
    29 May 2019, RF Design, Telecoms, Datacoms, Wireless, IoT
    New from u-blox comes the ZED F9K high-precision multiband GNSS (global navigation satellite system) module with built-in inertial sensors. The module combines the latest generation of GNSS receiver technology, ...
  • Wi-Fi and Bluetooth module
    29 May 2019, Avnet South Africa, Telecoms, Datacoms, Wireless, IoT
    Murata Manufacturing has collaborated with Cypress Semiconductor to develop the Type 1LV (CYW43012) low-power, small form factor Wi-Fi and Bluetooth module. This product is designed to improve battery ...
  • Sigfox-connected remote switch
    29 May 2019, Electrocomp Express, Telecoms, Datacoms, Wireless, IoT
    Telemecanique Sensors offers a wireless solution to collect data from remote equipment and use this data, via the Internet, on a PC or mobile device. The XIOT cloud-connected switch (model XIOT11SE5MRCL) ...
  • Replacing the magnetron with solid-state devices in microwave ovens
    29 May 2019, TRX Electronics, Telecoms, Datacoms, Wireless, IoT
    Microwave ovens are much-used appliances in many kitchens today. Used not only for cooking food from frozen but also for reheating last night’s curry or the cup of coffee you left to go cold, they provide ...
  • 50 GHz mixers in SMT packages
    29 May 2019, RF Design, Telecoms, Datacoms, Wireless, IoT
    Marki Microwave has introduced its first 50 GHz surface-mount products, the MM1-1850HSM and MM1-1850SSM double-balanced mixers. These GaAs MMIC mixers offer wide bandwidths and high linearity in a proprietary ...

Technews Publishing (Pty) Ltd
1st Floor, Stabilitas House
265 Kent Ave, Randburg, 2194
South Africa
Publications by Technews
Dataweek Electronics & Communications Technology
Electronics Buyers’ Guide (EBG)

Hi-Tech Security Solutions
Hi-Tech Security Business Directory

Motion Control in Southern Africa
Motion Control Buyers’ Guide (MCBG)

South African Instrumentation & Control
South African Instrumentation & Control Buyers’ Guide (IBG)
Terms & conditions of use, including privacy policy
PAIA Manual


    Classic | Mobile

Copyright © Technews Publishing (Pty) Ltd. All rights reserved.