Subscribe to our Newsletter | To Post On IoT Central, Click here


At differnet layers, IoT and connected devices uses different communication and messaging protocols. While developing an IoT device, the selection of the protocol largely depends on the type, layer and function to be performed by the device. 

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.

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.

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.

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.

Pros:

  • Lightweight for constrained networks
  • Flexibility to choose Quality of Services with the given functionality
  • Standardized by OASIS Technical Committee
  • Easy and quick to implement

Cons:

  • High power consumption due to the TCP-based connection
  • Lack of encryption

Use Case:

A parking lot where there are a number of parking sensors installed to identify the number and location of empty or vacant parking spots.

XMPP (Extensible Messaging and Presence Protocol)

XMPP was originally developed as a messaging protocol known as Jabber. It uses an XML format for messaging. The main feature of this protocol is its addressing mechanism. It identifies the devices/nodes in the IoT network using the address known as Jabber ID (JID). JID follows the standard i.e. [email protected] This addressing mechanism enables two nodes to exchange information, regardless of how far the nodes are in the network.

XMPP messages are usually transmitted over the underlying TCP connection. It uses a polling mechanism to identify the destination of the message. XMPP is implemented using a client-server architecture. The client starts an XML stream by sending an opening <stream> tag. The server then replies with an XML stream back to the client. Since XMPP is an open protocol, anyone can have their own XMPP server in their network without necessarily connecting to the internet.

 

Pros:

  • Addressing scheme to identify devices on the network
  • Client-server architecture

Cons:

  • Text-based messaging, no end-to-end encryption provision
  • No Quality of Service provision

Use Case:

  • A smart thermostat that can be accessed from a smartphone via a web server.
  • A gaming console with instant messaging between the two online players.

DDS (Data Distribution Service)

DDS is also based on a publish-subscribe model. DDS connects the devices directly, unlike MQTT, which connects them to the server. This is why DDS is faster than MQTT. Apparently, it can deliver millions of messages to a number of different receivers in seconds as it eliminates the communication with the server. DDS can be utilized for providing device-to-device communication over the data bus.

It provides detailed Quality of Service and reliability.

Pros:

  • Based on a simple “publish-subscribe” communication paradigm
  • Flexible and adaptable architecture that supports “auto-discovery” of new or stale endpoint applications
  • Low overhead — can be used with high-performance systems
  • Deterministic data delivery
  • Dynamically scalable
  • Efficient use of transport bandwidth

 Use Case:

Military systems, wind farms, hospital integration, medical imaging, asset-tracking systems and automotive test and safety.

 

AMQP (Advanced Message Queuing Protocol)

Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for sending transactional messages between servers. As a message-centric middleware, it can process thousands of reliable queued transactions.

AMQP is focused on not losing messages as messages can be transferred using TCP or UDP. The use of TCP provides a reliable point-to-point connection. Further, endpoints must acknowledge the acceptance of each message. The standard also describes an optional transaction mode with a formal multiphase commit sequence. True to its origins in the banking industry, AMQP focuses on tracking messages and ensuring each message is delivered as intended, regardless of failures or reboots.

Pros:

  • Messages can be sent over TCP and UDP
  • Provides end-to-end encryption

Cons:

  • Relatively high resource utilization i.e. power and memory usage

Use Case:

AMQP is mostly used in business messaging. It usually defines devices like mobile handsets, communicating with back-office data centers.

CoAP (Constrained Application Protocol)

CoAP is an application layer protocol with a client-server architecture. It is a document transfer protocol, which runs over UDP (User Datagram Protocol). It is specifically developed for the resource-constrained devices. Clients and servers communicate through connectionless datagrams. It is useful in low power application as it uses minimal resources. DTLS (derivation of SSL protocol) can be used for security of the messages.

 

Pros:

  • Use of DTLS for security
  • Fast device-to-device communication
  • Smaller packet size
  • Well-designed protocol

Cons:

  • No broadcast message facility as it is a one-to-one protocol
  • Reliability is application’s responsibility

Use Case:

Smart energy grids and smart homes.

Conclusion

All the above-listed protocols are uniquely applicable to different operating scenarios. Any protocol can be handpicked based on their pros and cons for IoT application development. The main factors to consider while choosing any one of them for your application is quality of service, security, and reliability your application requires.

E-mail me when people leave their comments –

Sayali Sawat works as a Digital Marketing Executive at eInfochips. She handles marketing activities of IoT, connected devices, and Aerospace domain. Sayali has completed her B.E. in Electronics &amp; Telecommunication

You need to be a member of IoT Central to add comments!

Join IoT Central

Comments

  • So what protocol is suitable for IOT low power consumption?

    How to Design Low Power IoT Applications Part 2: Optimizing the Non-optimal
    Optimizing battery life and power consumption by using some key techniques which can be employed to optimize the IoT data exchange with LTE technology
This reply was deleted.

Upcoming IoT Events

More IoT News

How wireless charging works

Wireless charging technology has been around for over 100 years, but it has only recently found mainstream practical use for powering electronic devices like smartphones. Learn how this technology works and what advancements we may see in the future.

How wearables can improve healthcare | TECH(talk)

Wearable tech can help users track their fitness goals, but these devices can also give wearers ownership of their electronic health records. TECH(talk)'s Juliet Beauchamp and Computerworld's Lucas Mearian take a look at how wearable health tech can… Continue

IoT Career Opportunities