Design of remote IAP function system based on P89LPC936 microcontroller and Q2406B module

Publisher:脑洞飞扬Latest update time:2023-04-07 Source: elecfansKeywords:P89LPC936 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere


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.


[1] [2]
Keywords:P89LPC936 Reference address:Design of remote IAP function system based on P89LPC936 microcontroller and Q2406B module

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

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components
Guess you like

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号