Edit This Guide Record
Guides IoT Index MQTT and Modbus - the perfect match?

MQTT and Modbus - the perfect match?

Published on 04/12/2016 | IoT Index

182 0

Tin Phan

Accelerating the Adoption of Industrial Internet of Things.

IoT GUIDE

Overview

The Internet of Things isn’t just about new technologies: It’s also about integration with older technologies, a key attribute of which is communication. The available methods of communication are diverse, however, numerous protocols play a role in bringing the abundance of “things” to the Internet. This blog post explores two complementary protocols for the IoT: Modbus, a local protocol for short-distance device attachment, and Message Queuing Telemetry Transport (MQTT), a scalable Internet protocol that enables global communication for the IoT.

 

Modbus is a serial communications protocol that first appeared in 1979 and is the de facto standard protocol for connecting industrial devices. MQTT appeared 20 years later, but bringing these two protocols together gives deeply embedded devices the scale and connectivity of the Internet. The figure below illustrates the general relationship between these protocols while introducing the enabling solution for connectivity: the IoT gateway.

Modbus

Since it first appeared in 1979, Modbus has evolved into a broad set of protocols over a variety of physical links (for example, RS-485). At its core, Modbus is a serial communications protocol that follows a master–slave model. A master sends a request to a slave device, and the slave returns a response. In a standard Modbus network, there is one master and up to 247 slaves (although 2 byte addressing can significantly expand this limit).

MQTT

MQTT is an open, lightweight machine-to-machine protocol designed for IoT interactions. An MQTT network contains an MQTT broker, which mediates interactions among MQTT agents. The agents are publishers, which publish information for consumption by subscribers. I already talked about this protocol in more detail in my previous blog post. Over 3G networks, MQTT throughput has been measured at 93 times faster than Representational State Transfer (REST) over HTTP.

Conclusion

MQTT and Modbus help advance the IoT in a complementary way. Using Modbus as a local interface to manage devices and MQTT as a global protocol to expand the reach of those devices’ data, each serves an important role. IoT gateways provide an easy and secure way to build the IoT now and in the future.

 

test test