What is GPRS?
The full name of GPRS DTU is GPRS data transmission unit. Currently, there is no specific name in China, and there is no clear agreement. Some people also call it data transmission terminal, data collection terminal, etc. The function of GPRS DTU is a GPRS wireless device specially used to transmit serial port data through the GPRS network.
Quad Core Functionality of GPRS DTU
(1) Serial port data bidirectional conversion function
GPRS DTU provides serial communication interfaces, including RS485, RS232, RS422, etc. The above three serial ports are commonly used and common communication methods, and most DTU manufacturers on the market design serial port data as “transparent transmission”. User-friendly! (Transparent transmission: It can be understood that GPRS DTU converts the original data of the serial port into TCP/IP data packets for transmission without changing the original data communication content). Therefore, there is transparent transmission, which allows users to connect GPRS DTU to various user equipment using serial communication without making changes to the equipment.
(2) Internally integrated TCP/IP protocol stack
GPRS DTU internally encapsulates PPP dial-up protocol and TCP/IP protocol stack and has an embedded operating system. From a hardware level, GPRS DTU can be regarded as a combination of embedded PC and GPRS MODEM. GPRS DTU has GPRS dial-up Internet access and TCP/ IP data communications capabilities.
(3) Support parameter configuration to be saved permanently
As a communication device, its application range is very wide. In different application scenarios, the IP address and port number of the data center, and the baud rate of the serial port are different, so the basic function of GPRS DTU must support parameter configuration. , and the configured parameters need to be stored in the permanent memory inside the DTU. Once powered on, the DTU will work according to the configured parameters.
(4) Support automatic heartbeat and ensure permanent online
When the base station communicates with the device, if no information is sent for a long time, the device will disconnect from the base station. GPRS DTU basically has a heartbeat packet function. With the heartbeat packet function, the device can regularly send a signal to the base station to maintain activity and ensure that the device does not drop offline. It also has features such as automatic reconnection after disconnection and automatic redialing.
GPRS DTU extension function
Domestic manufacturers add different special functions to DTU. The following functions are introduced by Zongheng Intelligent Control;
(1) Point-to-point and point-to-many networking
Zongheng Intelligent Control’s GPRS DTU can realize point-to-point and point-to-many transmission through Zongheng Cloud. Like the digital radio function, it is suitable for some special application scenarios.
(2) Actively collect data
You can actively collect data from sensors and upload it to the server. Can save collector money.
How GPRS DTU works
The working principle of GPRS DTU is explained through a typical GPRS online monitoring system solution.
Online monitoring system structure diagram:
The user serial device at the on-site collection point (which can be various instruments/PLC/microcontroller/PC, etc.) is connected to the GPRS DTU terminal through the RS232 or RS485/RS422 interface. The data sent by the user serial device is processed by the internal embedded processing of the GPRS DTU terminal. The data is encapsulated by the network protocol and sent to the data center through the GPRS wireless network.
GPRS DTU working process description:
1. When the GPRS DTU is powered on, first read out the working parameters saved in the internal FLASH (including GPRS dialing parameters, serial port baud rate, data center IP address, etc., which have been configured in advance).
2. Log in to the GSM network with GPRS DTU, and then perform GPRS PPP dialing. After the dial-up is successful, the GPRS DTU will obtain an internal IP address randomly assigned by the mobile phone (usually 10.XXX). In other words, GPRS DTU is in the mobile intranet, and its intranet IP address is usually not fixed and changes with each dial-up. We can understand that the GPRS DTU is a device in the mobile internal LAN at this time, and communicates with the external Internet public network through the mobile gateway. This is similar to the way computers in a LAN access external networks through a gateway.
3. GPRS DTU actively initiates a communication connection with the data center and keeps the communication connection always present. Because GPRS DTU is in the mobile intranet, and the IP address is not fixed. Therefore, the GPRS DTU can only actively connect to the data center, but the data center cannot actively connect to the GPRS DTU. This requires the data center to have a fixed public IP address or a fixed domain name. The public IP address or fixed domain name of the data center is stored in the GPRS DTU as a parameter, so that once the GPRS DTU is powered on and dials successfully, it can actively connect to the data center.
Specifically, GPRS DTU initiates a TCP or UDP communication request to the data center through parameters such as the IP address of the data center (if the center domain name is used, the center IP address is first parsed through the center domain name) and port number. After getting the response from the center, GPRS DTU considers that the handshake with the center is successful, and then keeps the communication connection existing. If the communication connection is interrupted, GPRS DTU will immediately re-handshake with the center.
Since the TCP/UDP communication connection has been established, two-way data communication can be carried out.
4. For DTU, as long as two-way communication with the data center is established, it is relatively simple to complete the conversion of user serial port data and GPRS network data packets. Once the user’s serial port data is received, DTU immediately encapsulates the serial port data in a TCP/UDP packet and sends it to the data center. On the contrary, when DTU receives the TCP/UDP packet from the data center, it takes out the data content and immediately sends it to the user device through the serial port.
Through the wired data collection center, two-way communication is performed with many GPRS DTUs at the same time. This is currently the most commonly used method in GPRS DTU application systems.