Iot positioning terminal system integrating fota remote upgrade and secure power supply
Patent Information
- Application Number
- CN202611091688.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-07-22
AI Technical Summary
该方案侧重于对外部电源异常的监测与响应,属于外部环境监控范畴,对于升级过程中供电稳定性的主动保障及瞬态供电扰动的抑制,尚有提升空间
将FOTA升级的稳定性与终端供电系统的安全性进行了体系化的整合,通过配套集成电池保护模块、充电管理模块以及两级稳压模块构成的供电防护链,协同终端多状态供电配合FOTA升级全流程,杜绝升级过程中因电源扰动或意外中断导致的固件损坏风险,升级成功率和可靠性显著提升,并确保终端在充电、电池供电、FOTA升级等各场景下电压高度稳定,保护电路和电池安全,延长设备寿命。
Smart Images

Figure CN122621625B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote upgrade technology for Internet of Things (IoT) terminals, and in particular to an IoT positioning terminal system that integrates FOTA remote upgrade and secure power supply. Background Technology
[0002] IoT positioning terminals are widely used in scenarios such as vehicle monitoring, industrial production, and logistics warehousing. Their core function is to acquire location information through satellite positioning and upload the data to a management platform using cellular networks (such as 4G LTE). With the expansion of deployment scale, firmware over-the-air (FOTA) upgrades have become an indispensable means of terminal maintenance. Firmware, the underlying system software embedded in the hardware, such as the operating system kernel, drivers, and baseband version, involves the most basic and core software layer of the device. Each upgrade optimizes the performance, functionality, or stability of the entire device; therefore, the success of the firmware upgrade plays a decisive role in whether the terminal can continue to operate.
[0003] Firmware upgrades can fail if the device experiences a power outage, insufficient power supply, or voltage instability during data writing or erasure, causing the code executing the upgrade logic to become out of order or jump. Therefore, the stability of the terminal device's power supply directly affects the upgrade result during the firmware upgrade process. Furthermore, the reliability of the terminal's power supply in unattended environments directly determines the system's availability and security.
[0004] Existing related technologies mainly focus on remedial measures after abnormal situations occur during the upgrade process and on solving software problems that lead to upgrade failure. For example, the invention patent application with publication number CN119653334A provides a method for handling remote upgrade failure, and the invention patent application with publication number CN112764964A involves a method for solving the inability to re-flash after a FOTA upgrade failure. The invention patent applications with publication numbers CN116594810A, CN121722605A, CN121597494A and CN114528150A all disclose rollback mechanisms to solve or optimize related problems caused by unexpected interruptions in firmware upgrades.
[0005] In summary, the existing technologies mentioned above mainly focus on software remediation measures after upgrade anomalies. In addition, some existing technologies focus on monitoring and responding to abnormal external power supply failures. For example, patent application CN117785256A provides a vehicle FOTA upgrade system and method based on power supply protection. This system monitors the power supply status by acquiring the electrical parameters of the external power supply and controls the termination or continuation of the FOTA upgrade based on the power supply status. This solution emphasizes the monitoring and response to external power supply anomalies, falling under the category of external environment monitoring. There is still room for improvement in actively ensuring power supply stability and suppressing transient power supply disturbances during the upgrade process. Therefore, how to ensure the safety of the entire FOTA remote upgrade process while constructing a multi-level power supply protection system to support the stable operation of the terminal in all scenarios is a problem that cannot be ignored. Summary of the Invention
[0006] To address the aforementioned issues, this invention provides an IoT positioning terminal system that integrates FOTA remote upgrade and secure power supply. This system provides multi-level power protection for IoT positioning terminals during FOTA remote upgrades, ensuring stable operation of terminals across all scenarios and enabling remote collaborative management of large numbers of terminals.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: An IoT positioning terminal system integrating FOTA remote upgrade and secure power supply includes a positioning terminal hardware as the core, and is equipped with an external FOTA remote upgrade server, an IoT management platform, DC power supply equipment and a batch monitoring host computer.
[0008] The FOTA remote upgrade server is a distributed software system that can be deployed in clusters on the manufacturer's own data center or private cloud, and is responsible for generating upgrade packages.
[0009] The positioning terminal hardware (hereinafter referred to as the terminal) includes a main control unit, a positioning module, and a power supply protection chain consisting of a supporting integrated battery protection module, a charging management module, and a two-stage voltage regulator module.
[0010] The main control unit includes a control chip, a built-in Flash memory, a RAM memory, and a communication module; it can support firmware operation, upgrades, and data storage and transmission. The Flash memory and RAM memory serve as the resource base for the main control unit to design firmware upgrade security strategies and support the entire firmware upgrade process. When a firmware upgrade fails due to a software problem, the Flash memory is responsible for performing a rollback operation.
[0011] The communication module is responsible for establishing an encrypted communication link with the FOTA remote upgrade server, supporting firmware package fragment transmission, breakpoint resumption and signature verification, and resisting upgrade interruptions caused by network anomalies. This communication link also carries the uploading of real-time location data to the IoT management platform, realizing a shared channel for location and upgrade, and reducing hardware overhead. The positioning module includes a GPS+BeiDou dual-mode positioning unit, a positioning data acquisition unit, and a positioning data analysis unit.
[0012] Among them, the GPS+BeiDou dual-mode positioning unit is responsible for the implementation of core functions. It integrates the radio frequency receiving front-end and the baseband processor, and works with the coplanar waveguide antenna impedance circuit to simultaneously receive navigation message signals from GPS and BeiDou satellite systems, realize multi-constellation joint positioning, and improve satellite acquisition capability and positioning availability in complex environments. The positioning data acquisition unit interfaces with the GPS+BeiDou dual-mode positioning unit to continuously acquire raw observation data at a set sampling rate, including parameters such as pseudorange, carrier phase, Doppler frequency shift, and signal-to-noise ratio. The raw data is formatted and timestamped to generate a structured positioning observation queue for subsequent processing. The positioning data analysis unit receives the observation value queue output by the positioning data acquisition unit and performs data preprocessing, satellite selection, and position calculation.
[0013] The main control unit periodically reads the positioning results output by the positioning data analysis unit through the internal bus, encapsulates them into reporting data frames, and uploads them to the IoT management platform via the communication module.
[0014] The battery protection module monitors the overcharge, over-discharge, overcurrent and short circuit status of the lithium battery in real time. Once an abnormality is detected, the output is immediately shut off to prevent the fault from escalating and to ensure the basic safety of the battery from the source. The charging management module is responsible for managing the trickle, constant current, and constant voltage charging process of the lithium battery by the DC power supply equipment, and provides temperature protection and charging status indication. The two-stage voltage regulator module has a first stage where a boost converter is responsible for boosting the battery voltage to the stable voltage required by the terminal, ensuring sufficient input to the subsequent stages even when the battery voltage is low. The second stage is handled by a low-dropout linear regulator (LDO) that precisely regulates the intermediate voltage to the operating voltage required by the main control, communication, and positioning modules, and filters out high-frequency noise. This provides a stable power supply with low ripple and fast response throughout the daily operation and FOTA upgrade process, preventing voltage drops caused by high-current loads.
[0015] During the entire terminal upgrade process, the main control unit subdivides the terminal state into: normal operation state, upgrade preparation state, upgrade state, or rollback state if the upgrade fails. Based on the terminal's different states, the main control unit employs different control strategies for the battery protection module, charging management module, and two-stage voltage regulator module to ensure a safe and stable power supply throughout the entire upgrade process. Once the upgrade or rollback operation is successfully completed, the main control unit performs a recovery action, gradually transitioning the operating parameters of each power supply module from special configurations to normal operation configurations, after which the terminal returns to its normal operation state.
[0016] The control strategy is as follows: Normal operating state: The charging management module automatically switches between trickle, constant current, constant voltage and standby modes according to the lithium battery voltage, and sets the voltage switching thresholds for trickle, constant current and constant voltage respectively; The battery protection module maintains a normal monitoring mode based on the standard overcurrent protection threshold; The first-stage boost converter in the two-stage voltage regulator module performs the boost operation, while the second-stage LDO provides a stable output voltage according to the core voltage requirements of the positioning chip, ensuring the stable operation of the positioning module.
[0017] Upgrade preparation state: The main control unit first determines whether the power supply meets the upgrade requirements. If it does not meet the requirements, it maintains the normal operation state. If it meets the requirements, it enters the upgrade preparation state. The main control unit locks the charging management module into a stable constant current charging mode and sets the charging current threshold. The battery protection module increases the overcurrent protection threshold; The two-stage voltage regulator module remains in its original operating state. After all the above power supply configurations are completed, the main control unit waits for the power supply to stabilize before requesting firmware data from the FOTA remote upgrade server, and the terminal enters the upgrade state.
[0018] Upgrade status: The charging management module remains locked in a stable constant current charging mode; The two-stage voltage regulator module is in a stable output state under high load. The first-stage boost converter has a fixed duty cycle value, and the second-stage LDO switches to a fast transient response mode to suppress current transients caused by Flash write operations. The battery protection module maintains the improved overcurrent and short-circuit protection thresholds, while disabling some non-critical voltage monitoring interrupts to avoid unnecessary alarms during the upgrade process.
[0019] Rollback state: Triggered by the main control unit after detecting an upgrade anomaly, the charging management module continues to be locked in constant current charging mode, appropriately reducing the set charging current threshold to minimize power ripple and electromagnetic interference, and ensuring the complete execution of erasing and rewriting of the Flash memory. The battery protection module keeps the overcurrent protection threshold at a high level during the upgrade to prevent system power failure due to a brief drop in battery voltage during the rollback process, thereby avoiding equipment damage. The first-stage boost converter in the two-stage voltage regulator module locks in a stable voltage and does not perform frequency hopping or power-saving switching; the second-stage LDO voltage regulator locks in the target voltage required for writing to the Flash memory, and the main control unit controls the LDO to switch intermittently between fast transient response mode and normal mode, which is equivalent to achieving the most conservative linear regulation output mode, ensuring that the current jump caused by the Flash erase and write operation during the rollback process will not cause the output voltage to overshoot or drop by more than ±1%.
[0020] Once the upgrade or rollback operation is successfully completed, the main control unit performs a power restoration action, smoothly transitioning the operating parameters of the battery protection module, charging management module, and two-stage voltage regulator module from special configuration to normal operating configuration. Subsequently, the terminal returns to normal operating status.
[0021] The recovery actions include: the second-stage LDO smoothly transitioning from fast transient response mode or intermittent switching mode to normal mode; the first-stage boost converter releasing the duty cycle lock and resuming conventional PWM closed-loop control; the charging management module releasing the constant current lock and resuming automatic switching of charging mode based on battery voltage; and the battery protection module resuming conventional overcurrent threshold and monitoring mode.
[0022] The IoT management platform is the core of the system's data aggregation and business logic, including a data processing module, a remote upgrade management module, and an API interface. It is primarily responsible for establishing long-term connections with the communication modules of numerous terminals, receiving and parsing the status information reported by the terminals and storing it in the database, providing remote upgrade management for the terminals, and connecting to a batch monitoring host computer and various functional applications based on a unified API interface.
[0023] The batch monitoring host computer connects to the IoT management platform via the API interface to visualize the battery level, signal strength, firmware version, and location information of multiple terminals. Through batch management functions, it remotely issues FOTA upgrade policies to selected batches of terminals, displays upgrade progress or rollback status, and generates upgrade task reports based on the results reported by the terminals. This forms a complete batch remote upgrade control system, meeting the needs of efficient maintenance of multiple terminals in commercial IoT scenarios.
[0024] The beneficial effects of this invention are as follows: The stability of FOTA upgrades and the security of the terminal power supply system are systematically integrated. Through the power supply protection chain consisting of a battery protection module, a charging management module and a two-stage voltage regulator module, the system coordinates the multi-state power supply of the terminal with the entire FOTA upgrade process, eliminating the risk of firmware damage caused by power disturbances or unexpected interruptions during the upgrade process. The upgrade success rate and reliability are significantly improved, and the voltage of the terminal is kept highly stable in various scenarios such as charging, battery power supply and FOTA upgrade, protecting the circuit and battery safety and extending the life of the device.
[0025] This invention establishes a complete power supply safety assurance system, from condition prediction and threshold pre-raising before the upgrade, to active voltage stabilization and mode locking during the upgrade, and then to stable rollback power supply after upgrade failure, which significantly improves the self-healing capability and overall reliability of the terminal in unattended scenarios. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the overall architecture of an IoT positioning terminal system integrating FOTA remote upgrade and secure power supply provided by the present invention; Figure 2 This invention provides a flowchart of the terminal upgrade power supply process for an IoT positioning terminal system that integrates FOTA remote upgrade and secure power supply. Figure 3 This is a flowchart of the terminal rollback power supply process for an IoT positioning terminal system that integrates FOTA remote upgrade and secure power supply, provided by the present invention. Figure 4 This is a schematic diagram of an IoT management platform for an IoT positioning terminal system that integrates FOTA remote upgrade and secure power supply, provided by the present invention. Figure 5 This is a flowchart of the batch upgrade task scheduling of an IoT positioning terminal system that integrates FOTA remote upgrade and secure power supply, provided by the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] FOTA (Firmware-Over-the-Air) technology is a remote firmware upgrade technology. The core of this invention lies in ensuring the power supply stability of IoT positioning terminals throughout the entire FOTA remote upgrade process through the coordinated state control of multi-level power supply modules, fundamentally solving the problem of upgrade failure caused by power disturbances.
[0030] Figure 1 This diagram illustrates the overall architecture of an IoT positioning terminal system integrating FOTA remote upgrade and secure power supply, provided by the present invention. (See also...) Figure 1 As shown, the present invention provides an IoT positioning terminal system that integrates FOTA remote upgrade and secure power supply, including a positioning terminal hardware as the core, and supporting external FOTA remote upgrade server, IoT management platform, DC power supply equipment and batch monitoring host computer.
[0031] The FOTA remote upgrade server is a distributed software system that can be deployed in clusters on the manufacturer's own data center or private cloud, and is responsible for generating upgrade packages.
[0032] The positioning terminal hardware (hereinafter referred to as the terminal) includes a main control unit, a positioning module, and a power supply protection chain consisting of a supporting integrated battery protection module, a charging management module, and a two-stage voltage regulator module.
[0033] The main control unit includes a control chip, a built-in Flash memory, a RAM memory, and a communication module; it can support firmware operation, upgrades, and data storage and transmission. Preferably, in this embodiment, the main control unit of the terminal is implemented using a 780EGH chip, which can support firmware operation, upgrade and data storage, and is responsible for firmware upgrade logic control and power supply status scheduling; the Flash memory and RAM memory each have a storage capacity of 8MB; at the same time, the terminal is equipped with a 2.8-inch screen interface that can define the display content.
[0034] In a preferred embodiment of the present invention, the firmware upgrade strategy is as follows: Flash is divided into a running area and an upgrade temporary storage area. Upon receiving new firmware, it is first fully written to the temporary storage area and its integrity is verified. If the verification passes, a boot flag is set and the system switches to the new firmware. If the upgrade process is interrupted or the verification fails, the main controller detects the anomaly and automatically redirects the running pointer back to the original firmware area, re-verifying the integrity of critical code segments in the original firmware area. The corrupted new firmware in the upgrade temporary storage area is erased, and the system directly jumps to the original firmware entry point, achieving automatic rollback in case of upgrade anomalies and ensuring that the terminal can always be restored to the previous normal version. This improves the security and stability of firmware upgrades and prevents the device from becoming unusable due to firmware upgrade failures caused by software problems.
[0035] The communication module supports TDD / FDD multi-band 4G communication and is responsible for establishing an encrypted communication link with the FOTA remote upgrade server. It supports firmware package fragment transmission, breakpoint resumption, and signature verification to resist upgrade interruptions caused by network anomalies. This communication link also carries the uploading of real-time location data to the IoT management platform, realizing a shared channel for positioning and upgrade, and reducing hardware overhead.
[0036] The positioning module includes a GPS+BeiDou dual-mode positioning unit, a positioning data acquisition unit, and a positioning data analysis unit.
[0037] The GPS+BeiDou dual-mode positioning unit is responsible for the core function implementation. It integrates the radio frequency receiving front-end and the baseband processor, and works with the coplanar waveguide antenna circuit with 50Ω impedance matching to simultaneously receive navigation message signals from GPS and BeiDou satellite systems, realize multi-constellation joint positioning, and improve satellite acquisition capability and positioning availability in complex environments. The positioning data acquisition unit interfaces with the GPS+BeiDou dual-mode positioning unit to continuously acquire raw observation data at a set sampling rate, including parameters such as pseudorange, carrier phase, Doppler frequency shift, and signal-to-noise ratio. The raw data is formatted and timestamped to generate a structured positioning observation queue for subsequent processing. The positioning data analysis unit receives the observation value queue output by the positioning data acquisition unit and performs data preprocessing, satellite selection, and position calculation.
[0038] The main control unit periodically reads the positioning results output by the positioning data analysis unit through the internal bus, encapsulates them into reporting data frames, and uploads them to the IoT management platform via the communication module.
[0039] The battery protection module monitors the overcharge, over-discharge, overcurrent and short circuit status of the lithium battery in real time. Once an abnormality is detected, the output is immediately shut off to prevent the fault from escalating and to ensure the basic safety of the battery from the source. The charging management module is responsible for managing the trickle, constant current, and constant voltage charging process of the lithium battery by the DC power supply equipment, and provides temperature protection and charging status indication. The two-stage voltage regulator module has a first stage where a boost converter is responsible for boosting the battery voltage to the stable voltage required by the terminal, ensuring sufficient input to the subsequent stages even when the battery voltage is low. The second stage is handled by a low-dropout linear regulator (LDO) that precisely regulates the intermediate voltage to the operating voltage required by the main control, communication, and positioning modules, and filters out high-frequency noise. This provides a stable power supply with low ripple and fast response throughout the daily operation and FOTA upgrade process, preventing voltage drops caused by high-current loads.
[0040] Preferably, in this embodiment, for small IoT industrial terminals, the battery protection module uses the DW07D battery protection chip, which provides overcharge, over-discharge, overcurrent, and short-circuit protection and integrates a high-precision voltage detection circuit; the charging management module uses the TP4056 charging management chip as its core component, with built-in thermal feedback regulation function, which can automatically reduce the charging current when the chip temperature is too high to prevent overheating damage; the first stage of the two-stage voltage regulator module uses the SDB628 chip to achieve efficient boost conversion, and the second stage LDO uses the XC6220 series chip, which has high precision, low noise, and low power consumption characteristics, and is suitable for the voltage stability requirements of the terminal under different conditions.
[0041] Figure 2 This document illustrates a terminal upgrade power supply flowchart for an IoT positioning terminal system integrating FOTA remote upgrade and secure power supply, provided by the present invention. For details, please refer to [link to relevant documentation]. Figure 2 The power supply conversion process during terminal upgrades is as follows: In the normal operating state of the terminal, i.e., the non-upgraded working state: the main control unit periodically monitors the system load and battery power. The charging management module automatically switches between trickle charging, constant current, constant voltage and standby modes according to the lithium battery voltage: when the battery voltage is below 2.9V, it precharges in trickle charging mode; when it reaches 2.9V~4.2V, it charges in 1A constant current mode; when it approaches 4.2V, it switches to constant voltage mode; after it is fully charged, it enters standby mode, which effectively optimizes charging efficiency and battery life and ensures stable power supply when the positioning module is working.
[0042] The battery protection module is in normal monitoring mode, with an overcurrent protection threshold of 1.2 times the peak current. Under normal operating conditions, the positioning module operates in intermittent positioning and data reporting mode, the communication module's radio frequency transmission exhibits periodic burst characteristics, and the system load has the characteristics of moderate dynamic range and moderate rate of change.
[0043] The main control unit enables the boost converter's conventional PWM closed-loop control mode, allowing the duty cycle to be dynamically adjusted within a set range according to load changes. The boost converter tracks the natural decay of the battery voltage, stabilizing the intermediate bus voltage within the range of 5.0V±3%, ensuring that the downstream LDO always has sufficient input voltage margin.
[0044] The main control unit sends a low-level signal to the LDO's MODE pin via GPIO, enabling it to operate in normal mode. In this mode, the LDO's internal error amplifier operates at standard bias current, with a gain-bandwidth product of approximately 100kHz and a quiescent current as low as 25μA, balancing static power consumption and basic dynamic response. The output voltage is set to 3.0~3.3V according to the positioning module's core voltage requirements, allowing for a small dynamic fluctuation of ±5% to accommodate the burst transmission power consumption of the communication module, with a typical output ripple value below 20mVpp. Overall power consumption is optimized while ensuring positioning accuracy, meeting the power supply requirements under normal operating conditions.
[0045] It should be noted that the 3.0V~3.3V range mentioned above is a dynamic range set according to the core voltage requirements of the positioning module in different operating modes. Under normal operating conditions, the positioning module is in an intermittent positioning mode, and the core voltage can fluctuate within this range to adapt to different power consumption scenarios.
[0046] When the main control unit receives the FOTA upgrade command, the terminal enters the upgrade preparation state: The main control unit first reads the current battery voltage and the status register of the charging management module through the analog-to-digital converter interface to determine whether the power supply conditions meet the upgrade requirements, i.e., the battery voltage is not lower than 3.7V and the charging input is stable. If the conditions are met, the main control unit locks the charging management module into a stable constant current charging mode and sets the charging current threshold to 800mA. At the same time, it sends a temporary configuration command to the battery protection module to raise its overcurrent protection threshold to 1.8 times the peak current to prevent false protection triggered by the large current spike during firmware burning. The two-stage voltage regulator module maintains its original working state, i.e., it maintains the current duty cycle output, but suspends the regular dynamic adjustment function to prepare for the subsequent fixed duty cycle mode switch. The main control unit sends a high-level preset signal to the MODE pin of the LDO through GPIO, but keeps the CE pin enabled, so that the bias current of the LDO's internal error amplifier is pre-raised to the threshold of the fast transient response mode, and the compensation capacitor is charged to the operating point. This pre-configuration ensures that the LDO can smoothly switch from normal mode to fast transient response mode the instant the upgrade state is triggered, eliminating the startup delay and voltage step during mode switching.
[0047] After completing the above configuration and waiting for the power supply to stabilize (in this embodiment, the preset delay is 500ms to ensure that the internal state of each module is established), the main control unit requests firmware data from the FOTA remote upgrade server, and the terminal enters the upgrade state. The determination of "stable charging input" is achieved by continuously sampling the input power supply voltage (Vcc) of the charging management module through the analog-to-digital conversion interface of the main control unit.
[0048] In this embodiment, the main control unit continuously collects the ADC value of the input voltage 10 times with a preset sampling period of 100ms, and calculates the average value and the maximum deviation value of the 10 samples.
[0049] The charging input is considered stable if both of the following conditions are met simultaneously: The average value is not lower than the preset 4.5V input voltage stability threshold (corresponding to the normal operating voltage range of a 5V DC adapter). The maximum deviation value shall not exceed the preset allowable range of ±0.2V voltage fluctuation (i.e., the fluctuation amplitude shall not exceed ±4% of the nominal voltage). If any of the above conditions are not met, the charging input is determined to be unstable. The main control unit will wait for a delay (e.g., 500ms) and then re-evaluate until the stability conditions are met or the upgrade preparation is exited due to timeout.
[0050] It should be noted that the "locking the charging management module to constant current charging mode" mentioned in this embodiment does not refer to sending digital communication commands to the charging management module, but is achieved through the following method: the charging mode of the charging management module is automatically switched by its internal circuitry based on the battery voltage. When the battery voltage is between 2.9V and 4.2V, it automatically operates in constant current charging mode. During the upgrade preparation phase, the main control unit first determines that the battery voltage is not lower than 3.7V, ensuring that the battery voltage is within the constant current range, thereby ensuring that the charging management module always operates in constant current mode and preventing it from entering trickle pre-charge mode due to the battery voltage dropping below 2.9V. At the same time, the main control unit controls the enable pin of the charging management chip to maintain a high level through the GPIO interface, ensuring that the charging function remains on throughout the entire upgrade process; and sets the required constant current charging current value (set to 800mA in this embodiment) by adjusting the equivalent resistance to ground of the PROG pin. The above methods together achieve the "locking" of the constant current operating state of the charging management module by the main control unit.
[0051] During the FOTA upgrade process, the main control unit keeps the charging management module locked in a stable constant current charging mode to prevent power ripple and transient voltage drops caused by charging state switching, and to eliminate power supply fluctuations caused by charging disturbances during the upgrade. The two-stage voltage regulator module operates in a high-load stable output state. The first-stage boost converter operates in a fixed duty cycle mode; in this embodiment, the duty cycle is locked at 64%, corresponding to a battery voltage boost from 3.7V to 5.0V. The main control unit continuously sends a high-level signal to the LDO's MODE pin via GPIO, causing it to enter a fast transient response mode. In this mode, the bias current of the LDO's internal error amplifier increases, and the gain-bandwidth product expands from 100kHz in normal mode to approximately 500kHz, enhancing the gate drive capability of the power transistor. When Flash memory erase / write operations cause a step change in the load current, the LDO uses the expanded loop bandwidth to detect the output voltage deviation in real time and adjusts the power transistor's on-resistance within microseconds to directly compensate for voltage drops. Since the fixed duty cycle of the preceding stage already provides a stable input voltage, the LDO does not require additional dropout margin to cope with input fluctuations, allowing it to focus all its regulation capabilities on suppressing load transients. Because the LDO's ability to suppress high-frequency load variations is significantly enhanced, output voltage ripple is kept at extremely low levels, ensuring a stable power supply to the Flash memory during write operations.
[0052] The battery protection module maintains the improved overcurrent and short-circuit protection thresholds, while disabling some non-critical voltage monitoring interrupts to avoid unnecessary alarms during the upgrade process. After the FOTA upgrade is completed, the main control unit first verifies the startup status of the new firmware. Once the upgrade is successful and the system is running normally, the main control unit executes a recovery process, gradually transitioning each power supply module from the upgrade-specific configuration to the normal operating configuration: restoring the undervoltage protection and overcurrent threshold to the normal settings of the battery protection module, i.e., re-enabling some non-critical voltage monitoring interrupts that were disabled during the upgrade; smoothly transitioning the LDO's MODE pin from high to low level, achieving a soft landing of mode switching by gradually changing the GPIO output duty cycle to avoid voltage jumps caused by mode transitions; subsequently, releasing the duty cycle lock of the front-end boost converter and restoring normal PWM closed-loop control; and releasing the forced lock command on the charging management module, restoring it to normal operating status. After the above gradual recovery is completed, the terminal returns to normal operating status. Furthermore, after the upgrade is completed, the terminal reports the upgrade results and current firmware version to the IoT management platform and the batch monitoring host computer via the communication link, forming a complete upgrade closed loop.
[0053] Figure 3 This diagram illustrates the terminal rollback power supply process of an IoT positioning terminal system integrating FOTA remote upgrade and secure power supply provided by the present invention. Please refer to... Figure 3Another embodiment of the present invention provides a power conversion process for a terminal upgrade failure due to a software problem, as follows: Upon detecting an upgrade anomaly, the main control unit will immediately trigger the Flash anomaly automatic rollback process, and the terminal will enter the rollback state of upgrade failure. In this state, the main control unit will keep the charging management module locked in a stable constant current charging mode and further reduce the charging current to 500mA to minimize power ripple and electromagnetic interference, ensuring the complete execution of Flash memory erasure and rewriting. The battery protection module keeps the overcurrent protection threshold at a high level during the upgrade, that is, 1.8 times the peak current, to prevent system power failure due to a brief drop in battery voltage during rollback execution, thereby avoiding equipment damage.
[0054] The main control unit forces the front-end boost converter to output a stable intermediate bus voltage without any frequency hopping or power-saving switching. Compared with the fixed duty cycle mode in the upgrade state, the front-end control in the rollback state is more conservative. The main control unit not only locks the duty cycle, but also directly calibrates the boost output through an internal reference voltage source to ensure that the absolute accuracy of the intermediate voltage is better than ±2%, providing the maximum input voltage margin for the subsequent LDO. The main control unit sends periodic pulse signals (with a duty cycle of about 20%) to the MODE pin of the LDO through GPIO, so that it switches intermittently between "fast transient response mode" and "normal mode" with a specific duty cycle, which is equivalent to achieving the most conservative linear regulation method, ensuring that the current jump caused by the Flash erase and write operation during the rollback process will not cause the output voltage overshoot or drop to exceed ±1%. In rollback mode, the first-stage boost converter in the two-stage voltage regulator module provides a stable intermediate voltage, while the second-stage LDO precisely regulates the voltage using an equivalent conservative adjustment method. This ensures that during the current surges caused by Flash erase / write operations, the output voltage overshoot or drop does not exceed ±1%. This collaborative strategy minimizes power ripple and electromagnetic interference, providing a precise power supply environment for rollback operations. It prevents damage to the original firmware area due to power supply disturbances, ensuring that the terminal can always be restored to the previous normal version.
[0055] It should be noted that, in both upgrade and rollback states, since the write operation of the Flash memory has extremely high requirements for voltage stability, the output voltage of the second-stage LDO in this embodiment is uniformly locked at 3.3V, which is the standard operating voltage required for writing to the Flash memory. Dynamic fluctuations are no longer allowed to ensure the reliability of firmware writing.
[0056] Once the rollback operation is successfully completed and the main control unit confirms that the system has booted normally from the original firmware, the terminal exits the rollback state. The main control unit then performs the same recovery actions as after a successful upgrade, gradually transitioning each power supply module from the rollback-specific configuration to the normal operating configuration (for details of the recovery process, please refer to the description of the recovery actions after a successful upgrade mentioned earlier; it will not be repeated here). After the recovery actions are completed, the terminal returns to its normal operating state. Finally, the terminal reports the upgrade failure, rollback result, and current firmware version to the IoT management platform and the batch monitoring host computer via the communication link, completing the upgrade anomaly reporting.
[0057] Figure 4 This diagram illustrates an IoT management platform for an IoT positioning terminal system integrating FOTA remote upgrades and secure power supply, provided by the present invention. Please refer to [link / reference]. Figure 4 As shown, the IoT management platform includes a data processing module, a remote upgrade management module, and an API interface. In this embodiment, the communication between the IoT management platform and the positioning terminal is implemented based on the MQTT (Message Queuing Telemetry Transport) protocol.
[0058] The data processing module establishes long-term connections with the communication modules of a large number of terminals, receives and parses the location data, battery level, signal strength and firmware version and other status information reported by the terminals, and stores them in the database. At the same time, the module provides a command delivery channel to ensure that the platform's remote control commands to the terminals can be reliably delivered. The remote upgrade management module maintains a list of firmware versions for all terminals. When a remote upgrade is required, it interacts with the FOTA remote server according to the batch policy issued by the host computer, pushes the upgrade command and firmware package download address to the target terminal, and listens for the upgrade progress report from the terminal.
[0059] The batch monitoring host computer connects to the IoT management platform to visualize the battery level, signal strength, firmware version, and location information of multiple terminals, and performs batch management of the terminals.
[0060] Regarding communication protocols, the batch monitoring host computer and the IoT management platform use HTTPS for secure communication, and data interaction is achieved by calling the RESTful API interface opened by the IoT management platform. The API interface uses tokens or API keys for authentication; all requests must carry an authentication token to ensure the legitimacy and security of the API calls. The data exchange format between the host computer and the platform uses JSON (JavaScript Object Notation) structure, which has advantages such as being lightweight, easy to parse, and supporting cross-language languages.
[0061] In terms of batch management, the batch monitoring host computer enables the classification and control of a large number of terminals through batch management functions. Device grouping supports division by multiple dimensions: grouping by geographical location (such as dividing terminals by province, city, or region), grouping by device model (grouping terminals with the same hardware version into the same group to ensure the compatibility of upgrade packages), grouping by firmware version (grouping terminals with the same current firmware version to facilitate unified version upgrades), and grouping by custom tags (supporting user-defined tags, such as "Production Line A", "Test Group", etc.), enabling flexible device filtering and batch operations.
[0062] The upgrade scope configuration supports multiple modes: full upgrade (upgrades all devices under the specified product model that meet the upgrade conditions), targeted upgrade (upgrades only the specific devices manually selected by the user), gray-scale upgrade (gradually expands the upgrade scope by percentage, for example, first upgrades 10% of the devices for verification, and then gradually expands to all devices after verification), and group upgrade (upgrades according to preset device groups).
[0063] The upgrade strategy configuration supports the following parameters: upgrade time strategy (supports "upgrade immediately" or "scheduled upgrade" to specify a future time point to start the upgrade), failure retry strategy (supports configuring the retry interval after upgrade failure, such as no retry, immediate retry, retry after 10 minutes, retry after 30 minutes, etc.), timeout control (supports configuring the upgrade timeout time for a single device, such as 60 minutes, after which the upgrade is considered to have failed), and concurrency control (supports configuring the upper limit of the number of devices that can be upgraded at the same time, to avoid large-scale concurrent upgrades from impacting the network and servers).
[0064] Regarding the format for issuing upgrade strategies, the host computer issues upgrade commands to the terminal through the IoT management platform. The command format adopts a JSON structure and is pushed to the target terminal via MQTT or HTTPS protocol.
[0065] Regarding upgrade status reporting, after receiving the upgrade instruction, the terminal reports the upgrade progress and status to the host computer in real time through the IoT management platform. The status reporting also uses JSON format.
[0066] Figure 5 This diagram illustrates a batch upgrade task scheduling flowchart for an IoT positioning terminal system integrating FOTA remote upgrade and secure power supply, provided by the present invention. Please refer to [link / reference]. Figure 5 Regarding the batch upgrade task scheduling process, the complete process of batch monitoring host computer executing batch FOTA upgrades is as follows: The administrator uploads the new firmware package to the FOTA remote upgrade server and records metadata such as version number, file size, and MD5 value; The host computer selects the target device (or device group) and configures parameters such as upgrade scope (all / targeted / grayscale / grouped), upgrade time (immediate / timed), retry strategy, and timeout. The host computer calls the API interface of the IoT management platform to create batch upgrade tasks, and the platform generates a unique task_id; The IoT management platform pushes upgrade commands to the target terminal via MQTT or HTTPS protocols; After receiving the instruction, the main control unit determines that the power supply conditions meet the upgrade requirements and then issues a power supply configuration instruction. After each power supply module completes the state switching and runs stably, the firmware package is downloaded from the specified URL, and the upgrade is performed after verifying the MD5 integrity. During the upgrade process, the terminal continuously reports the progress and upgrade results, and the host computer displays the upgrade status in real time and generates a visual upgrade task report based on the results reported by the terminal. For devices that fail to upgrade, the host computer will automatically initiate a retry according to the configured retry policy, or the administrator can manually intervene.
[0067] By employing the aforementioned technical means, a batch remote management system can be formed to meet the needs of efficient batch management of multiple terminals in IoT commercial scenarios.
[0068] This invention relates to an IoT positioning terminal system integrating FOTA remote upgrades and secure power supply. Centered on the positioning terminal hardware, it is equipped with an external FOTA remote upgrade server, an IoT management cloud platform, DC power supply equipment, and a batch monitoring host computer, forming a four-dimensional collaborative operation system of "power supply—upgrade—positioning and communication—batch management." Through a power supply protection chain consisting of an integrated battery protection module, a charging management module, and a two-stage voltage regulator module, it coordinates multi-state power supply with the entire FOTA upgrade process, eliminating the risk of firmware damage due to power disturbances or unexpected interruptions during the upgrade process. This significantly improves the success rate and reliability of terminal upgrades and ensures high voltage stability in various scenarios such as charging, battery power supply, and FOTA upgrades, protecting circuit and battery safety and extending device lifespan.
[0069] The above embodiments are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. An IoT positioning terminal system integrating FOTA remote upgrade and secure power supply, characterized in that, include: With positioning terminal hardware as the core, it is equipped with external FOTA remote upgrade server, IoT management platform, DC power supply equipment and batch monitoring host computer; The positioning terminal hardware includes a main control unit, a positioning module, and a power supply protection chain consisting of an integrated battery protection module, a charging management module, and a two-stage voltage regulator module. The main control unit subdivides the terminal's working state into a normal operating state, an upgrade preparation state, an upgrade state, and a rollback state in case of upgrade failure. When the upgrade is successfully completed or the rollback operation is successfully completed, the main control unit performs a recovery action, transitioning the working parameters of the battery protection module, charging management module, and two-stage voltage regulator module from special configuration to normal operating configuration, so that the terminal returns to the normal operating state. In the upgrade preparation state, the main control unit reads the current battery voltage and the status register of the charging management module to determine whether the power supply conditions meet the upgrade requirements. If they do, it sends a lock command to the charging management module to lock it into constant current charging mode and sets the charging current threshold. It also sends a temporary configuration command to the battery protection module to increase the overcurrent protection threshold. In the upgraded state, the main control unit keeps the charging management module locked in the constant current charging mode, controls the first-stage boost converter in the two-stage voltage regulator module to work in the fixed duty cycle mode, switches the second-stage low-dropout linear regulator to the fast transient response mode, and controls the battery protection module to maintain the upgraded overcurrent and short-circuit protection thresholds. In the rollback state following the upgrade failure, the main control unit keeps the charging management module locked in constant current charging mode and reduces the charging current threshold, keeps the overcurrent protection threshold of the battery protection module at the high level after the upgrade, and forces the first-stage boost converter in the two-stage voltage regulator module to stabilize the voltage and the second-stage low-dropout linear regulator to stabilize the output target voltage and lock it to the standard value required to be written into the Flash memory.
2. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 1, characterized in that, The battery protection module monitors the overcharge, over-discharge, overcurrent, and short-circuit status of the lithium battery in real time.
3. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 1, characterized in that, The charging management module is responsible for managing the trickle, constant current, and constant voltage charging processes of the lithium battery by the DC power supply equipment.
4. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 1, characterized in that, In the two-stage voltage regulator module: The first stage is a boost converter, which is used to boost the battery voltage to the stable voltage required by the terminal. The second stage is a low-dropout linear regulator, which is used to accurately regulate the intermediate voltage to the operating voltage required by the main control, communication module and positioning module.
5. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 1, characterized in that, Under the normal operating conditions: The charging management module automatically switches between trickle, constant current, constant voltage and standby modes based on the lithium battery voltage, and sets the voltage switching thresholds for trickle, constant current and constant voltage respectively. The battery protection module maintains a normal monitoring mode based on the standard overcurrent protection threshold; The first stage of the two-stage voltage regulator module performs a boost operation, while the second stage provides a stable output voltage according to the core voltage requirements of the positioning module, ensuring the stable operation of the positioning module.
6. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 1, characterized in that, The determination of whether the power supply conditions meet the upgrade requirements is made by the main control unit continuously collecting the ADC value of the input power supply voltage of the charging management module at a preset sampling period, calculating the average value and the maximum deviation value of multiple samples. If the average value is not lower than the preset input voltage stability threshold and the maximum deviation value does not exceed the preset voltage fluctuation allowable range, the charging input is determined to be stable. If the average value is lower than the preset input voltage stability threshold or the maximum deviation value exceeds the preset voltage fluctuation allowable range, the main control unit delays and waits before re-determining, until the stability conditions are met or the upgrade preparation is exited due to timeout.
7. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 1, characterized in that, In the upgraded state, the main control unit keeps the charging management module locked in constant current charging mode by controlling the charging management chip to maintain a high level to ensure that the charging function is continuously enabled, and by adjusting the equivalent resistance of the constant current setting pin of the charging management chip to ground to set the constant current charging current value.
8. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 1, characterized in that, In the rollback state of the upgrade failure, the target voltage of the second-stage low-dropout linear regulator is locked at the standard value required to be written to the Flash memory, and the main control unit sends periodic pulse signals to the low-dropout linear regulator to make it switch intermittently between fast transient response mode and normal mode with a specific duty cycle.
9. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 1, characterized in that, The IoT management platform includes: a data processing module, a remote upgrade management module, and an API interface; The data processing module is used to establish a long connection with the terminal's communication module, and to receive and parse the status information reported by the terminal. The remote upgrade management module is used to maintain the terminal firmware version list and interact with the FOTA remote server to push upgrade instructions to the terminal; The API interface is used to connect to the host computer for batch monitoring.
10. The IoT positioning terminal system integrating FOTA remote upgrade and secure power supply according to claim 9, characterized in that, The batch monitoring host computer is connected to the IoT management platform through an API interface. It is used to visualize the battery level, signal strength, firmware version and location information of multiple terminals, remotely issue FOTA upgrade policies to selected batches of terminals, view upgrade progress or rollback status, and generate upgrade task reports based on the results reported by the terminals.
Citation Information
Patent Citations
Method and system for solving problem that FOTA cannot be re-refreshed after FOTA upgrade failure
CN112764964A
Roll-back method and device for firmware upgrade failure, equipment and storage medium
CN114528150A
Firmware upgrade rollback method and system, electronic equipment and readable storage medium
CN116594810A
Vehicle FOTA upgrading system and method based on feed protection
CN117785256A
Remote upgrade failure processing method, electronic equipment and storage medium
CN119653334A