0 Preface
With the continuous expansion of China's power grid, more and more transmission lines are becoming more and more complicated, which causes certain difficulties for the daily maintenance and repair of line transportation inspection personnel. Transmission line inspection personnel generally work in the field and need to use a navigation system to identify the path. When seeking rescue in a dangerous situation, they also need to transmit their location information to the monitoring center. At present, the commonly used handheld positioning system and vehicle-mounted positioning system can only realize the navigation on urban areas and main roads, and cannot meet the needs of transmission line operation inspection and navigation. The design of the transmission line operation inspection navigation system effectively solves the shortcomings of the current navigation system.
This article focuses on solving the data transmission problem of the transmission line operation inspection and navigation system, using GPRS technology combined with Linux operating system. Regarding the integration of the application of embedded technology and wireless mobile network technology, different research programs have emerged to achieve remote data transmission, and fully demonstrate its broad application fields and prospects.
1 Overall system design
The entire system consists of a handheld terminal and a remote server. The overall structure of the system is shown in Figure 1. The handheld terminal device communicates with the server of the monitoring center through the GPRS wireless network, so that when the monitoring center accesses the Internet network, it can receive data from the handheld terminal and display it on the large screen of the monitoring center.

The handheld terminal adopts ARM-Linux system. The core component of the system, the ARM (AdvancedRISC Machines) processor, is specifically designed for embedded devices. It is currently the first choice for constructing embedded system hardware platforms. ARM microprocessors using RISC (Reduced Instruction Set Computer) architecture are small and low in size. Features of power consumption, low cost and high performance. The publicly available source code of the Linux operating system has undergone numerous improvements, enhancements, and expansions in terms of performance, functions, driver development, and portability. The operating system code can be reduced, so the use of the embedded Linux operating system can greatly Improve the reliability of the system, give full play to the multi-task potential of the processor, improve development efficiency and shorten the development cycle.

2 System hardware implementation
The hardware structure of the handheld terminal is mainly divided into the following parts: ARM processor and its expansion interface, touch screen, power supply, GPS module, GPRS module, etc. The hardware platform of the handheld terminal is based on the S3C2410 controller. Other modules use its internal interface to assist the designed external circuit to complete the corresponding functions.
S3C2410 comes with a 3-channel UART, the serial port 2 used here is connected to the GPRS module, as shown in Figure 2. It can be seen from the figure that GPB6 ~ 8 replace the CTS, DCD and DTR handshake signals of serial port 2, so the original serial port 2 "DCD, DTR, CTS" signal operation place should be changed to the corresponding pair GPB6 ~ 8 â€operation; In addition, because the low pulse of at least 100 ms is given to the“ IGT â€pin of the MC35i module to start the MC35i module, and this pulse is generated by writing 0 and 1 to the -GPB9 pin by software Therefore, it is necessary to add the code generated by this pulse to the serial port initialization part of the driver to start the GPRS module.
The embedded Linux kernel version used by the system is 2.6.14, and the serial driver part is located in the kernel / driv-ers / serial and / kernel / drivers / char / directories of the ARM board kernel. The serial port initialization part is located in the /kernel/drivers/serial/serials3c2410.c file. Modify it as follows:

The handling of handshake signals is located in the /home/guoguo/kernel/drivers/char/serial.c file. The main functions that need to be modified are: check_modem_status (), get_modem_info (), block_TIl_ready (), line_info (), autoconfig () and other functions.
The above functions all involve the state of the read handshake signal to judge the operation, and the read handshake signal value is mainly realized by reading the value of the modem status register. In the kernel, the modem status register is defined as UART_MSR, UART_MSR 8 b, From high to low, each bit in turn represents the values ​​of DCD, RI, DSR, CTS, DDCD, TERI, DDSR, DCTS (high and low level), so these functions should be judged and processed on the status value of UART MSR. Before, the corresponding bit is assigned the correct value. This value is obtained from the corresponding GPIO pin.
3 System communication program
Under Linux, to complete the communication with the communication server attached to the Internet, you need to go through the GPRS module initialization and GPRS network connection before you can use TCP / IP protocol for data transmission.
GPRS module initialization program function: realize MC35i module initialization and complete the logical connection between MC35i and S3C2410. Within the program, the STB strobe signal is changed to a high level for a specified period of time, and then restored to a low level to complete the initialization of the MC35i, followed by the logical connection of S3 (22410 and MC35i through the relevant control signals. The initialization procedure can be completed directly from the Linux command line by executing the command In-smodigto.
GPRS network connection program function: Make Mc35i connect to GPRS network with a certain communication protocol. The network connection uses the software of the built-in PPP communication protocol provided by a third party, and the commands are as follows:
/ connect
When the connection is successful, because the GPRS network is connected to the Internet through the China Mobile Gateway, you can use the TCP / IP protocol to communicate with any IP address on the Internet.
Since the Linux operating system has a built-in TCP / IP protocol stack, you can directly use socket programming to implement TCP / IP data transmission. The basic mode of the socket is C / S (client / server), the device with the built-in GPRS module works in the client mode, and the communication server on the remote Internet network works in the server mode. The basic flow of the client program is: create a socket, bind the socket to a known port, then request a connection, and finally call the data sending and receiving function to send the data. Before the client communication program is executed, the server-side program must complete initialization and start listening.
The client program is as follows:


4 Software design of monitoring center
The monitoring center program is responsible for the display of the entire work area screen, the drawing and management of special area divisions, and the tracking of all transportation and inspection personnel. According to the special division of the power department for each working area, it is displayed in different colors to facilitate the monitoring and management of the monitoring personnel.
The monitoring center software uses MapXMobile control to realize the basic functions of GIS, and uses Microsoft's visual development environment VC as the development platform for secondary development.
The handheld terminal system is bound to the target host (host computer server) IP address and a certain port (this system is set to 5200) through a binding operation, and data exchange is performed through TCP. Using the method of network programming, the monitoring center software can read the data received by port 5200 and display it on the monitoring screen in real time, so as to realize the position monitoring.
At present, the widely used electronic maps of monitoring centers can only display maps of urban areas and main roads of major cities, and cannot display electronic maps below the county level. This system draws electronic maps below the county level, thereby realizing the inspection of transmission lines. Effective monitoring of location.
The main innovations of the software map of the monitoring center are:
The display of the roads below the county level is mainly based on the collected map data, combined with SQL database or MSACCESS database, and drawn with VC as the development platform;
The recording and playback of the path trajectory uses the functions in the GIS control to realize the playback of the path trajectory through the operation of the path trajectory data in the database.
5 Conclusion
The study designed a data communication system based on Linux and GPRS, and introduced the hardware composition of the data communication system, the hardware connection scheme and the modification of the serial port driver, and listed the software implementation methods. This study also combined with the application of the system in the transmission line operation inspection navigation system, expounded the composition, function and characteristics of the system.
The system has obvious network function advantages in scientific research and practical applications. In the case of transmission line operation inspection, when the operation team is relatively fixed, the system eliminates the need for the operation team to lead the way during the annual overhaul and fault repair of the line, saving manpower and improving efficiency; at the same time, the monitoring center can Real-time monitoring of the location of maintenance personnel.
The speed and real-time nature of GPRS data transmission can meet the needs of transmitting positioning data, and can directly transmit data with the Internet, and the application is flexible and convenient. Test results show that the system can achieve reliable transmission of signals. However, the system needs to be further improved on the confidentiality of confidential data transmission.
Pcb Fuse,Fuse Holder Pcb Mount,Circuit Board Fuse Holder,Blade Fuse Holder Pcb Mount
Dongguan Andu Electronic Co., Ltd. , https://www.idofuseholder.com