A method and system for over-the-air upgrade of local area network devices

The method and system for local area network device over-the-air upgrades address network congestion and manual intervention issues by using a gateway to manage and automate version comparisons, packetized transmission, and automatic resume and rollback, ensuring efficient and reliable device upgrades.

CN120034851BActive Publication Date: 2025-07-15SHENYANG BONCHREE TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510517645.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-07-15
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

The existing technology has problems such as network congestion, interruption of upgrades, confusion of versions and frequent manual interventions during the air upgrade of equipment in industrial wireless LANs, which is difficult to meet the requirements of unattended upgrades.

Method used

The upgrade tasks are issued through the device management system server, the gateway generates upgrade packages and subcontracts to transmit them, and the device performs version comparison, breakpoint transmission, integrity verification and automatic backup to ensure the reliability and efficiency of the upgrade.

Benefits of technology

It realizes equipment automation upgrade, reduces manual intervention, improves upgrade reliability and efficiency, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034851B_ABST
    Figure CN120034851B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for over-the-air upgrade of local area network devices. The present invention relates to the technical field of local area network device upgrade, and solves the problem that the upgrade reliability and upgrade efficiency of existing over-the-air upgrade methods for local area network devices need to be improved. The present invention issues an upgrade task for a specified device through a device management system server, and the gateway issues the upgrade task. The devices in the system automatically download the software and automatically complete functions such as upgrade restart, version verification, and abnormal rollback, ensuring that the devices can reliably complete the automatic upgrade function, reducing labor costs and the impact caused by manual upgrade misoperations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of local area network device upgrades, and particularly to a method and system for over-the-air upgrade of local area network devices. Background Art

[0002] Over-the-air upgrade technology, as a means to update device firmware or software without physical contact, is particularly important in the industrial Internet of Things field. In industrial wireless local area networks, such as in WIA-FA network scenarios, devices are usually deployed in complex environments and in large quantities, and it is necessary to ensure the efficiency and reliability of the upgrade process while avoiding interference with device operation.

[0003] In the prior art, over-the-air upgrades mostly adopt centralized management, where the management platform pushes upgrade packages to devices and triggers installations. However, in the industrial field local area network environment, devices are densely distributed and network conditions are restricted, and existing solutions often struggle to address the challenges in practical applications. For example, due to limited bandwidth and susceptibility to interference in industrial wireless networks, network congestion is likely to occur when a large number of devices are upgraded simultaneously, resulting in interrupted upgrade tasks; and the existing breakpoint resumption mechanism lacks persistent storage of the session state at the device end. Once the upgrade is interrupted, it relies on manual re-triggering of the process, which not only increases the operation and maintenance cost but also may lead to version chaos due to operation errors. In addition, existing technologies usually do not integrate automated version verification and rollback functions. If the device runs abnormally after the upgrade, manual intervention is required to restore the old version, which is difficult to meet the strict requirements for unattended upgrades in industrial scenarios. With the increasingly rapid technological upgrades and version iterations of industrial wireless local area network devices, how to perform unified upgrade management on product programs that have been put into user application sites based on over-the-air upgrade technology and improve upgrade reliability and efficiency is an urgent problem to be solved. Summary of the Invention

[0004] The purpose of the present invention is to provide a method and system for over-the-air upgrade of local area network devices to solve the problem that the upgrade reliability and efficiency of existing over-the-air upgrade methods for local area network devices need to be improved.

[0005] In a first aspect, the present invention provides a method for over-the-air upgrade of local area network devices, including:

[0006] After the gateway receives an upgrade instruction from the device management system server, it generates an upgrade package from the program file uploaded by the device management system server and distributes the upgrade package information to the target path of the device.

[0007] After the device receives the upgrade package information, it replies to the gateway with the current program version number.

[0008] The gateway compares the current program version number with the upgrade version number to determine whether an upgrade is required. If the current program version number of the device is higher than or equal to the upgrade version number, no upgrade is needed. If the current program version number of the device is lower than the upgrade version number, the upgrade starts, and the gateway transmits the upgrade package to the device in sub-packets. Each data packet has the same size and contains the current packet number, data size, and cyclic redundancy check code.

[0009] If the gateway does not receive a download request for the next data packet from the device within a preset time after sending the current data packet, it is determined that the transmission times out, and the retransmission function is started. If the retransmission exceeds the preset number of times, the gateway feedbacks a download interruption exception to the device management system server and downloads the program file again.

[0010] After receiving the data, the device replies to the gateway with the size of the received data and starts receiving the upgrade data based on the starting position of the file in the target path.

[0011] Furthermore, the device has a breakpoint resume function. The device automatically stores the download task session number and the linked list file for reading and writing storage-related information linked list. If the device is abnormally interrupted and receives a download task again, it reads the historical download information from the download task session number corresponding to the linked list file and sends a download packet request to the gateway from the consecutive packet number.

[0012] Furthermore, after the upgrade package is received, the device calculates the hash value of the upgrade package and compares it with the hash value provided by the received file information for integrity verification. If the verification fails, the verification result is feedback to the gateway. If the verification result is that the upgrade package is received successfully, the program file is downloaded successfully, and the device replaces the program file and executes the upgrade.

[0013] Before replacing the old file, the existing program file is automatically backed up and stored in the specified local path of the device. After the program file is replaced and backed up, the upgrade operation is completed, and the device restarts. Then, the program monitoring script is started. If a running anomaly is detected, the file is rolled back, replaced with the previous program file version, and the device is restarted.

[0014] Furthermore, after the device restarts, it retrieves whether there is a completed upgrade verification file in the currently stored linked list file. If so, it determines that this program startup is an upgrade restart, and actively sends the corresponding node session serial number, upgrade result, and the current program version number of the device to the gateway. The gateway compares the current program version number of the device with the upgrade version number and feedbacks the upgrade result to the device management system server.

[0015] Further, the device management system server, gateway, and devices have a time synchronization function. After the device management system server issues an upgrade task, a time upgrade interval is configured. For devices that go online within the specified time, an upgrade version check is performed. If the version of the device program file is lower than the target version, the gateway automatically issues an upgrade request to the device for over-the-air upgrade of local area network devices.

[0016] In a second aspect, the present invention provides a system for over-the-air upgrade of local area network devices, including: a device management system server, a gateway, and downstream devices. The devices include wireless access points and wireless node terminal devices; the device management system server is connected to the gateway, the gateway is connected to the wireless access point, and the wireless access point is connected to the wireless node terminal devices;

[0017] The device management system server is used to send the program to be upgraded to a specified location of the gateway, display the upgrade status and version information of devices in the system, and display the specific information of the downloaded program file; it has the function of automatically upgrading devices and can issue upgrade instructions to online devices according to a specified time interval;

[0018] The gateway is used to generate an upgrade package from the program file uploaded by the device management system server after receiving the upgrade instruction from the device management system server, and send the upgrade package information to the target path of the device; receive the current program version number replied by the device; compare the current program version number with the upgrade version number to determine whether an upgrade is needed; if the current program version number of the device is higher than or equal to the upgrade version number, no upgrade is required; if the current program version number of the device is lower than the upgrade version number, the upgrade starts, and the gateway transmits the upgrade package to the device in packets; the size of each data packet is the same and includes the current packet number, data size, and cyclic redundancy check code; if the gateway does not receive a download request for the next data packet from the device within a preset time after sending the current data packet, it is determined that the transmission times out, and the retransmission function is started; if the retransmission exceeds the preset number of times, the gateway feeds back a download interruption exception to the device management system server and downloads the program file again;

[0019] The device is used to reply the current program version number to the gateway after receiving the upgrade package information sent by the gateway; after receiving the data, reply the size of the received data to the gateway, and start receiving the upgrade data according to the starting position of the file in the target path.

[0020] Further, the device has a breakpoint resumption function. The device automatically stores the download task session number and a linked list file for reading and writing storage-related information linked lists; if the device is abnormally interrupted, when receiving a download task again, it reads the historical download information from the download task session number corresponding to the linked list file, and sends a download packet request to the gateway from the consecutive packet number according to the historical download information.

[0021] Further, the device is also used for: after the upgrade package is received, calculating the hash value of the upgrade package and comparing it with the hash value provided by the received file information for integrity verification; if the verification fails, feedbacking the verification result to the gateway. If the verification result is that the upgrade package is received successfully, the program file is downloaded successfully, and the device performs program file replacement to execute the upgrade;

[0022] Before replacing the old file, automatically backing up the existing program file and storing it in the specified path on the local device; after the program file replacement and backup are completed, the upgrade operation is completed, and the device is restarted; then, a program monitoring script is started. If a running anomaly is detected, file rollback is triggered, the previous program file version is replaced, and the device is restarted.

[0023] Further, the device is also used for: after the device is restarted, retrieving whether there is a file with a completed upgrade verification in the currently stored linked list file. If so, it is determined that this program startup is an upgrade restart, and the corresponding node session number, upgrade result, and the current program version number of the device are actively sent to the gateway. The gateway compares the current program version number of the device with the upgrade version number and feedbacks the upgrade result to the device management system server.

[0024] Further, the device management system server, the gateway, and the device have a time synchronization function. After the device management system server issues an upgrade task, a time upgrade interval is configured. For devices that go online within the specified time, an upgrade version check is performed. If the device program file version is lower than the target version, the gateway automatically issues an upgrade request to the device for over-the-air upgrade of local area network devices.

[0025] The present invention has the following beneficial effects: A method and system for over-the-air upgrade of local area network devices according to the present invention issue an upgrade task for a specified device through the device management system server, and the gateway issues the upgrade task. Devices within the system automatically download software and automatically complete functions such as upgrade restart, version verification, and abnormal rollback, ensuring that the device can reliably complete the automatic upgrade function and reducing the impact of labor costs and manual upgrade misoperations. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0027] Figure 1 It is a topology diagram of on-site system devices;

[0028] Figure 2 It is a specific upgrade flowchart of an embodiment of the present invention;

[0029] Figure 3This is the flowchart for device upgrade and rollback in the embodiments of the present invention. Detailed implementation manners

[0030] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only a part rather than all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention. The technical solutions provided in the embodiments of the present invention are described in detail below in conjunction with the drawings.

[0031] The present invention provides a method and system for in-air upgrade of LAN devices. The on-site system device topology diagram is shown in Figure 1 , including: a device management system server, a gateway, and downstream devices. The device management system server is directly connected to the gateway and can control and manage the gateway and all downstream devices. The devices include wireless access points and wireless node terminal devices; the gateway is connected to the wireless access points, and the wireless access points are connected to the wireless node terminal devices.

[0032] A user can upload the program file to be updated to the gateway in the device management system and issue an upgrade task for a specified device, completing the upgrade and update of the program or file of the target device. At the same time, the devices in the system can automatically perform version verification and version rollback according to the downloaded updated program version. Also, when the upgrade download is abnormally interrupted, the device has a breakpoint resume function to save network resources.

[0033] Among them, the device management system server is used for the user upgrade interaction interface: it can send the program to be upgraded to a specified location in the gateway, display the upgrade status and version information of the devices in the system, and display the specific information of the downloaded program file. It also has the function of automatically upgrading devices and can issue upgrade instructions to the online devices according to a specified time interval.

[0034] The functional modules on the gateway side include the file upgrade management module and the device status monitoring module. The file upgrade management module is used for upgrade package generation, main program version comparison, and program sub-package reading and distribution. The gateway automatically generates an upgrade package based on the specified version file, including the file name, file size, file path, etc., and distributes the program file to the device target path. The gateway can compare the new version with the type of online device and the current version number information. If the current version is lower than the updated version, the upgrade process is started and the verification result is reported to the management platform. After the file enters the download process, the gateway can divide the program file into download data packets according to the specified size, read the data from the file, and distribute it to the device in sequence according to the device request package number. The device status monitoring module is used for real-time status collection and timeout retransmission function. The gateway can query the current version information of the device and send it to the device management system server. If a device has a download reply timeout of more than three retransmissions, it will trigger an alarm to send to the device management system server, so that the device can be marked as abnormal interruption state.

[0035] The functions of the device end include: upgrade receiving and downloading module, file verification and backup module, and file upgrade and rollback module. The upgrade receiving and downloading module is used to receive upgrade packages and resume the download from breakpoint. It listens to the gateway upgrade connection request of the bound port, receives the specific information of the file, replies to the size of the received data, and starts to receive the upgrade data according to the starting position of the target path file. The device stores the linked list of information related to the download task session number, and has a corresponding read-write storage linked list file. When the device abnormally interrupts the download, it will read the historical download information from the linked list when it receives the download task again, and send the download package from the continuation package number to request the gateway to download the file. The file verification and backup module is used for file integrity verification and backup management. After receiving the file, the file hash value is calculated, the integrity check is performed, and it is compared with the received file size. If it fails, the verification result is sent to the gateway. Before replacing the old file, the existing file is automatically backed up to the local storage or the specified backup path to ensure the rapid and effective rollback operation. The file upgrade and rollback module is used to first start the upgrade file replacement and backup, and complete the device restart; then start the program monitoring script, and trigger the file rollback when an abnormal operation is detected, replace it back to the previous version and restart the device.

[0036] The present invention provides a method for upgrading a local area network device over the air, comprising the following steps:

[0037] After the gateway receives the upgrade instruction from the device management system server, it immediately establishes a dedicated upgrade connection session with the target upgrade device, and generates an upgrade package from the program file uploaded by the device management system server. An upgrade package is automatically generated according to the file with the specified unique version number, including information such as file name, file size, and file path, and is sent to the target device. After the device receives the upgrade package information, it replies to the gateway with the current program version number. The gateway compares the current program version number with the upgrade version number to determine whether an upgrade is needed; if the current program version number of the device is higher than or equal to the upgrade version number, no upgrade is required; if the current program version number of the device is lower than the upgrade version number, the upgrade starts, and the gateway transmits the upgrade package to the device in packets; each data packet has the same size and contains the current packet number, data size, and cyclic redundancy check code.

[0038] If the gateway does not receive the download request for the next data packet from the device within the preset duration after sending the current data packet, it is determined that the transmission times out, and the retransmission function is started. In this embodiment, the preset duration is 5 seconds. If the retransmission exceeds the preset number of times, the gateway feedbacks a download interruption exception to the device management system server and downloads the program file again. In this embodiment, the preset number of times is 3 times. After receiving the data, the device replies to the gateway with the size of the received data and starts receiving the upgrade data according to the starting position of the file at the target path.

[0039] Among them, the device has the function of resuming interrupted downloads. The device automatically stores the download task session number and the linked list file for reading and writing storage-related information linked list; if the device is abnormally interrupted and receives a download task again, it reads the historical download information from the download task session number corresponding to the linked list file, and sends a download packet request to the gateway from the consecutive packet number according to the historical download information.

[0040] After the upgrade package is received, the device calculates the hash value of the upgrade package and compares it with the hash value provided by the received file information for integrity verification; if the verification fails, the verification result is feedback to the gateway. If the verification result is that the upgrade package is received successfully, the program file is downloaded successfully, and the device performs program file replacement to execute the upgrade.

[0041] Before replacing the old file, the existing program file is automatically backed up and stored in the specified local path of the device to ensure the speed and effectiveness of the rollback operation; after the program file replacement and backup are completed, the upgrade operation is completed, and the device is restarted; then the program monitoring script is started. If a running anomaly is detected, the file is rolled back, replaced with the previous program file version, and the device is restarted.

[0042] After the device restarts, retrieve whether there is a completed upgrade verification file in the currently stored linked list file. If so, determine that this program startup is an upgrade restart, and actively send the corresponding node session number, upgrade result, and the current program version number of the device to the gateway. The gateway compares the current program version number of the device with the upgrade version number and feeds back the upgrade result to the device management system server.

[0043] The device management system server, the gateway, and the device have a time synchronization function. After the device management system server issues an upgrade task, configure the time upgrade interval. For devices that go online within the specified time, perform an upgrade version check. If the device program file version is lower than the target version, the gateway automatically issues an upgrade request to the device for over-the-air upgrade of local area network devices.

[0044] Please refer to Figure 2 , for the specific upgrade flowchart of the embodiments of the present invention. The gateway establishes an upgrade connection, obtains the firmware version information of all devices, and determines whether the device needs to be upgraded. If not, the process ends. If so, create and send mutex threads for each device. Send information such as the file name, file size, and file path to the device. After the device receives the above information, request file data packets. The gateway node sends file data packets. Determine whether the device receives successfully. If not, retransmit the current data packet, and then re-determine whether the device receives successfully. If so, send the next data packet until the device completes the download. After the device completes the download, send an upgrade instruction. Feed back the device information and the updated version number to the device management system server, and the process ends. The downstream device first creates a socket and binds a port. Listen for requests for the device version through the bound port. Send the current version information to the gateway. Determine whether the device needs to perform a version upgrade. If not, the process ends. If so, record the current file information and find the download package number. Receive the data packets sent by the gateway node. Verify whether the received data packets are continuous. If not, apply for the next packet and receive the data packet again. If so, write to the file and record the next package number. Determine whether the number of downloaded packages is completed. If not, continue to receive data packets. If so, the download is completed, wait for the upgrade operation to be executed, and the device restarts. Determine whether the application of the new file is successful. If not, restore the old version. If so, actively detect the upgrade result, and the process ends.

[0045] Please refer to Figure 3, is the flowchart for device upgrade and rollback in the embodiments of the present invention. The device starts continuously listening for upgrade instructions. If no upgrade instruction is received, it continues to listen. If a start upgrade instruction is received, the device renames the file with the same name in the target folder to filename.bak - VERSION, then moves the upgraded file to the target folder and assigns the same execution permissions. Subsequently, it sends a device upgrade start response, and then the device automatically restarts. The device startup program automatically starts the instruction and immediately runs the automatic monitoring script. Then it monitors whether the program can run normally for 10 seconds. If so, it waits for the version verification information and sends the current version number of the program, and the device upgrade ends. If not, it determines that the upgrade fails. At this time, it renames the execution file to bak - err, deletes the latest version file in this directory, and then restores bak - VERSION. The device automatically restarts, waits for the version verification information and sends the current version number of the program, and the device upgrade ends.

[0046] Based on the above system device upgrade method, users can monitor and control the device upgrade situation through the management platform, complete the management and operation of system device upgrade, and improve the upgrade efficiency and operation reliability.

[0047] The above-described embodiments of the present invention do not constitute a limitation on the protection scope of the present invention.

Claims

1. A method for over-the-air upgrade of a local area network device, characterized in that Including: After the gateway receives the upgrade instruction from the device management system server, it generates an upgrade package from the program file uploaded by the device management system server and distributes the upgrade package information to the target path of the device; After the device receives the upgrade package information, it replies to the gateway with the current program version number; The gateway compares the current program version number with the upgrade version number to determine whether an upgrade is needed; If the current program version number of the device is higher than or equal to the upgrade version number, no upgrade is required; if the current program version number of the device is lower than the upgrade version number, the upgrade starts, and the gateway transmits the upgrade package to the device in packets; the size of each data packet is the same, and it contains the current packet number, data size, and cyclic redundancy check code; If the gateway does not receive the download request for the next data packet from the device within the preset duration after sending the current data packet, it is determined that the transmission times out, and the retransmission function is started; if the retransmission exceeds the preset number of times, the gateway feeds back a download interruption exception to the device management system server and downloads the program file again; After receiving the data, the device replies to the gateway with the size of the received data and starts receiving the upgrade data according to the starting position of the file in the target path; The device has the function of resuming interrupted downloads. The device automatically stores the download task session number and the linked list file for reading and writing the linked list of storage-related information; If the device is abnormally interrupted and receives a download task again, it reads the historical download information from the download task session number corresponding to the linked list file and sends a download packet request to the gateway from the consecutive packet number; After the upgrade package is received, the device calculates the hash value of the upgrade package and compares it with the hash value provided by the received file information for integrity verification; If the verification fails, the verification result is fed back to the gateway. If the verification result is that the upgrade package is received successfully, the program file is downloaded successfully, and the device replaces the program file and executes the upgrade; Before replacing the old file, the existing program file is automatically backed up and stored in the specified local path of the device; after the program file is replaced and backed up, the upgrade operation is completed. The device renames the file with the same name in the target folder to filename.bak - VERSION, then moves the upgraded file to the target folder and assigns the same execution permission, and then sends a device upgrade start response. After that, the device automatically restarts; the device startup program automatically starts the instruction, immediately runs the automatic monitoring script, and then monitors whether the program can run normally for 10s. If so, it waits for the version verification information and sends the current program version number, and the device upgrade ends; if not, it is determined that the upgrade fails. At this time, the execution file is renamed to bak - err, the latest version file in this directory is deleted, and bak - VERSION is restored; the device is automatically restarted, waits for the version verification information and sends the current program version number, and the device upgrade ends.

2. The method for in-air upgrade of a local area network device as claimed in claim 1, wherein After the device restarts, it checks whether there is a completed upgrade verification file in the currently stored linked list file. If so, it determines that this program startup is an upgrade restart, and actively sends the corresponding node session sequence number, upgrade result, and the current program version number of the device to the gateway. The gateway compares the current program version number of the device with the upgrade version number and feeds back the upgrade result to the device management system server.

3. The method for air upgrade of a local area network device according to claim 1, characterized in that, The device management system server, gateway, and devices have a time synchronization function. After the device management system server issues an upgrade task, a time upgrade interval is configured. For devices that go online within the specified time, an upgrade version check is performed. If the version of the device program file is lower than the target version, the gateway automatically issues an upgrade request to the device for over-the-air upgrade of local area network devices.

4. A system for over-the-air upgrade of a local area network device, characterized in that, Including: The device management system server, gateway, and downstream devices, where the devices include wireless access points and wireless node terminal devices; The device management system server is connected to the gateway, the gateway is connected to the wireless access point, and the wireless access point is connected to the wireless node terminal devices; The device management system server is used to send the program to be upgraded to a specified location of the gateway, display the upgrade status and version information of devices in the system, and display the specific information of the downloaded program file; it has the function of automatically upgrading devices and can issue upgrade instructions to online devices according to the specified time interval; The gateway is used to generate an upgrade package from the program file uploaded by the device management system server after receiving the upgrade instruction from the device management system server, and send the upgrade package information to the target path of the device; receive the current program version number replied by the device; Compare the current program version number with the upgrade version number to determine whether an upgrade is required; If the current program version number of the device is higher than or equal to the upgrade version number, no upgrade is required; if the current program version number of the device is lower than the upgrade version number, the upgrade starts, and the gateway transmits the upgrade package to the device in packets; the size of each data packet is the same, and it contains the current packet number, data size, and cyclic redundancy check code; if the gateway does not receive a download request for the next data packet from the device within the preset time after sending the current data packet, it is determined that the transmission times out, and the retransmission function is started; if the retransmission exceeds the preset number of times, the gateway feeds back a download interruption exception to the device management system server and downloads the program file again; The device is used to reply the current program version number to the gateway after receiving the upgrade package information sent by the gateway; after receiving the data, reply the size of the received data to the gateway, and start receiving the upgrade data according to the starting position of the file in the target path; The device has a breakpoint resume function, and the device automatically stores the download task session number and the linked list file used to read and write the linked list information related to storage; If the device is abnormally interrupted, when receiving the download task again, read the historical download information from the download task session number corresponding to the linked list file, and send a download packet request to the gateway from the consecutive packet number; The device is also used to: after the upgrade package is received, calculate the hash value of the upgrade package and compare it with the hash value provided by the received file information for integrity verification; If the verification fails, feedback the verification result to the gateway. If the verification result is that the upgrade package is received successfully, the program file is downloaded successfully, and the device replaces the program file and executes the upgrade; Before replacing the old file, automatically back up the existing program file and store it in the specified local path of the device; after the program file replacement and backup are completed, the upgrade operation is completed. The device renames the file with the same name in the target folder to filename.bak - VERSION, then moves the upgraded file to the target folder and assigns the same execution permission, and then sends a device upgrade start response. After that, the device automatically restarts; when the device starts up, the program automatically starts the instruction, immediately runs the automatic monitoring script, and then monitors whether the program can run normally for 10s. If so, wait for the version verification information and send the current version number of the program, and the device upgrade ends; if not, determine that the upgrade fails. At this time, rename the execution file to bak - err, delete the latest version file in this directory, and then restore bak - VERSION; automatically restart the device, wait for the version verification information and send the current version number of the program, and the device upgrade ends.

5. The system for in-air upgrade of a local area network device according to claim 4, characterized in that, The device is also used for: after the device restarts, retrieve whether there is a file with a completed upgrade verification in the currently stored linked list file. If so, determine that this program start is an upgrade restart, and actively send the corresponding node session number, upgrade result, and the current program version number of the device to the gateway. The gateway compares the current program version number of the device with the upgrade version number and feeds back the upgrade result to the device management system server.

6. The system for over-the-air upgrade of a local area network device according to claim 4, wherein The device management system server, the gateway, and the device have a time synchronization function. After the device management system server issues an upgrade task, configure the time upgrade interval. For devices that go online within the specified time, upgrade version checks are performed. If the version of the device program file is lower than the target version, the gateway automatically issues an upgrade request to the device for over - the - air upgrade of the local area network device.

Citation Information

Patent Citations

  • Terminal equipment remote software version distribution method and system

    CN105763369A

  • Whole network terminal automatic upgrading method based on WIA-PA gateway

    CN114531353A