Communication Protocols for IoT Devices



Connectivity is the backbone of the Internet of Things ecosystem. Communication protocols enable IoT devices to connect to one another and share data.

If you want to implement an IoT system in your organisation, you need to know the major IoT protocols and how they work. This chapter will discuss the top IoT communication protocols and their properties.

IoT Communication Protocols?

IoT devices are connected by wireless networks and sets of rules known as IoT communication protocols, or simply IoT protocols. IoT devices can communicate with one another using IoT protocols.

Factors to choose IoT Protocols

The perfect IoT communication protocol is decided by the special requirements and limitations of a specific device. The following factors determine the selection of IoT protocols −

  • Geographic Locations are the physical distances between two or more devices that make an ecosystem.
  • Power consumption requirements is the duration for which the IoT devices continue to operate on.
  • Physical Barriers are the barriers that exist between the devices inside the IoT ecosystem, like walls, mountains, buildings, and so on.

List of Protocols for IoT devices

Communication protocols for IoT devices are like the languages used to communicate with one another. Here are some of the top protocols −

1. MQTT (Message Queuing Telemetry Transport)

MQTT is a message protocol or collection of rules for machine-to-machine communication that follows to predefined standards. Smart sensors, wearables, and other Internet of Things (IoT) devices often require transmit and receive data over a limited in resources network with limited bandwidth. These IoT devices use MQTT for data transfer because it is simple to set up and effectively communicates IoT data. MQTT enables messaging between devices and the cloud.

Importance of MQTT

Due to its ability to provide the following advantages, the MQTT protocol has become the industry standard for IoT data transmission −

  • Portable and Effective − MQTT can even be implemented on small microcontrollers because it uses very few resources when deployed on an Internet of Things device. For example, two data bytes can be the minimum size of a MQTT control message. Also, MQTT message headers are reduced to maximise network bandwidth.
  • Adaptable − A small amount of code is needed to implement MQTT, and it uses very little power when it operates. A lot of IoT device connection is supported by the protocol's built-in features. So you can link to millions of these devices by implementing the MQTT protocol.
  • Trustworthy − Many Internet of Things devices are connected to unreliable cellular networks that have poor throughput and too much latency. The IoT device reconnects to the cloud faster because of the the built-in features in MQTT. In order to provide dependability for Internet of Things use cases, it additionally specifies three different quality-of-service levels: at most once (0), at least once (1), and exactly once (2).
  • Secure − Developers can easily encrypt communications and authenticate users and devices with MQTT by using modern authentication protocols like TLS1.3, OAuth, Customer Managed Certificates, and more.

MQTT Components

MQTT supports the publish/subscribe model by configuring clients and brokers in the way mentioned below −

  • Client − Any device that runs a MQTT library, from a server to a microcontroller, is a MQTT client. The client performs the roles of publisher and receiver when sending and receiving messages, accordingly. In simple terms, a MQTT client device is any device that uses MQTT for network-based communication.
  • Broker − The backend system that synchronises messages between the various clients is the MQTT broker. The broker's responsibilities encompass receiving and screening communications, identifying which clients have subscribed to each one, and forwarding the messages to them. It is also in charge of additional duties like −
    • Verifying and approving MQTT clients.
    • Transferring messages to additional systems for analysis.
    • Taking care of client sessions and missed messages.
    • MQTT connection.
  • Connection − An MQTT connection is used to initiate communication between clients and brokers. Clients send a CONNECT message to the MQTT broker to start the connection. By sending back a CONNACK message, the broker certifies that a connection has been made. In order for the MQTT client and the broker to communicate, a TCP/IP stack is needed. Clients exclusively communicate with the broker and connect with each other.

2. HTTP (Hypertext Transfer Protocol)

An application-level protocol designed for interconnected, collaborative, hypermedia information systems is called HTTP. Since 1990, this has served as the basis for data communication on the World Wide Web, or internet. HTTP is a generic, stateless protocol that can be extended for additional uses by manipulating its headers, error codes, and request methods.

In simple terms, HTTP is a TCP/IP based communication protocol that is used to send data across the World Wide Web, including picture files, HTML files, and query results. Since TCP 80 is the default port, you can use other ports as well. It offers a common means of computer-to-computer communication. The HTTP specification outlines the format and transmission method for client request data to the server.

Features of HTTP

Three basic features make HTTP a simple but effective protocol −

  • Connectionless protocol − A browser operating as the HTTP client makes an HTTP request and then waits for a response. After the server responds to the request and processes it, the client cuts off the connection. Thus, only during the current request and response do the client and server know about one another. When a client and server are connected for the first time, more requests are made.
  • Media Independent − As HTTP is media independent, any kind of data can be sent over it as long as the client and server are both capable of handling the data's content. Both the client and the server must use the correct MIME-type to specify the content type.
  • Stateless − As already mentioned, HTTP's statelessness directly contributes to its connectionless nature. Only during a current request are the server and client aware of one another. They both forget about each other after that. The protocol's nature prevents both the client and the browser from storing data between requests made on different web pages.

3. CoAP (Constrained Application Protocol)

The web-based, application-layer CoAP protocol was created for limited devices, like sensors. Sensors' processing power and memory are constrained. The HyperText Transport Protocol (HTTP) protocol and the CoAP are comparable. The Representative State Transfer (REST) architecture takes advantage of CoAP.

How CoAP Work?

CoAP allows devices like sensors and actuators to communicate across the Internet of Things by acting as a sort of HTTP for limited devices. As an element of a system, these sensors and actuators are managed and make a contribution by transferring data. The protocol's low power consumption and little network overhead are designed to ensure resilience in situations with limited bandwidth and high congestion. CoAP can function on a network where TCP-based protocols, like MQTT, are unable to share data and interact efficiently because of high congestion or poor connectivity.

Furthermore, devices working in low signal quality may communicate data consistently thanks to the efficient and traditional CoAP capabilities, and an orbiting satellite can successfully sustain its distant communication. Moreover, billion-node networks are supported by CoAPs. The DTLS parameters that are used by default are similar to 128 bit RSA keys in terms of security.

UDP is the fundamental network protocol used by COAP. In simple terms, COAP is a client-server Internet of Things protocol, like HTTP, in which a request is made by the client and a response is sent by the server. HTTP and COAP both use the same techniques.

4. AMQP (Advanced Message Queuing Protocol)

Advanced Message Queuing Protocol is referred to as AMQP. This widely used standard, which essentially operates at the application layer, is primarily used to create unmatched communication functionality between broker and client parties.

While clients collect and handle the messages, the publisher is responsible for their creation. In this entire process, the function of brokers like RabbitMQ is to ensure that messages are sent straight from the publisher to the client.

Among its most crucial elements are queuing, routing, and message orientation. Compatibility with different infrastructure configurations is achieved when AMQP is used. It lets developers use any provided client library and broker that meets with the protocol.

Components of AMQP

Developers need to be familiar with specific components needed for AMQP model deployment −

  • Exchanges − Messages are retrieved by Exchange and carefully arranged in the appropriate queue. There are four categories in it: Direct, Topic, Headers, and Fanout. To give you more specifics, it is an essential part of the broker.
  • Channel − A multiplexed virtual connection among AMQP peers that is constructed inside of an already-existing connection is referred to as a channel.
  • Message Queue − It is a recognised entity that helps in connecting communications to their source or resources.
  • Binding − Bindings are a set of pre-established rules related to exchanges and queues. It handles the delivery and transmission of messages.
  • Virtual Hosts − One platform that provides the broker with segregation capabilities is called vhost. There can be more than one operational vhost at once, depending on the users and their access privileges.

5. Bluetooth and Bluetooth Low Energy (BLE)

Bluetooth

Bluetooth is a LAN technology that operates within a limited range and is used to link small devices and gadgets together, enabling personal data transfer between them. Often referred to as Bluetooth classic, it allows linked devices to communicate across the 2.4 GHz ISM unlicensed frequency. Basic Rate (BR) and Enhanced Data Rate (EDR) are the two different data rate types available for the Bluetooth Classic version.

Bluetooth Low Energy (BLE)

Bluetooth Classic and Bluetooth Low Energy (BLE) are comparable. IEEE 802.15 has standardised this short-range wireless LAN communication technique. Also, it uses unlicensed 2.4 GHz ISM spectrum. The main feature that sets BLE apart is its low power consumption, which is maintained while keeping the same communication range as Bluetooth classic. BLE was initially made commercially available in 2011. It is commonly used in power-saving products for home automation, security, healthcare, and fitness.

6. Zigbee

Zigbee is a low-power wireless mesh network standard designed for wireless control and monitoring applications that use battery-powered devices. Zigbee allows communication with reduced latency. Microcontrollers and radios are commonly integrated with Zigbee chips.

Zigbee expands upon IEEE standard 802.15.4 for low-rate wireless personal area networks (WPANs), which defines the physical layer and media access control. The network layer, application layer, Zigbee Device Objects (ZDOs), and manufacturer-defined application objects are the four other essential parts of the specification. Device discovery, device security, device role tracking, and network join request management are among the responsibilities of ZDOs.

Generic mesh networking as well as star and tree networks are naturally supported by the Zigbee network layer. There has to be one coordinator device per network. The coordinator in a star network needs to be the centre node. Zigbee routers can be used to expand network-wide communication through trees and meshes.

Use Cases

Zigbee protocols are like a special language used by devices that need to conserve power and don't need to send a lot of data quickly. This means the devices can last a long time without needing new batterieslike at least two years.

People use Zigbee in lots of different situations, like −

  • Making homes smart and automated.
  • Setting up wireless networks of sensors.
  • Controlling machines and systems in factories.
  • Putting sensors in things like thermostats or wearable health devices.
  • Collecting medical information from patients.
  • Keeping buildings safe with alarms for fire or break-ins.
  • Making it possible to change settings on microphones without having to be close to them.

But Zigbee is not good for situations where devices move around a lot. So it is not the best choice for things like military operations where fast data transfer and lots of movement are important.

7. LoRaWAN (Long Range Wide Area Network)

LoRa is a radio modulation technique that uses chirp spread spectrum technology to manipulate radio waves in order to convey information in a multi-symbol manner. The name "LoRa" can also refer to the communication network that IoT apps use, or the systems that enable this modulation technology.

LoRa's cost and long-range capabilities are its key benefits. Smart cities are a common use for LoRa, where cheap, low-powered IoT devices (usually sensors or monitors) placed across a broad area regularly transmit small data packets to a central administrator.

Based on the LoRa radio modulation method, LoRaWAN is a low-power wide area networking protocol. It controls communication between end-node devices and network gateways as well as wirelessly connects devices to the internet. Because LoRaWAN is an inexpensive, bi-directional, long-range communication protocol with low power consumption-devices can operate for ten years on a small battery, its use in business environments and smart cities is growing. For network deployments, it makes advantage of the unlicensed ISM (Industrial, Scientific, and Medical) radio frequencies.

There are two ways an end device using LoRaWAN can connect to a network −

  • Over-the-air Activation (OTAA) − In order to connect to the network, a device needs to establish both an application session key and a network key.
  • Activation by Personalization (ABP) − With Activation by Personalisation (ABP), a device's network communication keys are hardcoded resulting in a less secure but faster connection.

8. DDS (Data Distribution Service)

DDS uses a publish-subscribe model similar to MQTT; the primary distinction is the absence of brokers. It means that every publisher such as temperature sensors and every subscriber such as cell phones are linked to the same network. To prevent bottlenecks, this network known as Global Data Space (GDS) interconnects every node with every other node.

Standards and products for communications middleware are many. Because of its distinct data focus, DDS is an ideal fit for the Industrial Internet of Things. The majority of middleware functions by transferring data between systems and applications. Data centricity makes sure that all communications have the background knowledge that an application needs in order to understand the data that it receives.

The fundamental characteristic of data centricity is that DDS has knowledge of the data it contains and manages its distribution. When using conventional message-centric middleware, programmers have to develop message-sending code. When writing code, programmers use data-centric middleware to define when and how to communicate data, as well as to share data values directly. DDS directly enables controlled, managed, secure data sharing for you, removing the need for you to handle all this complexity in the application (your) code.

Advertisements