Detailed explanation and selection suggestions for the Internet of Things communication protocol

Communication is very important for the Internet of Things. Whether it is short-range wireless transmission technology or mobile communication technology, even LPWAN affects the development of the Internet of Things. A communication protocol is a rule and convention that must be followed by an entity to complete a communication or service. So what communication protocols are there in the Internet of Things? How to choose a large number of agreements?

We divide IoT communication protocols into two categories, one is the access protocol, and the other is the communication protocol. The access protocol is generally responsible for the networking and communication between devices in the subnet (the article "Common Internet of Things Near Field Communication Technology Analysis" is described in detail); the communication protocol is mainly device communication running on the traditional Internet TCP/IP protocol. The agreement is responsible for data exchange and communication between devices via the Internet.

This article lists the Internet of Things protocols on the market, summarizing their respective characteristics, specific IoT application scenarios, and so on.

Detailed explanation and selection suggestions for the Internet of Things communication protocol

Problem space for IoT connection

The above picture shows the problem space of the IoT connection. The communication environment of the Internet of Things is Ethernet, Wi-Fi, RFID, NFC (Near Field Communication), Zigbee, 6LoWPAN (IPV6 low-speed wireless version), Bluetooth, GSM, GPRS, GPS. , 3G, 4G and other networks, and each communication application protocol has a certain scope of application. AMQP, JMS, and REST/HTTP all work on Ethernet. The COAP protocol is a protocol developed specifically for resource-constrained devices, and the compatibility between DDS and MQTT is much stronger.

In the Internet era, the TCP/IP protocol has been unified, and the communication architecture of the Internet of Things is now built on the traditional Internet infrastructure. In the current Internet communication protocol, the HTTP protocol has a low development cost and a high degree of openness, and it occupies almost half of the country. Therefore, many vendors develop the IoT system based on the http protocol. Including the google-led physic web project, it is expected to build the Internet of Things protocol standard based on traditional web technologies.

The HTTP protocol is a typical CS communication mode in which a client initiates a connection and requests XML or JSON data from the server. The protocol was originally applied to the web browsing scene and design of web browsers. It is widely used in PC, mobile phone, pad and other terminals, but it is not suitable for IoT scenarios. There are three major drawbacks in the IoT scenario:

1. It is difficult to actively push data to the device because the device must actively send data to the server. For a single data collection and other scenarios, it is barely applicable. However, for frequent control scenarios, the device can only be actively pulled by the device, and the cost and real-time performance are greatly reduced.

2. Security is not high. The insecurities of the web are well known to women and children. HTTP is a plain text protocol. In many IoT scenarios that require high security, if you do not do a lot of security preparations (such as using https), the consequences are unimaginable.

3. Unlike user interaction terminals such as PCs and mobile phones, devices in the IoT scenario are diversified. For devices with limited computing and storage resources, http protocol implementation and XML/JSON data format parsing are impossible. task.

REST/HTTP (loosely coupled service call)

REST (RepresentaTIonal State Transfer), which is a communication style developed based on the HTTP protocol, is not a standard at present;

Scope of application: REST/HTTP is mainly to simplify the system architecture in the Internet, to quickly achieve the loose coupling between the client and the server, and to reduce the interaction delay between the client and the server. Therefore, it is suitable for the application level of the Internet of Things, and the resources in the Internet of Things are opened by REST to realize that the service is called by other applications.

Features:

· REST refers to a set of architectural constraints and principles. An application or design that satisfies these constraints and principles is RESTful

· The interaction between the client and the server is stateless between requests

· On the server side, application state and functionality can be divided into various resources that are exposed to the client. Examples of resources are: application objects, database records, algorithms, and so on. Each resource uses a URI (Universal Resource IdenTIfier) ​​to get a unique address. All resources share a unified interface to transfer status between the client and server

· Use standard HTTP methods such as GET, PUT, POST, and DELETE

Comments: REST/HTTP is actually the Internet service in the API calling package style, IoT data collection to the Internet of Things application system, in the Internet of Things application system, you can open the REST API, open the data service, by the Internet Called by other applications.

CoAP protocol

· CoAP (Constrained ApplicaTIon Protocol), a restricted application protocol, applied to protocols in wireless sensor networks.

Scope: CoAP is a RESTful API that simplifies the HTTP protocol. CoAP is an application layer protocol in the 6LowPAN protocol stack, which is suitable for IP networks in resource-constrained communications.

Features:

Header Compression: CoAP consists of a compact binary header and an extended header. It has only a short 4B basic header, and the basic header is followed by an extended option. A typical request header is 10 to 20B.

Methods and URIs: In order to implement resources on the client access server, CoAP supports methods such as GET, PUT, POST, and DELETE. CoAP also supports URIs, which are the main features of the Web architecture.

The transport layer uses the UDP protocol: The CoAP protocol is built on top of the UDP protocol to reduce overhead and support multicast functions. It also supports a simple stop and wait reliability transfer mechanism.

Support for asynchronous communication: HTTP does not apply to M2M (Machine-to-Machine) communication, since transactions are always initiated by the client. The CoAP protocol supports asynchronous communication, which is a common sleep/wake mechanism for M2M communication applications.

Support for resource discovery: For autonomous discovery and use of resources, it supports built-in resource discovery formats for discovering resource lists on devices or for devices to advertise their own resources to service catalogs. It supports the format in RFC5785 and uses / in CoRE. The path of well-known/core represents the resource description.

Support for caching: The CoAP protocol supports caching of resource descriptions to optimize its performance.

The main implementation of the agreement:

· libcoap (C language implementation)

· Californium (java language implementation)

Comments: CoAP and 6LowPan, which are respectively the application layer protocol and the network adaptation layer protocol, the goal is to solve the communication requirements of the device directly connected to the IP network, that is, the application of IP technology to the device, the Internet and the device. Because IPV6 technology brings huge addressing space, not only solves the problem of identification of huge devices and resources in the future, applications on the Internet can directly access devices supporting IPV6 without additional gateways.

MQTT protocol (low bandwidth)

MQTT (Message Queuing Telemetry Transport), message queue telemetry transmission, instant messaging protocol developed by IBM, compared to the communication protocol suitable for IoT scenarios. The MQTT protocol adopts the publish/subscribe mode. All IoT terminals are connected to the cloud through TCP. The cloud manages the communication content of each device through the theme, and is responsible for forwarding messages between the device and the device.

MQTT considers the difference in computing performance of different devices when designing the protocol, so all protocols are coded in binary format, and the codec format is very easy to develop and implement. The smallest packet is only 2 bytes, which is also very adaptable for low-power and low-speed networks. There is a very complete QOS mechanism, which can select up to one, at least once, and just one message delivery mode according to the business scenario. It runs on top of the TCP protocol and supports the TLS (TCP+SSL) protocol. Since all data communication passes through the cloud, security is well protected.

Scope of application: Provide data transmission and monitoring of remote devices based on cloud platforms under low bandwidth and unreliable networks.

Features:

· Provide one-to-many message publishing using an agent-based publish/subscribe messaging model

· Provide network connectivity using TCP/IP

· Small transmission with low overhead (fixed length header is 2 bytes), protocol exchange is minimized to reduce network traffic

· Support QoS, there are three types of message publishing service quality: "at most once", "at least once", "only once"

The main implementation and application of the agreement:

· There are already protocol frameworks for multiple languages ​​such as PHP, JAVA, Python, C, C#, etc.

· An important part of IBM Bluemix is ​​its IoT FoundaTIon service, a cloud-based MQTT instance

· Mobile apps have long used MQTT, such as Facebook Messenger and com

Comments: MQTT protocol is generally applicable to device data collection to the end (Device-"Server, Device-"Gateway), centralized star network architecture (hub-and-spoke), not suitable for communication between devices and devices, device control capability is weak In addition, the real-time performance is poor, generally in the second level.

HSD LVDS Automotive High Frequency Connectors

Hsd Lvds Automotive High Frequency Connectors,Automotive High Frequency Connectors,12Pin Male Connecor For Cable,High Speed Connector For Cable

Dongguan Zhuoyuexin Automotive Electronics Co.,Ltd , https://www.zyx-fakra.com

This entry was posted in on