3.4 Protocol design
The GPRS network speed is theoretically 117 kbps, but in fact it is far less than that; after the connection between GPRS and the Internet is established, it enters the transparent transmission stage of data. This system designs user application layer protocols based on the complete TCP/IP mechanism. In order to upgrade the system software of a certain terminal of the system, the program code to be upgraded can be converted into system signaling through coding software, connected to the Internet to the GPRS network, and transparently transmitted and downloaded to the target data transmission terminal. The signaling format of this system adopts the following code frame format:
The code data segments of the start signaling frame and the end signaling frame are both FFH. The synchronization code is set to AAH, 55H; the byte length (1B) indicates the number of bytes of code data contained in this data frame, usually less than 64; the download target address (5B) is set to the factory ID number, giving a specific code meaning, only Only after the verification ID number is correct can the data transmission terminal receive the command. It is a unique identification and cannot be changed. For security reasons, this system is set to a combination of factory date and number: 0501160000 represents the number of products shipped on January 16, 2005. a product. The frame number (1B) indicates the number of transmission frames divided into this upgrade program. During the command transmission process, this field is 00H. The control field (1B) indicates whether an operation command or data is transmitted. The end code is set to 55H, AAH. The upstream and downstream data formats of the data transmission terminal are exactly the same. Except for the code data segment of the upstream response data, other fields are copies of the downstream control data to achieve data flow control.
4 Discussion on IAP function reliability
The system upgrade process is inevitably disturbed by environmental interference, such as system power outages or network communication congestion, malfunctions and other unexpected accidents, which lead to IAP upgrade failure. Therefore, there must be a set of reliable software and hardware mechanisms to ensure the complete normal operation of IAP. The following introduces some measures taken by this system:
① Handle power outage situation. The power grid in the on-site environment fluctuates greatly, and power outages occur frequently, even affecting the normal operation of the system. It can be powered by a battery to provide a stable and reliable working power supply; an additional charging board circuit can be used to directly charge the circuit when there is power. In addition, the software has a complete handshake mechanism and signaling set receipts to ensure correct communication and no misoperation; the timing of downloading and erasing Flash parts is isolated, reducing the impact of network communication performance and power-down abnormalities on the normal operation of the system. to the minimum.
② Bit errors generated during data transmission. A common and effective solution is to use CRC cyclic redundancy verification and retransmission mechanisms. After the data check code is correct, it is stored in FM24C256. If there is an error or timeout, the frame sequence number will be sent to request retransmission until the end frame is detected. 3823 If the data length of the last frame is not enough, fill the frame with FFH and send it.
③ Handling large delays or blockages in the data transmission process. Data transmission uses timeout processing. If the three-way handshake fails, an exception handling mechanism is used.
This technical solution fundamentally solves the problem of difficult on-site upgrades of this system, greatly improves the maintainability of the system, accelerates the time to market of new products, can provide faster and more perfect user services, and enhance the market competitiveness of products. Using the GPRS network as a carrier, this technology provides a solution in the majority of monitoring sites or rural areas where access to the Internet is difficult.
Previous article:Design of audio signal amplitude equalization control amplification circuit based on AT89C51 microcontroller and amplifier
Next article:Design of intelligent solar street light control system using LPC935 microcontroller as main controller
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications