IoT and connected devices use different communication and messaging protocols at different layers. While developing an IoT device, the selection of the protocol largely depends on the type, layer and function to be performed by the device. MQTT, XMPP, DDS, AMQP, and CoAP are a few of the widely used communication protocols for the IoT application layer. Let us understand each of them in detail.
In today’s time, networking with smart devices and IoT is increasing largely due to the ongoing technological revolution across the globe. People are increasingly using IoT and connected devices to automate industrial operations, control city traffic, track health, control home appliances, manage the fleet of vehicles, etc. Smart devices like phones, wearable devices, kiosks, appliances, and automobiles use the internet to connect with other devices and exchange information and data with servers to perform different operations.
- Know more on IoT Consulting services
There are two ways these devices can connect to the internet. Some devices may connect through a gateway, while others may have network capability built into the devices itself. It is interesting to note here that for establishing the connection with the internet, these devices use messaging and communication protocols at each layer of the Open Systems Interconnection (OSI) model. Depending on the function of the device, the communication protocol at each layer varies.
IoT devices work by fetching data from users, either through input devices such as touch screens or sensors used for motion detection, temperature, humidity, pressure, etc. This data is then sent to the data servers for storage and processing, and the resulting information is provided to the end user devices for analysis and control.
To understand this, let us consider an example of a Smart Home setup. A typical smart home consists of devices like thermostat, door sensor, smart bulbs, smart refrigerator, smart TV, surveillance systems, etc. These devices are connected to the internet directly or to the gateway, which is further connected to the end user’s smartphone, mobile application or data center and vice-versa.
Get details on Smart Home Design solutions
Why RDM Remote devices management is used
IoT Protocol Stack
There are many protocols used in an IoT ecosystem at different layers of an OSI Model. However, the usage of a protocol is based on the type of application and its functionality. Usually, it is preferred to use low-powered protocols like 6LoWPAN, Bluetooth BLE, ZigBee, etc. Another deciding factor in choosing a protocol is the distance range for the communication of the IoT devices i.e. in inches or meters or miles.
When it comes to selecting a protocol for the application layer of the IoT system, there are several protocols available. However, the most common types of IoT application protocols include, MQTT, XMPP, DDS, AMQP, and CoAP.
MQTT (Message Queue Telemetry Transport)
MQTT is a machine-to-machine (M2M) protocol. It is a publish-subscribe-based messaging protocol, used to communicate device data to the servers. The main purpose of MQTT is to manage IoT devices remotely. It is mainly used when a huge network of small devices needs to be monitored or managed via Internet i.e. parking sensors, underwater lines, energy grid, etc.
DOWNLOAD CASE STUDY
Enabling Remote Monitoring & Predictive Maintenance of Warehouse Equipment
The MQTT messages are sent asynchronously through publish-subscribe architecture. The messages are encapsulated in several defined control packets, which are designed to minimize the network footprint. Listed below are a few MQTT protocol control packets:
An MQTT control packet is formed as shown in the figure below.
It should be noted that not all control packets have the variable headers and payload. A payload can be up to 256 MB. The small header overhead in MQTT makes this protocol appropriate for IoT.