Share this

Embedded remote test control technology

2026-04-06 05:57:49 · · #1
Preface: Traditional communication equipment testing and repair methods, primarily relying on mail or local repair, have become increasingly inadequate due to drawbacks in terms of manpower, time, cost, and efficiency. With the rapid development of communication testing and network technologies, transmitting test results of faulty equipment locally to a remote location via the internet for diagnosis by remote experts can fully leverage the advantages of both approaches, significantly improving repair efficiency, shortening repair cycles, and saving repair costs—a challenge to conventional repair models. This solution is relatively clear and easy to understand, and its implementation is straightforward. The remote control method discussed in this paper is proposed to address this problem. 1. Overall Solution This application adds a network interface module to the testing instrument, using the internet as the transmission platform. Remote control and diagnostic functions are achieved by connecting to a diagnostic PC at a remote location. Its block diagram is shown in Figure 1. [IMG=Remote Control and Diagnostic Function Block Diagram]/uploadpic/THESIS/2007/12/20071207113528637366.jpg[/IMG] Diagnostic experts can send instructions to remote testers via the Internet on the diagnostic PC. The testers receive the instructions and complete the automatic testing of the faulty equipment according to the instructions. The test data is transmitted back to the diagnostic PC via the network, establishing a data real-time interactive transmission platform [1]. 2 Basic Principles 2.1 Basic Structure and Characteristics of the Internet Remote monitoring and diagnosis of equipment is a new equipment fault diagnosis mode that combines computer science, communication technology and fault diagnosis technology. TCP/IP is the most successful communication protocol to date. The protocol is divided into 4 layers, from top to bottom: application layer, transport layer, network layer and link layer. This application uses the EM2000 network module. The more complex protocols of the bottom 3 layers have been solidified in its ASIC, which can realize transparent data communication. Thus, the research work mainly focuses on the design and functional implementation of the application layer. This includes defining data frames at the transport layer, defining exchanged data, designing application functions, and designing the human-computer interface. This application uses the EM2000 gateway, a device used to establish data connections and perform protocol conversion between embedded systems and the internet. On one hand, the PC-side network application packages application-layer data into IP packets for transmission over the network. The EM2000 identifies and parses these data packets, forwarding the raw application-layer data to the RS-232 interface. On the other hand, the EM2000 also encapsulates data from the RS-232 interface into IP packets and transmits them to the PC-side network application. It supports both transparent transmission and simple protocol modes. The EM2002 gateway has a WWW interface in its network interface section, allowing users to configure and manage the EM2002 and serial devices over the network via a browser. Its specific location in the network is shown in Figure 2. [IMG=Specific location map in the network]/uploadpic/THESIS/2007/12/2007120711353870432S.jpg[/IMG] 2.2 Definition of transmission frame The following mainly considers the specific use of the 4th layer application layer, namely the frame format and specific definition of data transmission. According to the status and display function of this test equipment, its format can be designed into two categories, namely test data frame and command control frame. The design of the format should enable the seamless communication of information between the system ends, be easy to identify and judge, and at the same time, ensure the reliability of transmission and take into account the information utilization rate. For this system, after actual information interaction statistics, it is determined to use a length of one byte, that is, 256 states. (1) Frame type definition The definition of the transmission frame format is shown in Table 1. The 7th bit is the type definition bit, "1" indicates a data frame; "0" indicates a command control frame. [IMG=Frame Type]/uploadpic/THESIS/2007/12/2007120711354565999Q.jpg[/IMG] (2) Data Frame The definition of the data frame format is shown in Table 2, which is mainly used to transmit the detection data results. The number of bytes of the data frame is set according to the number of channels to be detected and the detection items. This system sets 8 data channels, 8 test items and 2 parameters: "normal" / "fault". [IMG=Data Frame]/uploadpic/THESIS/2007/12/2007120711355147805T.jpg[/IMG] For the data frame, considering the number of test channels and test items of this device, and taking into account the speed and complexity of processing, the channel number range is finally determined to be 0 to 7, occupying the 6th to 4th bits of the data frame, represented in binary, with the high bit first and the low bit last; the test item range is 0 to 7, occupying the 3rd to 1st bits of the data frame, and the representation method is the same as above (as needed, when expanding the capacity in the future, the number of bytes can be increased appropriately). The last bit of the data frame is defined as the test result, "0" indicates that it is correct and "1" indicates that there is a fault. The usual check bit is not used here, mainly because the communication rate is low and the reliability of network transmission is currently very high, so this aspect can be ignored to improve processing efficiency and simplify the difficulty of program writing. (3) Command Control Frame The format definition of the command control frame is shown in Table 3. The highest bit of the byte is fixed at "0", mainly used to transmit control commands and device status information between the test terminal and the remote diagnostic terminal. [IMG=Command Control Frame]/uploadpic/THESIS/2007/12/2007120711355936649A.jpg[/IMG] Command control frames can be divided into two types according to the transmission direction: command control words and status representation words. For command control words, bits 6 to 4 are "101", which are command identification bits; the last 4 bits are command codes, indicating different types of test processes. The test platform will automatically return the corresponding information, with the frame format being bits 6 to 4 being "001", which are information data identification bits, and the remaining bits defining different types. For hardware reset commands, the test terminal returns 1EH; link detection returns 1FH. 3 Specific Implementation 3.1 Network Interface Design Embedded systems, like microcomputer systems, must be converted through the TCP/IP protocol to access the Internet. The design of data communication here is mainly reflected in the design of the serial port [2]. The data of the MCU can be sent or received through the serial interface connected to the conversion chip in a predefined format. In the design, as long as the serial port of the MCU and the exchange rate of the EM2000 gateway are matched, the data can be sent and received word by word in byte mode. In addition, the interface level of the EM2000 gateway is compatible with TTL, which eliminates the need for level conversion circuit, making the design easier to implement. 3.2 Software design of MCU The embedded MCU system software is mainly written by MCS-51 assembler. In order to realize the synchronous operation of local keyboard control and remote control, some software needs to be rewritten. It mainly includes the initialization program, scanning program, execution program, serial port interrupt call program, protocol translation program, etc. (1) Special requirements for memory unit initialization As we all know, the test main program first initializes the variables used by the system, including the pointer setting of the stack bottom, the initial value setting of registers and status words, the initial setting of serial port mode/status words, etc., but here, due to the special circumstances of remote communication, there are special requirements. Although some memory cells have been set from power-on to reset completion, they still need to be set again. This is mainly because during platform operation, each register and memory cell will have new values ​​stored continuously. In this way, when a remote reset operation is performed, the values ​​of some memory cells will not be automatically reset. If the original program is executed, an uncertain problem will occur. To ensure the consistency and controllability of the memory cell contents, it is essential to initialize the register space. (2) Communication mechanism between subroutines When handling keyboard control and remote control synchronous operation, the embedded real-time operating system often uses the mailbox query method. First, the scanning and debouncing program [3] is responsible for scanning the keyboard operation. After eliminating the jitter and interference, the keyboard value is put into 35H and a "keyboard action event" message is sent to the mailbox. At the same time, the serial communication program continuously scans the port data. If it is determined that there is command data injection, the command value is put into 36H and sent to the mailbox. The system sends out emails indicating "serial port command event has occurred." By querying the main program's mailbox, if an email is found, it is translated into executable code to schedule device actions and process related information. 3.3 TCP/IP Port Configuration A TCP/IP port is essentially a standard network device connected to the Internet, possessing a unique globally identifiable MAC address, allowing access to any network segment without restriction. When configuring network parameters, as long as the network IPs and routes of both communicating parties are known, network connection can be easily established. This module sets up a 1-byte buffer, with a communication rate of 2400 b/s, improving IP packet transmission efficiency. 3.4 Design of Remote Diagnostic Terminal The remote diagnostic terminal primarily involves software programming, written using languages ​​such as Visual Basic and HTML, and is mainly divided into two parts. (1) Design and Upload of Communication Module Configuration Webpage Before remote testing, the relevant parameters of the communication module need to be configured on the network so that the remote software can access and control the test terminal. This design uses HTML language to write a web page style interface, which is uploaded to the module FLASH memory. Users can access the hardware and configure the network through a browser. To enhance security, a password entry parameter setting is also added. (2) Design of Remote Terminal Main Program The main program is written in Microsoft Visual Basic language. The main functions include control and testing. Before testing, the assigned IP address and the port number to be listened to are entered. Then, according to the network conditions, the Connect method of the WinSock plugin in VB language is used to establish a Socket between the local computer and the test platform to complete the transmission and reception of control data. The running status and operation results of each operation will be displayed in real time by the current status box. After the local computer and the remote test platform are connected normally, the test can begin. 4 Application Verification First, the communication module was tested. Two HyperTerminals were set up on a single computer, one connected to the serial port and the other to the Socket. Data was entered in one window of the HyperTerminals, and the other window responded instantly, indicating that the network interface module was functioning normally. Next, the MCU's serial communication performance was tested. A serial port connection with the computer was established through a level conversion circuit, and data transmission was verified using the HyperTerminals. After completion, the entire system was integrated and debugged. First, a direct connection test was conducted, directly connecting the test terminal and the diagnostic terminal via a crossover network cable to verify the correctness of the functions. Then, the test platform was connected to the Internet for remote connection to verify the correctness of the functions. Currently, after multiple debugging and verifications, a connection can be established between the diagnostic terminal and the test terminal, and remote status display, control testing, reset, and other functions can be performed, achieving the original design goals. [IMG=Test Interface]/uploadpic/THESIS/2007/12/2007120711360774250I.jpg[/IMG] 5 Conclusion The method described in this article makes it very easy to connect embedded systems to the internet. Researchers do not need to be proficient in TCP/IP protocols or specific network knowledge to design electronic products with network functionality, significantly shortening the development cycle. This method has great potential applications in remote monitoring, network surveillance, and remote diagnostics. Currently, this technology is being promoted to related fields within organizations.
Read next

CATDOLL 123CM Nanako TPE

Height: 123cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/54/70cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22