Understanding Key Communication Protocols in IoT Development

As the number of Internet of Things (IoT) devices continues to grow, the communication and connection between these devices has become an important topic of consideration. Communication is essential and critical for IoT, whether it involves short-range wireless transmission technologies or mobile communication technologies, all of which impact the development of IoT. Among these, communication protocols are particularly important, as they are the rules and agreements that both parties must follow to complete communication or services.

Understanding Key Communication Protocols in IoT Development

This article introduces several available IoT communication protocols, each with different performance, data rates, coverage, power consumption, and memory requirements. Each protocol has its own advantages and disadvantages. Some communication protocols are suitable only for small household appliances, while others can be used for large smart city projects. IoT communication protocols can be divided into two main categories:

  • One category is access protocols: generally responsible for networking and communication between devices within a subnet.

  • The other category is communication protocols: primarily device communication protocols that operate on traditional Internet TCP/IP protocols, responsible for data exchange and communication between devices over the Internet.

Understanding Key Communication Protocols in IoT Development

Physical Layer and Data Link Layer Protocols1. Long-Distance Cellular Communication(1) 2G/3G/4G Communication Protocols refer to the second, third, and fourth generation mobile communication system protocols.(2) NB-IoTNarrowband Internet of Things (NB-IoT) has become an important branch of the Internet of Everything. NB-IoT is built on cellular networks, consuming approximately 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 low-power wide-area (LPWA) IoT markets and is an emerging technology that can be widely applied globally. It features wide coverage, multiple connections, fast rates, low costs, low power consumption, and excellent architecture.Application scenarios: NB-IoT networks enable applications such as smart parking, smart firefighting, smart water management, smart street lighting, shared bicycles, and smart appliances.(3) 5GThe fifth generation mobile communication technology, which is 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 massive device connectivity.Understanding Key Communication Protocols in IoT DevelopmentImage generated by AIApplication scenarios: AR/VR, Internet of Vehicles, 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) WiFiDue to the rapid proliferation 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 eliminate the need for additional gateways, and compared to Bluetooth, 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 potential of commercial WiFi applications.(2) ZigBeeZigBee is a low-speed, short-range wireless communication protocol that is a highly reliable wireless data transmission network. Its main features include low speed, low power consumption, low cost, support for a large number of online nodes, support for various online topologies, low complexity, speed, reliability, and security. ZigBee technology is a new technology that has recently emerged, primarily relying 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 a mainstream technology in the IoT industry, with large-scale applications in industrial, agricultural, and smart home fields.(3) LoRaLoRa™ (Long Range) is a modulation technology that provides longer communication distances compared to similar technologies. LoRa gateways, smoke detectors, water monitoring, infrared detection, positioning, and power strips are widely used IoT products. As a narrowband wireless technology, LoRa uses time-of-arrival differences to achieve geographic positioning. Application scenarios for LoRa positioning include smart cities and traffic monitoring, metering and logistics, and agricultural positioning monitoring.3. Short-Distance Communication(1) RFIDRadio Frequency Identification (RFID) is the abbreviation for Radio Frequency Identification. Its principle involves non-contact data communication between a reader and a tag to achieve target identification. 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) NFCNFC stands for Near Field Communication technology. NFC is developed based on non-contact radio frequency identification (RFID) technology, combined with wireless interconnection technology, providing a very secure and fast communication method for various electronic products that are becoming increasingly popular in our daily lives. The term “near field” in NFC refers to the electromagnetic field of nearby radio waves.Application scenarios: Used in access control, attendance, visitor management, conference sign-in, patrolling, etc. NFC has functions for human-machine interaction and machine-to-machine interaction.(3) BluetoothBluetooth 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 numerous 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) USBUSB, which stands for Universal Serial Bus, is an external bus standard used to define the connection and communication between computers and external devices. It is an interface technology applied in the PC field.(2) Serial Communication ProtocolThe serial communication protocol specifies the content of data packets, which includes start bits, main data, check bits, and stop bits. Both parties need to agree on a consistent data packet format to send and receive data normally. Common protocols in serial communication include RS-232, RS-422, and RS-485.Serial communication refers to a communication method where data is transmitted bit by bit between peripherals and computers through data lines. This communication method uses fewer data lines, saving communication costs in long-distance communication, but its transmission speed is lower than parallel transmission. Most computers (excluding laptops) contain two RS-232 serial ports. Serial communication is also a commonly used communication protocol for instruments and equipment.(3) EthernetEthernet is a computer local area network technology. The IEEE organization has established the IEEE 802.3 standard, which defines the technical standards for Ethernet, including the physical layer wiring, electronic signals, and media access layer protocols.(4) MBusMBus remote meter reading system (symphonic mbus) is a European standard two-wire bus primarily used for consumption measurement instruments such as heat meters and water meters.Network Layer and Transport Protocols1. IPv4The fourth version of the Internet Protocol is the fourth revision in the development process of the Internet protocol and 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. IPv6The sixth version of the Internet Protocol, which addresses the major issue of limited network address resources in IPv4, severely restricting 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 multiple access devices to the Internet.3. TCPThe 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 architecture 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. 6LoWPAN6LoWPAN is a low-power wireless personal area network standard based on IPv6, specifically IPv6 over IEEE 802.15.4.Application Layer Protocols1. MQTT ProtocolMQTT (Message Queue Telemetry Transport) is a telemetry transport protocol that provides two messaging modes: publish/subscribe, which is 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 transport protocol for the Internet of Things (IoT).In many cases, including constrained environments such as machine-to-machine (M2M) communication and IoT. It has been widely used in satellite link communication sensors, occasionally dial-up medical devices, smart homes, and some miniaturized devices.2. CoAP ProtocolCoAP (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. Servers may not respond to unsupported types.3. REST/HTTP ProtocolRESTful is a resource-based software architectural style. 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 ProtocolDDS (Data Distribution Service) is a middleware protocol for distributed real-time data distribution service, serving as the “TCP/IP” in real-time networks, solving the interconnection of network protocols in real-time networks, functioning as a “bus on the bus.”5. AMQP ProtocolAMQP, or Advanced Message Queuing Protocol, is an open standard for application layer protocols that provides unified messaging services, designed for message-oriented middleware. Clients based on this protocol can exchange messages with message middleware without being restricted by different products or development languages. Implementations in Erlang include RabbitMQ, among others.6. XMPP ProtocolXMPP is a protocol based on a subset of the standard generalized markup language XML, inheriting the flexibility of development in XML environments. Therefore, applications based on XMPP have strong scalability. After expansion, XMPP can handle user needs by sending extended information and establish applications such as content publishing systems and address-based services on top of XMPP.Comparison of Some Communication Protocols1. Comparison of NB-IoT and LoRa Protocols

Understanding Key Communication Protocols in IoT Development

First, frequency bands. LoRa operates in unlicensed frequency bands below 1GHz, requiring no additional fees for use, while NB-IoT and cellular communication use licensed frequency bands below 1GHz, which incur costs.Second, battery life. LoRa modules have unique characteristics in handling interference, network overlap, and scalability, but cannot provide the same quality of service as cellular protocols. Due to quality of service considerations, NB-IoT cannot offer battery life similar to LoRa.Third, device costs. For terminal nodes, the LoRa protocol is simpler, easier to develop, and has better applicability and compatibility with microprocessors compared to NB-IoT. Additionally, low-cost, relatively mature LoRa modules are already available in the market, with upgraded versions expected to be released continuously.Fourth, network coverage and deployment timelines. The NB-IoT standard was announced in 2016, and aside from network deployment, the corresponding commercialization and establishment of the industry chain require more time and effort to explore. The entire industry chain for LoRa is relatively mature, and products are in a “ready to launch” state, with many countries globally conducting or completing nationwide network deployments.2. Comparison of Bluetooth, WiFi, and ZigBee Protocols

Understanding Key Communication Protocols in IoT Development

Currently, WiFi’s advantage is its widespread application, having become common in 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 are not well-suited for industrial control and home networks that require low cost and low power consumption. In particular, Bluetooth’s greatest obstacle is its limited transmission range, generally effective within about 10 meters, and issues such as weak anti-interference capability and information security concerns 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, offering strong mobility, making it suitable for use in office and home environments. However, WiFi has a fatal flaw. Since WiFi uses radio frequency technology to send and receive data through the air, it is relatively susceptible to external interference.ZigBee, on the other hand, is an internationally accepted wireless communication technology, with each network port capable of connecting up to 65,000 ports, making it suitable for use in various fields such as home, industrial, and agricultural applications, while Bluetooth and WiFi can only connect 10 ports, which clearly cannot meet household needs. ZigBee also has advantages in low power consumption and low cost.3. Comparison of MQTT and CoAP ProtocolsMQTT is a many-to-many communication protocol used to transmit messages between different clients through an intermediary broker, decoupling producers and consumers by allowing clients to publish and letting the broker decide the routing and copy messages. Although MQTT supports some persistence, it is best used as a real-time data communication bus.CoAP is primarily a point-to-point protocol used to transmit state information between clients and servers. While it supports resource observation, CoAP is best suited for state transfer models, not fully event-based.MQTT clients establish long TCP connections, which usually indicate 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 data format to allow communication. In contrast, CoAP 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 advantages and disadvantages, and the choice depends on the specific application.

Disclaimer: The images and text in this article are sourced from the internet, and the copyright belongs to the original authors and sources. They are provided for learning and reference purposes only. If there are any errors in source attribution or if your rights or those of the original authors are infringed, please inform us, and we will delete them immediately. Thank you!

Leave a Comment