Share this

Implementation of DTU in a GPRS-based monitoring system

2026-04-06 08:39:56 · · #1
I. Introduction With the development of computer and network technologies, wired Ethernet based on the TCP/IP protocol has ushered in a new era for industrial monitoring networks. This is because wired Ethernet based on the TCP/IP protocol offers higher communication bandwidth compared to previous industrial control networks, meeting the ever-increasing needs of data communication. However, for industrial sites characterized by dispersed work locations, harsh environments, and remote monitoring, especially in situations involving sudden, small-volume data transmissions, wired connections are clearly no longer suitable as a communication medium. This has rapidly driven the development of wireless communication technology in the field of industrial control. The emergence of GPRS (General Packet Radio System) has made it possible to build low-cost wireless industrial monitoring networks. GPRS is a standardized packet-switched data service built on top of the traditional GSM network, providing end-to-end wide-area wireless IP links. Because GPRS uses packet switching technology, it does not require establishing and holding circuits during communication, and features extremely short call setup times, real-time online connectivity, pay-per-use pricing, and large coverage areas. In remote, bursty data transmission, it has unparalleled advantages over wired networks. Furthermore, monitoring networks built using high-power, dedicated telecommunications lines, or satellite communication methods are very expensive, making them practically infeasible, especially for large-scale, distributed remote monitoring systems. Industrial remote monitoring systems built using GPRS, however, have a construction cost (roughly estimated) of only one-tenth that of wired networks, and their operating costs are also very low. Due to these advantages, GPRS-based monitoring systems are becoming a hot topic. II. Construction of a GPRS Monitoring System The design of the GPRS DTU (Data Transmission Unit), a crucial component of the monitoring system, is particularly important, as the system's stability and reliability depend on the GPRS DTU. Currently, many companies both domestically and internationally have developed GPRS-based monitoring systems where the GPRS DTU only implements the TCP/IP protocol, with all communication handled by the monitoring host. This model is feasible on wired networks, but unsuitable for wireless networks due to the numerous anomalies that should be addressed in the underlying protocols. Through analysis and research on currently developed products and the transmission characteristics of GPRS networks, we propose a practical and easily implemented GPRS-based monitoring system (as shown in Figure 1). This system consists of a GPRS DTU, a GPRS AS (Access Server), a monitoring host, a data backup server, and a Sina Mail Server. The monitoring host and the GPRS AS are interconnected via a 100M/100M Ethernet connection, continuously exchanging their respective load information and various dynamic tables. The GPRS AS is the communication center of the entire monitoring system, responsible for remote access to the device group (this article mainly discusses the implementation of the GPRS DTU; the implementation of the GPRS AS is not discussed here). The hardware and software implementation of the GPRS DTU are detailed below. III. Hardware Implementation of the GPRS DTU In this system, the hardware block diagram of the GPRS DTU is shown in Figure 2. The main hardware chips are: the CPU uses an ARM S3CA510B, and the communication module uses an MC35 (Siemens GPRS Modem). The ARM chip S3CA510B connects to the GPRS communication module MC35 via an RS232 serial port. The ARM chip completes the initialization and data transmission/reception functions of the MC35 module; simultaneously, it expands the MMX232 standard serial port to exchange data with the microcontroller unit (MCU). The S3CA510B is a cost-effective 16/32-bit RISC microcontroller manufactured by Samsung for Ethernet applications. It incorporates a 16/32-bit ARM7TDMI RISC processor designed by ARM. The low-power, high-performance 16/32-bit ARM7TDMI core is ideal for price- and power-sensitive applications such as industrial control, mobile phones, and embedded systems. The MC35 is a GPRS wireless communication module manufactured by Siemens, supporting dual-band EGSM900 and GSM1800 (GSM Phase 2+), voice, data, SMS (Short Message Service), and FAX (Fax). During GPRS data transmission, the operating current is only 360mA, and the idle current is 15mA. Data upload speeds reach 21.4Kbps, and download speeds are as high as 85.6Kbps. Users can interact with the MC35 via AT commands, and the MC35 connects to the user via an RS232 bidirectional serial channel. The main advantages of the MC35 are permanent online connectivity, fast data storage, and faster data transmission speeds. The system ROM uses a 16Mbit HY29LV160 chip to construct a 16-bit Flash memory chip, with a storage capacity of 2MB, which is sufficient for our system. The Flash memory stores program code; instructions are fetched from it after power-on or reset and execution begins. Therefore, the Flash memory containing the program code is configured in ROM/SRAM/FLASH Bank 0, that is, the nRCS<0> (pin 75) of the S3CA510B is connected to the CE# terminal of the HY29LV-160. The system uses a 32-bit SDRAM memory system, that is, two HY57V641620 chips are used to construct a 32-bit RAM storage system, with a single chip capacity of 8MB. This fully utilizes the data processing capabilities of the 32-bit CPU, meeting the requirements of embedded operating systems and various relatively complex algorithms. IV. Software Implementation of the GPRS DTU The software implementation of the GPRS DTU consists of an operating system, TCP/IP protocol, PPP protocol, and some application software. (I) Application Software: This part is usually closely related to the MCU (Microcontroller Unit), mainly controlling the MCU to perform data acquisition or related operations. (II) Operating System: The operating system uses the open-source uC/OS-II. uC/OS-II uses C and assembly language, with the majority being C, resulting in a simple structure. It also has excellent portability, having been successfully ported to ARM chips. During the porting process, only the parts related to the operating system need to be modified. (III) TCP/IP Protocol: The GPRS core network is based on IP technology. Therefore, the DTU of the GPRS-based monitoring system needs to use the TCP/IP protocol to frame and deframe GPRS service data, and ensure secure and reliable data transmission over the network. In this design, the TCP/IP protocol used is 1wip, an open-source TCP/IP protocol stack developed by Adam Dunkels et al. of the Swiss Academy of Computer Science for embedded systems. 1wip supports IP forwarding under multiple network interfaces, ICMP protocol, PPP protocol, DHCP protocol, and dynamic IP address allocation. In lwip, all TCP/IP protocols reside within a single process (for uC/OS II, a process is a system task). This separates the TCP/IP protocol stack from the kernel, freeing it from dependence on a specific operating system kernel, which facilitates portability of the protocol stack across different operating systems. The reason for placing all TCP/IP protocols within a single process is also to reduce the number of task switches (if each layer of the protocol were a separate process, multiple task switches would be required when receiving a TCP segment, which is very time-consuming). Below is a code example for creating a new TCP/IP-related process: #define LWIP-STK-SIZE 10*1024 // Stack size for TCP/IP-related tasks #define LWIP-TASK-MAX 5 // Maximum number of TCP/IP-related tasks #define LWIP-START-PRIO 5 // Starting priority for TCP/IP-related tasks OS-STK LWIP-TASK-STK[LWIP-TASK-MAX] [LWIP-STK-SIZE]; // Stack area for TCP/IP-related tasks 0 u8-t curr-prio-offset: sys-thread-t; sys-systhread-new(void(*function)(void*arg), void*arg, int prio) {//omitted} (IV) The PPP protocol part of the business data is encapsulated into TCP packets or UDP packets according to the TCP or UDP format, and then encapsulated into IP datagrams by adding IP headers and trailers. Since the communication between the processor and the wireless communication module follows the PPP (Point-to-Point Protocol), IP datagrams need to be encapsulated into PPP frames according to the PPP frame format before they can be transmitted to the wireless communication module via the serial port. The PPP protocol consists of three components: 1. A method for compressing multi-protocol self-addressed data packets. 2. LCP (Link Control Protocol) used to establish, configure, and test data link connections. 3. A family of NCPs (Network Control Protocols) used to establish and configure different network layer protocols. In addition, specific PAP (Password Authentication Protocol) and IPCP (Internet Protocol Control Protocol) protocols are also involved. For the DTU to establish a connection with an external network, it must first attach to the GPRS network and then initiate a PDP (Packet Data Protocol) context activation process. Only through this process can the DTU establish a logical path with the GGSN (Gateway GPRS Support Node) and establish a connection with the external network, thus enabling data transmission in IP packet form. The packet protocol context activation process is as follows: (1) The system sends an AT command to the wireless communication module to request the establishment of a connection. The command includes the APN (Access Point Name) that the system wants to connect to; (2) The system sends a PPP LCP frame to the wireless module. The configuration options of this LCP frame tell the wireless communication module that the protocol it wants to authenticate is PAP (Password Authentication Protoc01) (set to C023 in the configuration) and not CHAP (Challenge Handshake Authentication Protoc01) (set to C223 in the configuration options); (3) The system starts PAP authentication. After successful authentication, the wireless communication module will respond to the system, indicating that it recognizes its identity and will store the user ID and password; (4) The system sends an NCP-IPCP configuration request message to the wireless module. The IP address in the frame is empty, indicating that it requests dynamic allocation of an IP address; (5) The wireless module sends a request message to the SGSN to activate the PDP context; the GPRS network dynamically allocates an IP address after authentication; the SGSN sends an activation PDP context acceptance message to the wireless module; (6) The wireless module sends an NCP-IPCP configuration response frame to the system. The response frame contains the dynamically assigned IP address. At this point, the PDP context activation process is complete, and the data channel between the DTU and the external data network is established. The PDP context activation process is shown in Figure (3): (V) Program Flowchart This DTU adopts the uC/OS-II+lwip+PPP scheme. The program flowchart is shown in Figure (4). After power-on, hardware initialization is performed first, then the operating system is initialized, then the system file is configured, tasks are created, and the network (TCP/IP, PPP) is initialized and multi-task scheduling is started; LCP packets are sent through PPP to set and test the data link and connect with the MC35 module; then, PAP authentication is performed; after passing, NCP packets are sent through PPP to select and set one or more network layer protocols. Once the protocols are set, the GPRS DTU can send data. A task created by the DTU sends a short message to the GPRS AS to report its IP address. Once the GPRS AS obtains the DTU's IP address, it can communicate with the DTU, thus establishing a GPRS-based monitoring system. V. Conclusion This paper proposes a relatively practical GPRS-based monitoring system and provides a complete solution for the software and hardware implementation of its DTU. With the further improvement of the GPRS network, the system's advantages will be better demonstrated, enabling its widespread application in fields such as remote monitoring of power systems in the power sector, unmanned power stations, and electricity meter reading; hydrological data collection, river monitoring, and remote environmental monitoring in the water conservancy and hydropower sector; data acquisition at field operation points and remote-controlled robots in the industrial control sector; and remote unmanned equipment room monitoring and remote maintenance in the communications sector.
Read next

CATDOLL 148CM Christina Silicone Doll

Height: 148 Silicone Weight: 33kg Shoulder Width: 34cm Bust/Waist/Hip: 70/58/82cm Oral Depth: N/A Vaginal Depth: 3-15cm...

Articles 2026-02-22