Comprehensive Guide to IoT Communication Protocols

Comprehensive Guide to IoT Communication Protocols
With the continuous increase in the number of IoT devices, the communication or connection between these devices has become an important topic of consideration.Communication is very common and critical for the IoT, whether it is short-range wireless transmission technology or mobile communication technology, both influence the development of the IoT.In communication, communication protocols are particularly important, as they are the rules and agreements that both parties must follow to complete communication or services.
This article introduces several available IoT communication protocols, each with different performance, data rates, coverage, power, and memory, and each protocol has its own advantages and disadvantages. Some of these communication protocols are only suitable for small household appliances, while others can be used for large smart city projects. IoT communication protocols are divided into two main categories:
  • One category is access protocols: generally responsible for networking and communication among devices within a subnet.
  • The other category is communication protocols: primarily device communication protocols that run on traditional internet TCP/IP protocols, responsible for data exchange and communication between devices over the internet.

1

Physical Layer and Data Link Layer Protocols

1. Long-distance Cellular Communication
(1) 2G/3G/4G Communication Protocols, referring to the protocols for the second, third, and fourth generations of mobile communication systems.
(2) NB-IoT
Narrowband Internet of Things (NB-IoT) has become an important branch of the IoT network. NB-IoT is built on cellular networks, consuming only about 180kHz of bandwidth, and can be directly deployed on GSM, UMTS, or LTE networks to reduce deployment costs and achieve smooth upgrades. NB-IoT focuses on the low-power wide-area (LPWA) IoT market and is an emerging technology that can be widely applied globally. It features wide coverage, many connections, fast rates, low costs, low power consumption, and excellent architecture.
Application scenarios: Applications enabled by NB-IoT networks include smart parking, smart firefighting, smart water management, smart street lighting, shared bicycles, and smart home appliances.
(3) 5G
The fifth generation mobile communication technology, the latest generation of cellular mobile communication technology. The performance goals of 5G include high data rates, reduced latency, energy savings, cost reduction, increased system capacity, and large-scale device connectivity.
Application scenarios: AR/VR, vehicle networking, smart manufacturing, smart energy, wireless medical, wireless home entertainment, connected drones, ultra-high-definition/panoramic live streaming, personal AI assistance, smart cities.
2. Long-distance Non-cellular Communication
(1) WiFi
Due to the rapid popularity of home WiFi routers and smartphones in recent years, the WiFi protocol has also been widely used in the smart home field. The biggest advantage of the WiFi protocol is its ability to connect directly to the internet. Compared to ZigBee, smart home solutions using WiFi protocols eliminate the need for an additional gateway, and compared to Bluetooth protocols, they do not rely on mobile terminals such as smartphones.
Commercial WiFi coverage in urban public transport, shopping malls, and other public places reveals the application potential of commercial WiFi.
(2) ZigBee
ZigBee is a low-speed short-range wireless communication protocol that is a highly reliable wireless data transmission network, characterized by low speed, low power consumption, low cost, support for many online nodes, support for various online topologies, low complexity, and fast, reliable, and secure communication. ZigBee technology is a new technology that has recently emerged, relying primarily on wireless networks for transmission, enabling short-range wireless connections, and belongs to wireless network communication technology.
The inherent advantages of ZigBee technology have made it gradually become a mainstream technology in the IoT industry, finding large-scale applications in industries, agriculture, and smart homes.
(3) LoRa
LoRa™ (Long Range) is a modulation technology that offers longer communication distances compared to similar technologies. LoRa gateways, smoke detectors, water monitors, infrared detectors, positioning, power strips, and other widely used IoT products. As a narrowband wireless technology, LoRa uses time-of-arrival differences to achieve geolocation. Application scenarios for LoRa positioning include smart cities and traffic monitoring, metering and logistics, and agricultural monitoring.
3. Short-range Communication
(1) RFID
Radio Frequency Identification (RFID) is the abbreviation for Radio Frequency Identification. Its principle is non-contact data communication between a reader and a tag to identify the target. RFID has a wide range of applications, including animal chips, automotive chip anti-theft devices, access control, parking control, production line automation, and material management. A complete RFID system consists of a reader, electronic tags, and a data management system.
(2) NFC
NFC stands for Near Field Communication technology in Chinese. NFC was developed based on non-contact radio frequency identification (RFID) technology, combined with wireless interconnection technology, providing a very secure and convenient communication method for various electronic products that are becoming increasingly popular in our daily lives. The “near field” in the Chinese name of NFC refers to the electromagnetic waves of the nearby electromagnetic field.
Application scenarios: Applications in access control, attendance, visitor management, meeting sign-in, patrolling, etc. NFC has functions such as human-machine interaction and machine-to-machine interaction.
(3) Bluetooth
Bluetooth technology is a global standard for wireless data and voice communication, based on low-cost short-range wireless connections, establishing a communication environment for fixed and mobile devices.
Bluetooth enables wireless information exchange between many devices, including mobile phones, PDAs, wireless headsets, laptops, and related peripherals. By utilizing Bluetooth technology, communication between mobile communication terminal devices can be effectively simplified, and communication between devices and the Internet can also be successfully simplified, making data transmission faster and more efficient, thus broadening the path for wireless communication.
4. Wired Communication
(1) USB
USB is the abbreviation for Universal Serial Bus, an external bus standard used to specify the connection and communication between computers and external devices. It is an interface technology used in the PC field.
(2) Serial Communication Protocol
Serial communication protocol refers to the specification that defines the content of data packets, including start bits, main data, check bits, and stop bits. Both parties must agree on a consistent data packet format to send and receive data correctly. Common protocols in serial communication include RS-232, RS-422, and RS-485.
Serial communication refers to a communication method where peripheral devices and computers transmit data bit by bit through data lines. This method uses fewer data lines and can save communication costs in long-distance communication, but its transmission speed is lower than that of parallel transmission. Most computers (excluding laptops) contain two RS-232 serial ports. Serial communication is also a commonly used communication protocol for instrumentation and equipment.
(3) Ethernet
Ethernet is a computer local area network technology. The IEEE organization has established the IEEE 802.3 standard to define the technical standards for Ethernet, which includes the physical layer wiring, electronic signals, and medium access layer protocols.
(4) MBus
The MBus remote meter reading system (symphonic mbus) is a European standard two-wire bus primarily used for consumption measurement devices such as thermal meters and water meters.

2

Network Layer and Transport Protocols

1. IPv4
The Internet Protocol version 4 is the fourth revision in the development of the Internet Protocol, and it is the first version of this protocol to be widely deployed. IPv4 is the core of the internet and the most widely used version of the Internet Protocol.
2. IPv6
The Internet Protocol version 6 was developed due to the limited network address resources of IPv4, which severely restricts the application and development of the internet. The use of IPv6 not only solves the problem of the number of network address resources but also addresses the barriers to connecting various access devices to the internet.
3. TCP
Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. TCP is designed to adapt to the layered protocol hierarchy that supports multiple network applications. It provides reliable communication services between paired processes in main computers connected to different but interconnected computer communication networks. TCP assumes it can obtain simple, possibly unreliable datagram services from lower-level protocols.
4. 6LoWPAN
6LoWPAN is a low-power wireless personal area network standard based on IPv6, i.e., IPv6 over IEEE 802.15.4.

3

Application Layer Protocols

1. MQTT Protocol

MQTT (Message Queue Telemetry Transport) is a telemetry transmission protocol that provides two messaging modes: publish/subscribe, making it more concise, lightweight, and easy to use, especially suitable for message distribution in constrained environments (low bandwidth, high network latency, unstable network communication), and is a standard transmission protocol for the Internet of Things (IoT).
In many cases, including constrained environments, such as machine-to-machine (M2M) communication and the Internet of Things (IoT), it has been widely used in satellite-linked sensor communications, occasionally dialed medical devices, smart homes, and some miniaturized devices.
2. CoAP Protocol
CoAP (Constrained Application Protocol) is a web-like protocol in the IoT world, suitable for small low-power sensors, switches, valves, and similar components that require remote control or monitoring over standard internet networks, with servers not responding to unsupported types.
3. REST/HTTP Protocol
RESTful is a software architectural style based on resources. A resource is an entity on the network, or specific information on the network. An image or a song is a resource. RESTful API is an implementation based on the HTTP protocol (HTTP is an application layer protocol characterized by simplicity and speed).
Applications or designs that meet REST specifications are RESTful, and APIs designed according to REST specifications are called RESTful APIs.
4. DDS Protocol
DDS (Data Distribution Service) is a middleware protocol for distributed real-time data distribution service, serving as the “TCP/IP” of real-time networks, addressing the interconnection of network protocols in real-time networks, functioning as “the bus on the bus”.
5. AMQP Protocol
AMQP, or Advanced Message Queuing Protocol, is an application layer standard that provides unified messaging services and is an open standard for message-oriented middleware design. Clients based on this protocol can pass messages with message middleware without being restricted by different products, different development languages, etc. Implementations in Erlang include RabbitMQ.
6. XMPP Protocol
XMPP is a protocol based on a subset of the standard generalized markup language XML, inheriting the flexible development nature in the XML environment. Therefore, applications based on XMPP have strong scalability. After being extended, XMPP can handle user needs by sending extended information and establishing applications such as content publishing systems and address-based services at the top of XMPP.

4

Comparison of Some Communication Protocols

1. Comparison of NB-IoT Protocol and LoRa Protocol

First, frequency bands. LoRa operates in unlicensed frequency bands below 1GHz, requiring no additional payment for application, while NB-IoT and cellular communication use licensed frequency bands below 1GHz, which require payment.
Second, battery-powered lifespan. LoRa modules have unique characteristics in handling interference, network overlap, scalability, etc., but cannot provide the same quality of service as cellular protocols. Due to quality of service considerations, NB-IoT cannot provide battery life similar to LoRa.
Third, device costs. For terminal nodes, the LoRa protocol is simpler than NB-IoT, easier to develop, and has better applicability and compatibility with microprocessors. Additionally, low-cost, relatively mature LoRa modules are already available on the market, with upgraded versions coming out continuously.
Fourth, network coverage and deployment timelines. The NB-IoT standard was announced in 2016, and aside from network deployment, the corresponding commercialization and industrial chain establishment will require more time and effort to explore. The entire industry chain of LoRa is relatively mature, and products are in a “ready to go” state, while many countries around the world are conducting or have completed nationwide network deployments.
2. Comparison of Bluetooth, WiFi, and ZigBee Protocols
Currently, the advantage of WiFi is its wide application, having reached thousands of households; ZigBee’s advantage is low power consumption and self-organizing networks; UWB’s advantage is transmission speed; and Bluetooth’s advantage is simple networking. However, these three technologies also have their shortcomings, and no single technology can fully meet all the requirements of smart homes.
The emergence of Bluetooth technology has made short-range wireless communication possible, but its complex protocol, high power consumption, and high costs make it less suitable for industrial control and home networks that require low cost and low power consumption. In particular, Bluetooth’s biggest obstacle is its limited transmission range, generally effective within about 10 meters, and issues such as weak anti-interference ability and information security are major factors restricting its further development and large-scale application.
WiFi is also a short-range wireless transmission technology that can connect to wireless signals at any time, with strong mobility, making it suitable for use in office and home environments. However, WiFi also has a fatal flaw. Since WiFi uses radio frequency technology to send and receive data through the air, data signals transmitted via radio waves are relatively susceptible to external interference.
ZigBee, on the other hand, is an internationally accepted wireless communication technology, with each network port capable of connecting to a maximum of 65,000 ports, making it suitable for use in homes, industries, agriculture, and various other fields, while Bluetooth and WiFi network ports can only connect to 10 ports, which clearly cannot meet household needs. ZigBee also has advantages in terms of low power consumption and low cost.
3. Comparison of MQTT Protocol and CoAP Protocol
MQTT is a many-to-many communication protocol used to transmit messages between different clients through an intermediary broker, decoupling producers from consumers by allowing clients to publish, letting the broker decide routing and copy messages. Although MQTT supports some persistence, it is still best used as a real-time data communication bus.
CoAP is primarily a point-to-point protocol used to transmit status information between clients and servers. Although it supports observing resources, CoAP is best suited for state transfer models rather than being fully event-based.
MQTT clients establish long TCP connections, which usually indicates no issues, while CoAP clients and servers send and receive UDP packets; in NAT environments, tunneling or port forwarding can be used to allow CoAP, or devices may need to initialize front-end connections first, as in LWM2M.
MQTT does not provide support for message type tagging or other metadata to help clients understand; MQTT messages can be used for any purpose, but all clients must know the upward data format to allow communication. CoAP, on the other hand, provides built-in support for content negotiation and discovery, allowing devices to probe each other to find ways to exchange data.
Both protocols have their pros and cons, and the choice of the right one depends on your application.
Source: Software New Vision, IoT Technology Stories
Scan the QR code to enter the IoT technology group

Comprehensive Guide to IoT Communication Protocols

Leave a Comment