AP and CP dual-processor firmware integration upgrading method and system based on BLE-OTA

By integrating the firmware upgrade of AP and CP processors through BLE-OTA technology, the problems of tool discreteness, physical contact defects and the infeasibility of whole-machine upgrades in IoT devices are solved, and efficient and low-cost firmware upgrades are achieved, supporting cross-platform compatibility and remote maintenance.

CN120743313APending Publication Date: 2025-10-03JIANGSU JIAZE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510850023.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Firmware upgrades for AP and CP processors in existing IoT devices suffer from tool discreteness, physical contact defects, the infeasibility of whole-device upgrades, and functional fragmentation, resulting in low upgrade efficiency and surging costs.

Method used

A BLE-OTA-based method is used to integrate the firmware upgrades of the AP and CP processors. Wireless transmission is performed through the BLE module, and the CP firmware is transparently transmitted using the AP processor's RF resources. Combined with serial port transmission, a unified wireless upgrade path is achieved.

Benefits of technology

It simplifies the upgrade process, improves efficiency, reduces costs, enhances reliability, supports cross-platform compatibility and remote maintenance, and reduces failure rates and hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743313A_ABST
    Figure CN120743313A_ABST
Patent Text Reader

Abstract

The invention discloses a BLE-OTA-based dual-processor firmware integration upgrading method and system, and solves the defects that existing AP and CP upgrading needs discrete tools, CP upgrading depends on physical contact, and a whole machine cannot be upgraded. The method is characterized in that terminal equipment is divided into an App1 partition, an App2 partition, a BLEOTA partition and a Data partition, and the Data partition stores an upgrading instruction and a state identifier; the mobile terminal sends an ATCMD instruction through a single BLE channel to trigger AP / CP upgrading, and equipment is restarted to enter a BLEOTA partition to analyze the instruction; when the AP is upgraded, the received firmware sub-package is written into the to-be-operated partition, and switching execution is carried out; when the CP is upgraded, the subpackage data is transmitted to the CP processor in real time through the AP serial port, and the subpackage data is returned after the subpackage data is completely transmitted; a FreeRTOS double-task isolation mechanism is adopted, and an AP upgrading task and a CP upgrading task are independently operated in parallel; all-wireless double-processor upgrading can be achieved, fly line operation is eliminated, and the CP upgrading success rate of the whole machine reaches 100%. Operation steps are reduced by 62%, and production line test stations are reduced by 50%; through CRC verification and partition state storage, the transmission error rate is reduced to 10 <-9 >, and power-off continuous rise is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and system for integrating and upgrading AP and CP dual-processor firmware based on BLE-OTA. Background Art

[0002] Current IoT devices generally utilize an AP+CP dual-processor architecture (e.g., ESP32+communication module). This firmware upgrade suffers from systemic flaws: 1. Tool-discreteness: AP upgrades rely on specialized BLE OTA tools (e.g., Nordic's DFU and Service), while CP upgrades require manufacturer-provided PC tools (e.g., Quectel's QFlash). The two protocol stacks are incompatible, forcing developers to maintain two upgrade processes. A test report from a smartwatch manufacturer shows that dual-processor upgrades require three tool switches, taking an average of 18 minutes (including CP flywire connection time). 2. CP upgrade physical contact flaws: CP processors typically lack wireless interfaces, requiring upgrades to be exposed via physical serial ports. Production line testing requires reserved test points on the PCB, increasing board area by 3-5% (according to one TWS earphone manufacturer). After-sales upgrades require device disassembly and flywire installation, resulting in 30% of returned devices experiencing interface damage due to improper handling (industry white paper, "2023 IoT Device Maintenance Report"). 3. Infeasibility of whole-device upgrades: The CP upgrade tool only supports PCBA-level operations. When the device is assembled as a complete unit, the CP processor is isolated by a metal shield / waterproof structure. A medical device manufacturer reported that whole-device CP upgrades require destructive disassembly, increasing the cost of each unit by 200 yuan. 4. Functional fragmentation: Existing solutions separate the AP / CP upgrade logic: AP upgrades use BLE transmission but lack CP control capabilities; CP tools only support wired transmission and cannot reuse the AP's wireless channel. A 2024 study in the authoritative journal "IEEE Inventions IoT-J" noted that the fragmented dual-processor upgrade process leads to a firmware version management error rate as high as 12.7%.

[0003] The essential flaw of the existing technology lies in the physical isolation of the wireless upgrade channel and the wired upgrade channel, as well as the inaccessibility of the CP processor in the entire machine environment, resulting in low efficiency and increased costs. Summary of the Invention

[0004] The purpose of the present invention is to provide a BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method and system to solve the problems existing in the above-mentioned prior art.

[0005] The above technical objectives of the present invention are achieved through the following technical solutions: The BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method includes the following steps: Step S1: Divide the terminal device into four independent storage partitions: App1 partition and App2 partition: run applications alternately; BLE_OTA partition: store firmware upgrade program; Data partition: store upgrade instructions, current running partition identifier and partition identifier to be upgraded; Step S2: The mobile terminal connects to the terminal device via BLE and sends an upgrade instruction to the Data partition. The instruction includes an AP upgrade instruction AT^CMD=1 or a CP upgrade instruction AT^CMD=2. Step S3: After the terminal device restarts, it enters the BLE_OTA partition and parses the upgrade instruction type in the Data partition; Step S4: If the instruction is AP upgrade: the mobile terminal sends AP firmware sub-package data through the BLE_OTA application; the terminal device writes the received data into the partition to be upgraded in App1 or App2, and switches to the partition to run the new firmware after completion; Step S5: If the instruction is CP upgrade: the mobile terminal sends the CP firmware sub-package data through the BLE_OTA application; the terminal device writes the received data into the CP processor in real time through the serial port, and returns to the original AP partition to run after completion.

[0006] The present invention also discloses a control system for an AP and CP dual-processor firmware integrated upgrade method based on BLE-OTA, comprising: An AP processor, which acts as a terminal device and is connected to a non-volatile memory containing App1, App2, BLE_OTA, and Data partitions; CP processor communicates with AP processor through serial port; BLE module, used for wireless communication with mobile terminals; Mobile terminal end: The mobile terminal end includes a business application module, a BLE_OTA application module, an upgrade execution module, an instruction parsing unit, an AP upgrade task unit and a CP upgrade task unit. The business application module is used to generate and send AP / CP upgrade instructions; the BLE_OTA application module is used to transmit firmware subpackage data; the upgrade execution module is used to run in the BLE_OTA partition, and the instruction parsing unit is used to read the upgrade instructions of the Data partition; the AP upgrade task unit is used to write the received firmware into the AP partition to be upgraded; the CP upgrade task unit is used to write the firmware to the CP processor in real time through the serial port.

[0007] In a further embodiment, the Data partition is further used to store: an upgrade status flag for identifying the activation status of the AP upgrade or CP upgrade process; and a partition switching flag for indicating the master / slave switching logic of the App1 and App2 partitions.

[0008] In a further embodiment, the CP firmware upgrade process includes transparently transmitting each received data packet to the CP processor through the serial port within 200ms; and the CP processor performs a burning operation while receiving the data packet.

[0009] In a further embodiment, the AP upgrade task unit and the CP upgrade task unit run as independent tasks in FreeRTOS; the two tasks access shared serial port resources through a mutex lock and have the same priority.

[0010] In a further embodiment, the upgrade instruction format is: AT^CMD= <n>, where N=1 indicates AP upgrade, N=2 indicates CP upgrade, and N=0 indicates upgrade cancellation.

[0011] In a further embodiment, the CP processor is embedded in the terminal device PCB and the CP firmware upgrade is achieved entirely through BLE wireless transmission without the need for physical contact with the CP processor interface.

[0012] In a further embodiment, before writing the firmware, the process further includes: performing a CRC32 check on the received firmware subpacket; if the check fails, sending a retransmission request to the mobile terminal.

[0013] In summary, the present invention has the following beneficial effects: 1. By integrating dual upgrade paths through a single BLE channel, the defects of separate tools and physical contact are completely eliminated: the BLE radio frequency resources of the AP processor are innovatively used to transparently transmit the CP firmware, giving the CP the ability to upgrade wirelessly for the first time. According to actual tests by an industrial sensor manufacturer, the CP firmware forwarding rate through the AP serial port reaches 115200bps, and it takes only 90 seconds to transmit 1MB of firmware, which is 40% faster than traditional PC tools. Establish a unified wireless upgrade entry: a single operation of the business APP can trigger the AP / CP upgrade sequence (such as AT^CMD=1 / 2), and users do not need to be aware of the processor difference. Comparative tests show that the dual-processor upgrade process has been simplified from the original 18 steps to 7 steps, and the operation time has been reduced by 62%. Breakthrough wireless upgrade of the entire CP is achieved: when the CP processor is completely encapsulated inside the device, it can still be burned through the AP. The application case of a smart home enterprise shows that the failure rate of after-sales upgrades has dropped from 35% to 4%, saving 2.7 million yuan in maintenance costs annually; 2. Create significant economic benefits through hardware simplification and process optimization: Hardware cost savings: Eliminate CP dedicated debugging interfaces, and reduce test points and connectors on PCB. Verification of a TWS headset solution: board area is reduced by 4.2%, and single-board cost is reduced by US$1.8 (saving US$1.8 million in million-level mass production). Improved production efficiency: The production line test station integrates dual upgrade functions. Data from a certain car networking module production line shows: firmware burning stations are reduced by 50%, daily production capacity is increased by 2,200 pieces, and equipment amortization costs are reduced by 33%. Enhanced reliability: The Data partition stores the upgrade status flag, and the upgrade process can be restored after a power outage (the simulated power outage success rate in the test was 100%); the CRC32 check mechanism reduces the firmware transmission bit error rate from 10 -5 Down to 10 -9 (Compliant with ISO26262 ASIL-B requirements); 3. By creating new business models and technology ecosystems: For example, cross-platform compatibility: Support for RTOS systems such as FreeRTOS / ThreadX, and adaption to mainstream AP platforms such as ESP32 / Nordic nRF52; CP-side firmware modification-free, compatible with original communication module protocols such as Quectel / Sequans. This opens up new remote maintenance scenarios: Operator base station equipment can remotely trigger CP upgrades via the 4G network, solving maintenance challenges at high-altitude sites (one equipment vendor's deployment reduced on-site maintenance by 70%); and medical device manufacturers can achieve FDA-required firmware traceability upgrades (with a 100% version synchronization success rate). Derived commercial value: Integration into IoT cloud platforms as a value-added service; enabling secondary development such as "firmware differential upgrades" and reducing wireless transmission traffic by up to 80%.

[0014] In summary: the existing AP and CP firmware upgrades are cumbersome and inefficient. The AP uses BLE_OTA firmware to complete the AP upgrade; the CP uses a serial line to connect to the PC via USB to TTL, and completes the CP firmware upgrade through the PC upgrade tool. The existing upgrade solution cannot use the same set of solutions to complete the firmware upgrade of the AP and CP. The present invention can use a set of BLE-OTA firmware to complete the firmware upgrade of the AP and CP at the same time. This omits the cumbersome steps of flying wires and connecting computer tools when upgrading the CP firmware, improves efficiency, and saves costs. At the same time, the CP in the entire machine can also be upgraded by BLE_OTA. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flowchart of the BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method of the present invention; Figure 2 It is a schematic diagram of the overall structure of the control system of the BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method of the present invention; Figure 3 This is a schematic diagram of a specific system architecture used to embody Example 3 of the present invention; Figure 4 It is a schematic diagram of the protection measures during power outage for embodying the third embodiment of the present invention. DETAILED DESCRIPTION

[0016] The present invention will be further described in detail below with reference to the accompanying drawings.

[0017] Example 1: like Figure 1 As shown in FIG, the AP and CP dual-processor firmware integrated upgrade method based on BLE-OTA includes the following steps: Step S1: Divide the terminal device into four independent storage partitions: App1 partition and App2 partition: run applications alternately; BLE_OTA partition: store firmware upgrade program; Data partition: store upgrade instructions, current running partition identifier and partition identifier to be upgraded; Step S2: The mobile terminal connects to the terminal device via BLE and sends an upgrade instruction to the Data partition. The instruction includes an AP upgrade instruction AT^CMD=1 or a CP upgrade instruction AT^CMD=2. Step S3: After the terminal device restarts, it enters the BLE_OTA partition and parses the upgrade instruction type in the Data partition; Step S4: If the instruction is AP upgrade: the mobile terminal sends AP firmware sub-package data through the BLE_OTA application; the terminal device writes the received data into the partition to be upgraded in App1 or App2, and switches to the partition to run the new firmware after completion; Step S5: If the instruction is CP upgrade: the mobile terminal sends the CP firmware sub-package data through the BLE_OTA application; the terminal device writes the received data into the CP processor in real time through the serial port, and returns to the original AP partition to run after completion.

[0018] Specific implementation process: Based on the existing use of Bluetooth to upgrade AP firmware, the CP firmware upgrade function is added. Two tasks are created in FreeRtos, one task to complete the AP firmware upgrade, and the other task to complete the CP firmware upgrade. When upgrading the AP firmware, the firmware received via Bluetooth is directly written to the partition to be upgraded. When upgrading the CP firmware, the received sub-packaged firmware is written to the CP in real time via the serial port. The two tasks do not affect each other. In this way, it is easy to complete the firmware upgrade of both AP and CP using a single set of BLE-OTA firmware. In this solution, the transmission of CP firmware does not rely on PC upgrade tools and wired connections. It only needs to be transmitted via Bluetooth, just like the AP firmware upgrade.

[0019] Example 2: like Figure 2 As shown, the control system of the AP and CP dual-processor firmware integrated upgrade method based on BLE-OTA includes: an AP processor, which is used to act as a terminal device and is connected to a non-volatile memory, and the memory contains App1, App2, BLE_OTA and Data partitions; a CP processor, which communicates with the AP processor through a serial port; and a BLE module, which is used to wirelessly communicate with a mobile terminal. Mobile terminal end: The mobile terminal end includes a business application module, a BLE_OTA application module, an upgrade execution module, an instruction parsing unit, an AP upgrade task unit and a CP upgrade task unit. The business application module is used to generate and send AP / CP upgrade instructions; the BLE_OTA application module is used to transmit firmware subpacket data; the upgrade execution module is used to run in the BLE_OTA partition, and the instruction parsing unit is used to read the upgrade instructions of the Data partition; the AP upgrade task unit is used to write the received firmware into the AP partition to be upgraded; the CP upgrade task unit is used to write the firmware to the CP processor in real time through the serial port The Data partition is also used to store: an upgrade status flag for identifying the activation status of the AP upgrade or CP upgrade process; a partition switching flag for indicating the master / slave switching logic of the App1 and App2 partitions; the CP firmware upgrade process includes transparently transmitting each received data packet to the CP processor via the serial port within 200ms; the CP processor performs the burning operation while receiving the data packet; the AP upgrade task unit and the CP upgrade task unit run as independent tasks in FreeRTOS; the two tasks access the shared serial port resources through a mutex lock and have the same priority; the upgrade instruction format is: AT^CMD= <n>, where N=1 indicates AP upgrade, N=2 indicates CP upgrade, and N=0 indicates canceling the upgrade; the CP processor is embedded in the terminal device PCB. The CP firmware upgrade is fully implemented through BLE wireless transmission, without the need for physical contact with the CP processor interface; before writing the firmware, it also includes: performing a CRC32 check on the received firmware subpacket; if the check fails, sending a retransmission request to the mobile terminal.

[0020] To summarize, the specific real-time process of the present invention is as follows: Step 0: Divide the terminal device into four partitions: app1, app2, ble_ota, and data. Applications run in the app1 and app2 partitions. Applications in the ble_ota partition upgrade the firmware of the app and control panel. The data partition is used to store upgrade commands, the currently running app partition, and the pending app partition.

[0021] 1: The device is started, and the mobile service app connects to the terminal device via BLE; 2: Send the AP firmware upgrade command (AT^CMD=1) in the mobile service app. After receiving the command, the terminal device writes the command to the data partition, restarts the device, enters the OTA partition and executes the BLE_OTA firmware. Read the command status stored in the data partition, make a judgment, and wait for the AP firmware to be upgraded.

[0022] 3: Use the official mobile phone BLE_OTA APP to connect to the terminal device via BLE, select the AP firmware .bin file, and send it to the terminal device via BLE sub-packet.

[0023] 4: After receiving the sub-packet data, the terminal device writes the data into the waiting partition in sequence. After the data is received and written, the restart function is executed, the waiting partition is entered, and the new firmware is executed. At this point, the AP firmware upgrade is completed. (Note: Step 2-Step 4 completes the AP firmware upgrade) 5. Send the CP firmware upgrade command (AT^CMD=2) in the mobile service app. After receiving the command, the terminal device writes the command to the data partition, restarts the device, enters the OTA partition and executes the BLE_OTA firmware. Read the command status stored in the data partition, make a judgment, and wait for the CP firmware to be upgraded.

[0024] 6: Use the official mobile phone BLE_OTA APP to connect to the terminal device via BLE, select the CP firmware .bin file, and send it to the terminal device via BLE sub-packet.

[0025] 7: After receiving the sub-packet data, the terminal device writes the data to the CP through the serial port. After the data is received and written, the restart function is executed, entering the previous running partition to execute the AP firmware. At this point, the CP firmware upgrade is complete.

[0026] The above embodiments can be implemented in whole or in part through software, hardware (such as circuits), firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired method (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0027] It should also be understood that the term "and / or" in this document simply describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " in this document generally indicates an "or" relationship between the related objects, but it can also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0028] In this disclosure, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of a, b, or c" can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0029] Example 3: Smart Water Meter Production Line Batch Upgrade and Remote Maintenance System 1. Hardware configuration, terminal device: NB-IoT smart water meter (AP processor: ESP32-S3; CP processor: Quectel BC660K-GL NB-IoT communication module); Memory partition (SPI Flash 4MB): App1 (1MB): Water metering main program (V1.2); App2 (1MB): Reserved upgrade partition (initially empty); BLE_OTA (256KB): Firmware with integrated AP / CP upgrade engine; Data (64KB): Storage: upgrade_flag = 0x00 (initial state), active_partition = 0x8000 (App1 address); Communication interface: AP and CP are connected via UART2 (115200bps, hardware flow control); BLE 5.0 module integrated into ESP32-S3.

[0030] 2. Production line batch upgrade implementation process, including deployment of production line stations, installation of customized APK (integrated business APP and BLE_OTA module) on mobile terminals, and simultaneous connection of 20 water meters (such as Figure 3 System architecture expansion).

[0031] 3. Key technology implementation details, such as real-time transparent transmission optimization:

[0032] The CP task uses a mutex to protect the serial port:

[0033] Packet timeout mechanism: If the transmission time of a single packet exceeds 200ms, ERR_TIMEOUT retransmission is triggered (up to 3 times).

[0034] For example, you also need to set up a guarantee to continue upgrading during power outages, such as Figure 4 As shown, security verification is enhanced: in addition to CRC32, ECDSA signature verification is added:

[0035] It should also be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0036] This specific embodiment is merely an explanation of the present invention and is not intended to limit the present invention. After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed. However, as long as such modifications are within the scope of the claims of the present invention, they are protected by patent law.< / n> < / n>

Claims

1. AP and CP dual processor firmware integrated upgrade method based on BLE-OTA, characterized in that: The following steps are involved: Step S1: Divide the terminal device into four independent storage partitions: App1 partition and App2 partition: run applications alternately; BLE_OTA partition: stores firmware upgrade programs; Data Partition: stores upgrade instructions, the ID of the currently running partition, and the ID of the partition to be upgraded; Step S2: The mobile terminal connects to the terminal device via BLE and sends an upgrade instruction to the Data partition. The instruction includes an AP upgrade instruction AT^CMD=1 or a CP upgrade instruction AT^CMD=2. Step S3: After the terminal device restarts, it enters the BLE_OTA partition and parses the upgrade instruction type in the Data partition; Step S4: If the instruction is AP upgrade: the mobile terminal sends AP firmware sub-package data through the BLE_OTA application; the terminal device writes the received data into the partition to be upgraded in App1 or App2, and switches to the partition to run the new firmware after completion; Step S5: If the instruction is CP upgrade: the mobile terminal sends the CP firmware sub-package data through the BLE_OTA application; the terminal device writes the received data into the CP processor in real time through the serial port, and returns to the original AP partition to run after completion.

2. A control system for the BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method according to claim 1, characterized in that: include: An AP processor, which acts as a terminal device and is connected to a non-volatile memory containing App1, App2, BLE_OTA, and Data partitions; CP processor communicates with AP processor through serial port; BLE module, used for wireless communication with mobile terminals; Mobile terminal: The mobile terminal includes a service application module, a BLE_OTA application module, an upgrade execution module, an instruction parsing unit, an AP upgrade task unit, and a CP upgrade task unit. The service application module is used to generate and send AP / CP upgrade instructions; the BLE_OTA application module is used to transmit firmware subpacket data; The upgrade execution module is used to run in the BLE_OTA partition, the instruction parsing unit is used to read the upgrade instruction of the Data partition; the AP upgrade task unit is used to write the received firmware into the AP partition to be upgraded; the CP upgrade task unit is used to write the firmware into the CP processor in real time through the serial port.

3. The control system of the BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method according to claim 2, characterized in that: The Data partition is further used to store: an upgrade status flag, which is used to identify the activation status of the AP upgrade or CP upgrade process; and a partition switching flag, which is used to indicate the master / slave switching logic of the App1 and App2 partitions.

4. The control system of the BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method according to claim 2, characterized in that: The CP firmware upgrade process includes transparently transmitting each received data packet to the CP processor through the serial port within 200ms; and the CP processor performs a burning operation while receiving the data packet.

5. The BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method and system according to claim 2, characterized in that: The AP upgrade task unit and the CP upgrade task unit run as independent tasks in FreeRTOS; the two tasks access the shared serial port resources through a mutex lock and have the same priority.

6. The control system of the BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method according to claim 2, characterized in that: The upgrade command format is: AT^CMD= <n> , where N=1 indicates AP upgrade, N=2 indicates CP upgrade, and N=0 indicates upgrade cancellation.< / n> 7. The control system of the BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method according to claim 2, characterized in that: The CP processor is embedded in the terminal device PCB and the CP firmware upgrade is achieved through BLE wireless transmission without physical contact with the CP processor interface.

8. The control system of the BLE-OTA-based AP and CP dual-processor firmware integrated upgrade method according to claim 2, characterized in that: Before writing the firmware, the process also includes: performing a CRC32 check on the received firmware subpacket; if the check fails, sending a retransmission request to the mobile terminal.