Part 2 - A Guide to IoT Standards & Protocols

The second part of the IoT Standards & Protocols blog covers the application protocols which can be divided into general application protocols and specialized application protocols for covering specific use cases.

General Purpose Application layer protocols
General purpose IoT application layer protocols include CoAP and MQTT. Additionally, HTTP (Hyper Text Transfer Protocol) is often used in IoT due to its wide adoption in Internet, but it is not a protocol that was originally developed for the IoT environment.

MQTT
Message Queue Telemetry Trasport (MQTT) is one of the most widely used protocols for IoT devices. It can collect data from various devices and supports remote device monitoring. It employs a publish-subscribe communication paradigm and runs over Transmission Control Protocol (TCP).

MQTT is standardized by the Organization for the Advancement of Structured Information Standards (OASIS). First version of the standard was released in 1999, while the latest was in 2019. Apart from MQTT, OASIS also standardizes Advanced Message Queuing Protocol (AMPQ), but also standards in domains of cyber security, legal data exchange, energy, etc. 

As one of the most well-known IoT protocols, it is often used for applications for which its publish-subscribe paradigm is not the best option, e.g., in device management. Also, since it is a general-purpose application protocol, it does not have a well-defined data representation, and each application needs to define it for itself.

CoAP
Constrained Application Protocol (CoAP) is a specialized protocol for constrained devices. It can be regarded as an adjustment of HTTP for a constrained devices environment since it also uses client-server communication paradigm. The protocol is designed to consider energy consumption, and to support applications such as building automation, etc. Its main features include UDP binding instead of TCP, asynchronous message exchanges, low header overhead and low parsing complexity, URI and content-type support, simple proxy and caching capabilities, stateless HTTP mapping, and security binding to DTLS.

The protocol is standardized by Internet Engineering Task Force (IETF). First standardization document (RFC) was released in 2014, while extensions have been released in the following years, the most recent one in 2021.

Even though CoAP is a protocol defined specially for constrained devices, it does not have a wide adoption. One of the reasons is the possibility to use HTTP in IoT environment, since HTTP is the most well-known and most widely used application protocol in the Internet.

Websocket
WebSocket is a widely used communication protocol for client-server communication. Unlike HTTP, it is stateful, and the established communication between the client and server remains opened using the same connection channel until explicit termination. HTTP is used for initiating WebSocket connection - an initial HTTP request is sent via HTTP, and then upgraded to WebSocket. In IoT environment, WebSockets can be used for ensuring persistent connectivity between gateways and back-end system, but they are also considered for communication between end-devices and gateways, even though this protocol was not originally intended for such applications.

The protocol was standardized in 2008 by World Wide Web Consortium (W3C) as a way to provide the applications with a stateful connection and to offer the richness of TCP at the transport layer.

Special Purpose Application layer protocols
Special purpose application protocols are the ones that are not intended for general usage and user data exchange (e.g., exchanging sensed data), but the ones intended to solve specific challenges in IoT domain. As special purpose application protocols we introduce two protocols for device management – Lightweight M2M (LwM2M) and Universal Service Platform (USP); and a protocol for device interoperability – Matter.

LwM2M
LwM2M is a device management protocol designed for remote device management and telemetry in IoT environments and other M2M applications where devices are of limited processing and storage capabilities. The protocol firstly relied only on CoAP protocol at application layer, but the latest versions can also use MQTT and HTTP. Its functionalities include remote provisioning of security credentials, firmware updates, connectivity management, remote device diagnostics and troubleshooting, and configuration of host devices. Apart from the protocol, LwM2M also specifies a data model that can be extended to support applications in various domains.

The protocol was standardized by Open Mobile Alliance (OMA). The first version was released in 2017, while the latest version of the protocol was released in 2020.

User Services Platform (USP)
User Services Platform, TR-369 standard by Broadband Forum, is the application layer protocol and data model for remote device management of different types of devices. TR-369 is the successor of TR-069, a CPE WAN Management Protocol (CWMP), a solution primarily designed for remote management of routers. TR-369 as a successor of TR-069 is built to enable additional use cases which emerged with time. One of these use cases is standardized IoT devices onboarding and management which was not a viable use case at the time TR-069 was introduced in 2004. By using TR-369, IoT devices can be upgraded for software extensions or firmware updates, they can be initialized and registered upon first connection to the service provider, and they can be monitored during regular operation. These functionalities are also enabled for IoT devices not using IP-protocols (e.g., ZigBee, Z-Wave…). Furthermore, USP specifies a well-defined data model Device:2, which can be used to describe IoT devices, their capabilities, connectivity protocols, etc.

TR-369 (USP) was first published in 2018, with its latest release in 2022.

Matter
Matter is an interoperability protocol primarily intended to enable interconnection of devices from different vendors in a smart home environment. The goal of the protocol is to enable connectivity of different IoT devices without the need to use multiple proprietary hubs, one hub for each producer. By using Matter, a user could control IoT devices from different vendors within the same apps. The Matter standard has a well-defined data model inherited from Zigbee Cluster Library (ZCL) that can model device types and features. The Matter protocol relies on protocols for connecting devices in a smart-home environment – ZigBee, Bluetooth, and Thread (mesh networking technology for IoT products).

The first version of the standard was released in 2022 by Connectivity Standards Alliance (formerly ZigBee alliance). Quite a number of smart home providers already supports the Matter standard, or plans to adopt it, which will enhance interoperability of smart home solutions.

Conclusion
The spectrum of available protocols for deployment of IoT solutions is wide. To be able to optimally choose the protocols for specific solutions, one should firstly consider the collocation of IoT devices, which influences the selection of connectivity protocols. Then the transmitted user data should be considered, which influences the selection of application protocols. Special purpose protocols should be considered according to specific requirements of the solution (e.g., energy-efficient device management or interoperability). Since the main issue for interoperability is not in communication protocols, but the data format used, only protocols and standards with a well-defined data model adopted by the vendors can be significant in this area. Such protocols are USP and Matter, and they will play a significant role in enhancing interoperability of IoT solutions in smart home environment and connecting IoT devices from multiple manufacturers to applications developed by multiple vendors.

Written by Pavle Skocir
Pavle Skocir has been working in Axiros for one year as a software engineer in the delivery team and recently as a presales manager. Previously, he was an IoT enthusiast and worked on numerous applications in the smart home environment and on solutions for IoT interoperability. He also taught computer science courses at the University.

Click for the Part 1: https://www.axiros.com/blog/2023/04/25/a-guide-to-iot-standards-amp-protocols

Related Info:
Knowledge Base: What is IoT?

Previous
Previous

MTA (Multimedia Terminal Adapter) Provisioning

Next
Next

Part 1 - A Guide to IoT Standards & Protocols