Remote upgrading method for preventing dead halt for Internet of Things

By dividing the memory of IoT devices into three blocks and merging IAP and APP programs, the problem of failure and crash during the long -range upgrade process is solved, and the reliability of resource conservation and upgrade process is realized.

CN119376759AInactive Publication Date: 2025-01-28SHENZHEN DEYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411399943.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing IoT devices are prone to jump failure and crashes during remote upgrades, and IAP programs and APP programs are difficult to maintain separately, which may lead to program operation errors in the middle of downloading.

Method used

Divide the memory of IoT devices into three blocks: APP application area, program download area, and guidance program area. By merging the IAP guidance program and APP program, the starting address is 0x0, avoid jump failure, and check through CRC to check Make sure to download normal.

Benefits of technology

Effectively avoid the problem of unsuccessful jumps, integrate IAP and APP programs, reduce resource occupation, suitable for device with memory tension, simplify the compiler configuration, and improve the reliability of remote upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376759A_ABST
    Figure CN119376759A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of the Internet of Things, in particular to an anti-crash remote upgrading method for the Internet of Things. The memory of the Internet of Things equipment is divided into three blocks: an APP application area, the address of which is 0x0; the address of the program downloading area is 0 * 20000; the address of the bootstrap program area is 0x1F000; and when the equipment is powered on, starting to run the APP program from the address 0. When a server has new firmware needing to be updated, the programs are written into a program downloading area one by one, verified and stored to an address 0X20000, at the moment, whether an APP program is operated at the address 0 is judged, a CRC verification value is calculated and compared with a value calculated by the server, and it is ensured that firmware downloading is normal; after downloading is completed, an IAP bootstrap program array (deleted after use) in the array is written into a bootstrap program area 0X1F000, and the address can be modified as long as the address is in a free area. After writing is completed, the total length, the CRC check value and the block size parameters of the downloaded firmware are transmitted into the address through a callback function and executed, the application program area is covered, and the APP program is restarted to enter the address 0 area to run.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a remote upgrade method for preventing a computer from freezing for the Internet of Things. Background Art

[0002] Nowadays, IoT products are more and more widely used, such as vending machines / industrial control equipment / shared equipment. Remote maintenance and upgrade programs have become a standard function. A common method is to write an IAP program, also known as a bootloader, and then write an APP (application) independently. Then merge the HEX files generated by the two programs through a merging tool. The process is cumbersome and will lead to unsuccessful jumps, resulting in the inability of the APP application to run normally and causing a crash. The reasons are as follows:

[0003] 1. In the prior art, the IAP program is generally at address 0, and the APP program is greater than the address 0, and jump failures and crashes often occur;

[0004] 2. The amount of code separated from the two is large, which is inconvenient to manage and difficult to maintain;

[0005] 3. Downloading may cause program errors. Summary of the invention

[0006] The main purpose of the present invention is to provide a remote upgrade method for preventing computer crashes for the Internet of Things, so as to effectively solve the problems raised in the background technology.

[0007] To achieve the above purpose, the present invention adopts the following technical scheme: a remote upgrade method for preventing a crash of the Internet of Things, which divides the memory of the Internet of Things device into three blocks: an APP application area, address 0x0; a program download area, address 0x20000; a boot program area, address 0x1F000,

[0008] When the device is powered on, it starts running the APP program from address 0.

[0009] Preferably, when the server has new firmware to be updated, the programs are written into the program download area one by one, verified and saved to address 0X20000. At this time, the APP program is still run at address 0, and the CRC check value is calculated and compared with the value calculated by the server to ensure that the firmware download is normal;

[0010] When the download is complete, write the IAP boot program array (delete after use) in the array to the boot program area 0X1F000. This address can be modified as long as it is in the free area.

[0011] Preferably, after writing is completed, the total length, CRC check value, and block size parameters of the downloaded firmware are passed to the address and executed through the callback function, overwriting the application area and restarting to enter the address 0 area to run the APP application.

[0012] The beneficial effects of the present invention are as follows: the present invention integrates the IAP boot program as a part of the code program of the application program; and the starting address of the program is 0, so there will be no problem of unsuccessful jump; the IAP program exists in the form of an array structure, occupies less resources, and has an absolute advantage for devices with limited memory space; the starting address of the IAP program can be dynamically modified without the need for cumbersome compiler configuration before modification. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Attached Figure 1 It is a schematic diagram of the present invention. DETAILED DESCRIPTION

[0014] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0015] Attached Figure 1 As shown, a remote upgrade method for preventing a crash of the Internet of Things is used. The memory of the Internet of Things device is divided into three blocks: an APP application area, address 0x0; a program download area, address 0x20000; and a boot program area, address 0x1F000. When the device is powered on, the APP program starts running from address 0.

[0016] When the server has new firmware to be updated, write the programs one by one into the program download area, verify and save them to address 0X20000. At this time, run the APP program at address 0, and calculate the CRC check value and compare it with the value calculated by the server to ensure that the firmware download is normal;

[0017] When the download is complete, write the IAP boot program array (delete after use) in the array to the boot program area 0X1F000. This address can be modified as long as it is in the free area.

[0018] After writing is completed, the total length, CRC check value, and block size parameters of the downloaded firmware are passed to the address and executed through the callback function, overwriting the application area and restarting to enter the address 0 area to run the APP application.

[0019] The beneficial effects of the present invention are as follows: the present invention integrates the IAP boot program as a part of the code program of the application program; and the starting address of the program is 0, so there will be no problem of unsuccessful jump; the IAP program exists in the form of an array structure, occupies less resources, and has an absolute advantage for devices with limited memory space; the starting address of the IAP program can be dynamically modified without the need for cumbersome compiler configuration before modification.

[0020] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A remote upgrade method for preventing computer crashes for the Internet of Things, characterized in that: It divides the memory of IoT devices into three blocks: an APP application area, address 0x0; a program download area, address 0x20000; a boot program area, address 0x1F000; when the device is powered on, it starts running the APP program from address 0.

2. The method for remote upgrading of the Internet of Things to prevent system crash according to claim 1, characterized in that: When the server has new firmware to be updated, write the programs one by one into the program download area, verify and save them to address 0X20000. At this time, run the APP program at address 0, and calculate the CRC check value and compare it with the value calculated by the server to ensure that the firmware download is normal; When the download is complete, write the IAP boot program array (delete after use) in the array to the boot program area 0X1F000. This address can be modified as long as it is in the free area.

3. The method for remote upgrading of the Internet of Things to prevent system crash according to claim 2, characterized in that: After writing is completed, the total length, CRC check value, and block size parameters of the downloaded firmware are passed to the address and executed through the callback function, overwriting the application area and restarting to enter the address 0 area to run the APP application.