To achieve communication between devices and cloud platforms, it is necessary to first ensure that the devices can connect to the internet, which involves enabling the devices to access the internet, either directly or through a gateway.
Next, we will introduce several common networking methods used by devices.
WiFi
Through a WiFi chip or module, devices can connect to a WiFi hotspot (AP), which is typically a router that can also access the internet or a private network, allowing the device to directly establish communication with the cloud platform using TCP/IP protocols.
It is worth noting that WiFi and the following networking methods all belong to link layer communication protocols, which establish communication channels between devices and cloud platforms. The data communication protocols above these channels, referred to as access protocols mentioned later, can have multiple options, such asMQTT,HTTP,TCP, etc., which will be introduced in the following text.
Ethernet
The method of accessing the internet through Ethernet is very common, just like traditional PCs accessing the internet through a router via a network cable. Ethernet supports transmission rates of 10M/100M/1000M, achieves network interconnection through IP routing, and the final rate is limited by the slowest switching node in the entire link.
In some industrial scenarios or smart buildings, devices use Ethernet more frequently.
Cellular Network
Cellular networks are provided by operators, and devices use corresponding networks by integrating communication modules. Currently, the following cellular networks are mainly used in China.
2G/3G
2G/3G are relatively low-speed data service networks with relatively low module costs, suitable for use in scenarios with small data volumes. Due to the popularity of 4G, 2G/3G will face the moment of network retirement in the future, so the selection of equipment needs to consider the requirements of service life.
4G
4G is currently a widely used cellular network. In addition to the CAT-4 standard, which can provide high-bandwidth data communication, there is also the CAT-1 standard, which is currently more suitable for the Internet of Things (IoT), with relatively low costs and superior speed and reliability compared to 2G/3G. It is the choice for most devices to connect to the internet.
5G
5G has advantages such as high speed, low latency, and high connection density, making it particularly suitable for real-time communication among a large number of device nodes in some scenarios, such as industrial IoT and smart transportation.
NB-IoT
NB-IoT is a narrowband internet provided by operators based on existing cellular networks. Domestic operators including China Telecom, China Mobile, and China Unicom all provide NB-IoT network services.
NB-IoT has wide coverage, low transmission rate, and low energy consumption, making it very suitable for scenarios with small data volume, non-real-time communication, and low power consumption, such as smart meter reading and outdoor data collection.
Through the gateway
, the above networking methods all integrate communication modules on the device, enabling the device itself to achieve direct networking. In addition, devices can also access the cloud platform through a gateway.
The concept of a gateway is relatively broad. In a broad sense, its purpose is to package and forward data, converting one data encapsulation format into another, allowing data to traverse various communication pipelines. Therefore, a gateway essentially plays a "transit" role.
In the Internet of Things (IoT), the role of a gateway is to connect devices that cannot directly connect to the cloud platform to the cloud platform through the gateway's intermediation. The gateway functions as a data forwarder and protocol converter.
In addition to its communication relay function, the gateway also plays another important role, which is edge computing at the business layer, including operation and maintenance management, linkage control, data caching, etc. for devices.
Any hardware or software that achieves the above functions can be called a gateway.
Those devices connected to the gateway are also referred to as sub-devices. So, what are the connection methods and communication protocols between sub-devices and gateways? There are many connection methods, including wired methods such as UART, USB, I2C, SPI, RS485, RS232, CAN, PROFIBUS, Ethernet, and various industrial protocols, as well as wireless methods such as WiFi, Bluetooth, Zigbee, LoRa, and other wireless communications.
These are all link layer communication protocols. On top of that, we need to know the data format of message packets and what they represent. We also need application layer communication protocols, such as Modbus, BACnet, and some industrial-grade national standard protocols.
The networking methods between the gateway and the cloud platform also apply to the above-mentioned networking methods.
Therefore, there are gateways that support several specific protocols, such as a 4G gateway supporting RS485/Modbus sub-devices for industrial data collection and a WiFi gateway supporting Zigbee sub-devices for smart home environment monitoring.
Modbus IoT Cloud Platform provides developers with gateway hardware and software supporting various protocols in collaboration with partners, providing comprehensive support for industry solutions.
Through DTU
DTU is short for Data Transfer Unit, which is a typical gateway product. Its characteristic lies in its fast configuration capability for users, and some DTUs also support programmability. DTU will be applied to more IoT scenarios and become a ready-to-use hardware gateway.
DTU also utilizes the aforementioned common networking methods, and the most common way for DTU to connect to a cloud platform isMQTTAndTCPIn this context, the TCP method primarily employs a transparent transmission approach, where the DTU encapsulates messages sent from the sub-device directly into TCP/IP message packets without any business layer processing, and forwards them to the cloud platform. Conversely, it also forwards data packets issued by the cloud platform to the sub-device after processing at the link protocol layer.
When accessing the Modbus IoT cloud platform via a DTU, programming knowledge is not required. Instead, it primarily involves setting up cloud platform access parameters and communication parameters with the sub-device through a configuration interface.
Leave a Reply