An Internet of Things OTA upgrade method

By agreeing on an upgrade agreement between the upgrade platform and the terminal, the upgrade package is divided into multiple subcontracting sequences and transmitted frame by frame, the OTA upgrade technology gap of NB IoT terminals is solved, a safe and reliable upgrade process is realized, and the upgrade efficiency and iterative capabilities are improved.

CN116455742BActive Publication Date: 2025-07-04SHENZHEN FANHAI SANJIANG TECH DEV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210011302.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-06
Publication Date
2025-07-04
Estimated Expiration
2042-01-06

AI Technical Summary

Technical Problem

In the prior art, NB IoT terminals lack mature LWM2M OTA upgrade technology, resulting in inconvenient upgrade process.

Method used

The LWM2M or Coap protocol is adopted, and the upgrade package is divided into multiple subcontracting sequences through the agreed upgrade protocol between the upgrade platform and the terminal to be upgraded, and interactively transmitted frame by frame to realize the OTA upgrade of the NB IoT terminal.

Benefits of technology

It realizes a safe and reliable OTA upgrade of NB IoT terminals, improves upgrade efficiency, reduces upgrade time, and supports rapid iteration and post-maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116455742B_ABST
    Figure CN116455742B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of Internet of Things technology. The invention provides an Internet of Things OTA upgrade method, which includes steps such as the upgrade platform sending an upgrade notice, upgrade verification, interactive transmission of the upgrade package, relocation and reset and restarting to run. By dividing the upgrade package into multiple sub-package sequences, the upgrade platform interactively transmits the sub-package data frames frame by frame to the terminal to be upgraded, realizing the OTA upgrade of NB Internet of Things terminals using the LWM2M or Coap protocol, filling the gap in the OTA upgrade technology of NB Internet of Things terminals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of the Internet of Things, and particularly relates to a method for OTA upgrade of the Internet of Things. Background Art

[0002] Today, with the accelerating speed of product replacement, OTA upgrade enables products to be launched in small batches and occupy the market on the basis of ensuring the safety and reliability of basic functions and remote upgrade functions, and then rapidly iterate and upgrade through market feedback, gradually maturing into products that truly meet market demands. This method can at least gain three months of early market launch time and is more convenient for later maintenance and upgrade.

[0003] Currently, HTTP or MQTT protocols are generally used for OTA upgrade, while NB Internet of Things terminals generally use Coap or LWM2M protocols, and there is no mature LWM2M OTA upgrade technology in the market. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for OTA upgrade of the Internet of Things, aiming to solve the problem that there is no mature LWM2M OTA upgrade technology in the current market.

[0005] The present invention provides a method for OTA upgrade of the Internet of Things, which is applied to an upgrade platform of the Internet of Things and a terminal to be upgraded using the LWM2M or Coap protocol. The storage space of the terminal to be upgraded includes an APP area for storing and running APP code, a BAK area for storing upgrade packages downloaded from the upgrade platform, and a BOOT partition. BOOT is responsible for moving the upgrade package from the BAK area to the APP area, and dividing the upgrade package into N sub-package sequences, where N is the total number of sub-packages. The method includes the following steps:

[0006] The upgrade platform issues an upgrade notice: The upgrade platform sends an upgrade command to the terminal to be upgraded, and the upgrade command includes the download address of the upgrade package;

[0007] The terminal to be upgraded performs upgrade verification: The terminal to be upgraded receives the upgrade command, obtains the file name and software version number of the upgrade package through the download address, and respectively performs identification verification on the file name and the software version number. After successful verification, the next step is executed;

[0008] Interactive transfer of the upgrade package:

[0009] The terminal to be upgraded sends a request data packet with a sub-package serial number to the upgrade platform;

[0010] The upgrade platform receives the request data packet and sends a sub-package data frame corresponding to the sub-package serial number to the terminal to be upgraded;

[0011] The terminal to be upgraded receives the sub-packet data frame and verifies it;

[0012] Repeat the above three steps until the terminal to be upgraded receives all the sub-packet data frames;

[0013] The terminal to be upgraded performs upgrade package transfer: The terminal to be upgraded performs a total verification on all the upgrade data frames and transfers them to the old version running area, and then performs a full package verification;

[0014] The terminal to be upgraded is reset and runs again: The terminal to be upgraded is reset, and the PC pointer jumps to the start address of the new version APP.

[0015] Further, before the step of the upgrade platform sending the upgrade notice, the following steps are also included:

[0016] The operation and maintenance personnel upload the upgrade package to the upgrade platform;

[0017] The terminal to be upgraded reports a heartbeat packet to the upgrade platform, and the heartbeat packet includes software and hardware version information;

[0018] The upgrade platform determines whether the terminal to be upgraded meets the upgrade conditions according to the heartbeat packet. If so, the next step is executed. If not, the upgrade platform prompts the end of the upgrade process.

[0019] Further, the file name of the upgrade package includes the bin file name and the MD5 value of the bin file name, and the bin file name includes the device name, main board version number, sub-version number, and beta version number.

[0020] Further, an upgrade protocol is also included, and the upgrade protocol includes the upgrade platform downlink payload format and the terminal to be upgraded uplink and response payload formats.

[0021] Further, the upgrade platform downlink payload format includes a new upgrade package prompt frame and an upgrade data frame.

[0022] Further, the frame format of the new upgrade package prompt frame is: URL + space + total number of sub-packets, and the URL is the upgrade package download address.

[0023] Further, the frame format of the upgrade data frame is: packet sequence number + packet length + data + first check value + second check value.

[0024] Further, the terminal to be upgraded uplink and response payload formats include a request for an upgrade package and a response frame.

[0025] Further, the frame format of the request for an upgrade package is: URL + space + request upgrade package sequence number, and the URL is the upgrade package download address.

[0026] Further, the content of the response frame includes single-pack check error information, upgrade package download completion information, whole-pack check correct information, whole-pack check error information, whole-pack device type error information, and whole-pack version number error information.

[0027] Advantages of the present invention: The present invention provides an Internet of Things OTA upgrade method. By agreeing on an upgrade protocol between the upgrade platform and the terminal to be upgraded, the upgrade platform transmits the upgrade data frame by frame to the terminal to be upgraded through the upgrade protocol, realizing the OTA upgrade of NB Internet of Things terminals using the LWM2M or Coap protocol, filling the gap in the OTA upgrade technology of NB Internet of Things terminals. Description of the Drawings

[0028] Figure 1 is a flowchart of the Internet of Things OTA upgrade method according to an embodiment of the present invention. Detailed Embodiments

[0029] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0030] The following describes the specific implementation of the present invention in detail with reference to specific embodiments:

[0031] Example:

[0032] As Figure 1 shown, an embodiment of the present invention provides an Internet of Things OTA upgrade method, which is applied to an upgrade platform of the Internet of Things and a terminal to be upgraded using the LWM2M or Coap protocol. The storage space of the terminal to be upgraded includes an APP area for storing and running APP code, a BAK area for storing the upgrade package downloaded from the upgrade platform, and a BOOT partition. The BOOT is responsible for moving the upgrade package from the BAK area to the APP area, and dividing the upgrade package into N sub-packet sequences, where N is the total number of sub-packets, and the method includes the following steps:

[0033] Step S10: The upgrade platform issues an upgrade notice:

[0034] The upgrade platform sends an upgrade command to the terminal to be upgraded, and the upgrade command includes the download address of the upgrade package;

[0035] Step S20: The terminal to be upgraded performs upgrade verification:

[0036] The terminal to be upgraded receives the upgrade command, obtains the file name and software version number of the upgrade package through the download address, and respectively performs identification and verification on the file name and the software version number. After successful verification, the next step is executed;

[0037] Step S30: Interactive transfer of the upgrade package:

[0038] Step S31: The terminal to be upgraded sends a request data packet with a sub-packet sequence number to the upgrade platform;

[0039] Step S32: The upgrade platform receives the request data packet and sends a sub-packet data frame corresponding to the sub-packet sequence number to the terminal to be upgraded;

[0040] Step S33: The terminal to be upgraded receives the sub-packet data frame and performs verification on it;

[0041] Step S34: Determine whether the terminal to be upgraded has received all the upgrade data frames. If so, execute the next step. If not, jump to step S31;

[0042] Step S40: The terminal to be upgraded performs upgrade package transfer:

[0043] The terminal to be upgraded performs total verification on all the upgrade data frames, transfers them to the old version running area, and then performs full package verification;

[0044] Step S50: The terminal to be upgraded is reset and runs again:

[0045] The terminal to be upgraded is reset, and the PC pointer jumps to the starting address of the new version APP.

[0046] Further, before step S10, the following steps are also included:

[0047] Step S01: The operation and maintenance personnel upload the upgrade package to the upgrade platform;

[0048] Step S02: The terminal to be upgraded reports a heartbeat packet to the upgrade platform. The heartbeat packet includes software and hardware version information;

[0049] Step S03: The upgrade platform determines whether the terminal to be upgraded meets the upgrade conditions according to the heartbeat packet. If so, execute step S10. If not, the upgrade platform prompts the end of the upgrade process.

[0050] Further, in step S10, the file name of the upgrade package includes the bin file name and the MD5 value of the bin file name. The bin file name includes the device name, main board version number, sub-version number, and beta version number.

[0051] Furthermore, it also includes an upgrade protocol, which includes the upgrade platform's downlink payload format and the uplink and response payload formats of the terminal to be upgraded.

[0052] Furthermore, the upgrade platform's downlink payload format includes a new upgrade package prompt frame and an upgrade data frame.

[0053] Furthermore, the frame format of the new upgrade package prompt frame is: URL + space + total number of sub - packages, where the URL is the download address of the upgrade package. See the following Example 1:

[0054] New upgrade package prompt frame:

[0055] http: / / ota.3jyun.com / upgradePackage / RMS - App / 03.14.42 / JT_BF_20TNV1.0.3 1C2”

[0056] Among them, the URL address is:

[0057] http: / / ota.3jyun.com / upgradePackage / RMS - App / 03.14.42 / JT_BF_20TNV1.0.3

[0058] The total number of sub - packages is 1C2, representing a total of 0x1C2 = 450 packages.

[0059] Furthermore, the frame format of the upgrade data frame is: packet sequence number + packet length + data + first check value + second check value. See the following Example 2:

[0060] Upgrade data frame:

[0061] 0A5BF002081D02...7F2E9F5C

[0062] Among them,

[0063] 0A5B: packet sequence number, representing the 0x0A5B = 2651st packet of data;

[0064] F0: packet length, representing the effective data length of 0xF0 = 240 bytes;

[0065] 02081D02...: represents the encrypted effective data;

[0066] 7F2E: represents the CRC16_1 check value 0x7F2E of the above - mentioned sub - package data;

[0067] 9F5C: represents the CRC16_2 check value 0x9F5C of the above - mentioned sub - package data.

[0068] Further, the uplink and response payload formats of the terminal to be upgraded include a request upgrade package and a response frame.

[0069] Further, the frame format of the request upgrade package is: URL + space + request upgrade package serial number, where the URL is the download address of the upgrade package.

[0070] See Example 3 below:

[0071] Request upgrade package:

[0072] http: / / ota.3jyun.com / upgradePackage / RMS-App / 03.14.42 / JT_BF_20TNV1.0.3 C5

[0073] Among them,

[0074] http: / / ota.3jyun.com / upgradePackage / RMS-App / 03.14.42 / JT_BF_20TNV1.0.3 is the download address of the upgrade package issued by the platform;

[0075] C5 is the serial number of the requested upgrade package.

[0076] Further, the content of the response frame includes single-pack check error information, upgrade package download completion information, whole-pack check correct information, whole-pack check error information, whole-pack device type error information, and whole-pack version number error information.

[0077] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An Internet of Things OTA upgrade method, which is applied to an upgrade platform of the Internet of Things and a terminal to be upgraded using the LWM2M or Coap protocol. The storage space of the terminal to be upgraded includes an APP area for storing and running APP code, a BAK area for storing upgrade packages downloaded from the upgrade platform, and a BOOT partition. The BOOT is responsible for moving the upgrade package from the BAK area to the APP area. It is characterized in that Divide the upgrade package into N sub-package sequences, where N is the total number of sub-packages. The method includes the following steps: The upgrade platform issues an upgrade notice: The upgrade platform sends an upgrade command to the terminal to be upgraded, and the upgrade command includes the download address of the upgrade package; The terminal to be upgraded performs upgrade verification: The terminal to be upgraded receives the upgrade command, obtains the file name and software version number of the upgrade package through the download address, and performs identification verification on the file name and the software version number respectively. After successful verification, proceed to the next step; Interactive transfer of the upgrade package: The terminal to be upgraded sends a request data packet with a sub-package serial number to the upgrade platform; The upgrade platform receives the request data packet and sends a sub-package data frame corresponding to the sub-package serial number to the terminal to be upgraded; The terminal to be upgraded receives the sub-package data frame and verifies it; Repeat the above three steps until the terminal to be upgraded receives all sub-package data frames; The terminal to be upgraded performs upgrade package transfer: The terminal to be upgraded performs total verification on all upgrade data frames and transfers them to the old version running area, and then performs full package verification; The terminal to be upgraded is reset and restarted: The terminal to be upgraded is reset and restarted, and the PC pointer jumps to the starting address of the new version APP.

2. The Internet of Things OTA upgrade method according to claim 1, wherein Before the step of the upgrade platform issuing an upgrade notice, the following steps are also included: The operation and maintenance personnel upload the upgrade package to the upgrade platform; The terminal to be upgraded reports a heartbeat packet to the upgrade platform, and the heartbeat packet includes software and hardware version information; The upgrade platform determines whether the terminal to be upgraded meets the upgrade conditions according to the heartbeat packet. If so, proceed to the next step. If not, the upgrade platform prompts the end of the upgrade process.

3. The Internet of Things OTA upgrade method according to claim 1, characterized in that, The file name of the upgrade package includes the bin file name and the MD5 value of the bin file name. The bin file name includes the device name, main board version number, sub-version number, and beta version number.

4. The Internet of Things OTA upgrade method according to claim 1, characterized in that An upgrade protocol is also included, and the upgrade protocol includes the upgrade platform downlink payload format and the terminal to be upgraded uplink and response payload formats.

5. The Internet of Things OTA upgrade method according to claim 4, characterized in that The upgrade platform downlink payload format includes a new upgrade package prompt frame and an upgrade data frame.

6. The Internet of Things OTA upgrade method according to claim 5, wherein The frame format of the new upgrade package prompt frame is: URL + space + total number of sub-packages, and the URL is the download address of the upgrade package.

7. The Internet of Things OTA upgrade method according to claim 5, wherein The frame format of the upgrade data frame is: packet serial number + packet length + data + first check value + second check value.

8. The Internet of Things OTA upgrade method according to claim 4, wherein, The terminal to be upgraded uplink and response payload format includes a request for an upgrade package and a response frame.

9. The Internet of Things OTA upgrade method according to claim 8, wherein The frame format of the request for an upgrade package is: URL + space + request upgrade package serial number, and the URL is the download address of the upgrade package.

10. The Internet of Things OTA upgrade method according to claim 8, characterized in that The content of the response frame includes single packet verification error information, upgrade package download completion information, full package verification correct information, full package verification error information, full package device type error information, and full package version number error information.

Citation Information

Patent Citations

  • NB-IOT-based intelligent terminal equipment and module remote upgrading method

    CN109347659A

  • Wireless upgrading method based on Lora technology

    CN111465039A