HVAC systems and their OTA upgrade methods

By using a wireless communication module to connect the host and multiple slave devices in the HVAC system via a bus, with the host acting as a transmission relay station, batch firmware upgrades of multiple slave devices can be achieved. This solves the problems of long upgrade times and poor user experience in existing technologies, and improves upgrade efficiency and user satisfaction.

CN123114518APending Publication Date: 2026-11-17SHENZHEN OURUIBO ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611318489.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

The existing OTA upgrades for HVAC systems take a long time, resulting in a poor user experience. In particular, when there are a large number of devices, the total number of firmware package transmissions is high, causing the entire system to be in an upgrade state for a long time.

Method used

An OTA upgrade method for HVAC systems is constructed, which connects the host and multiple slave devices via a bus through a wireless communication module. The host acts as a transmission relay station to realize batch firmware upgrades for multiple slave devices, thereby reducing the total number of firmware package transmissions and the downtime of the entire system.

Benefits of technology

It shortened the overall upgrade time, improved the user experience, and reduced the downtime of devices during the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114518A_ABST
    Figure CN123114518A_ABST
Patent Text Reader

Abstract

This application discloses a heating, ventilation, and air conditioning (HVAC) system and its OTA (Over-The-Air) upgrade method. The OTA upgrade method includes: when the target upgrade object is a target slave among a plurality of slave devices, receiving upgrade request information sent by the host to the target slave from the second bus; initiating a receiving task and receiving a firmware package to be upgraded sent by the host to the target slave from the second bus; and performing a firmware upgrade based on the received firmware package to be upgraded. Implementing the technical solution of this application can reduce the total transmission volume, shorten the total upgrade time, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of firmware upgrades, and more particularly to a heating, ventilation and air conditioning system and its OTA upgrade method. Background Technology

[0002] Existing HVAC systems typically employ a point-to-point transmission method for OTA (Over-The-Air) upgrades. This means that each device on the bus is addressed sequentially, and the complete firmware package is transmitted to each device one by one. For example, if there are N (N ≥ 2) devices of the same model, the same firmware needs to be transmitted N times on the bus. Therefore, when there are a large number of devices of the same model, the total number of firmware package transmissions will also be large, resulting in a long firmware upgrade time. Moreover, serial upgrades keep the entire system in an upgrade state for an extended period, leading to a poor user experience. Summary of the Invention

[0003] The technical problem to be solved by this application is to provide a heating and ventilation system and its OTA upgrade method, addressing the technical defects of the existing technology, such as long firmware upgrade time and poor user experience.

[0004] The technical solution adopted by this application to solve its technical problem is: constructing an OTA upgrade method for a heating, ventilation, and air conditioning (HVAC) system, wherein the HVAC system includes a wireless communication module, a host, and multiple slave devices, the OTA upgrade method is applied to the multiple slave devices, the wireless communication module is connected to the host through a first bus, and the host and the multiple slave devices are connected to a second bus; the OTA upgrade method includes: When the target upgrade object is a target slave among the multiple slaves, the upgrade request information sent by the host to the target slave is received from the second bus; Initiate a receiving task and receive the firmware package to be upgraded sent by the host to the target slave from the second bus; Firmware upgrade is performed based on the received firmware package to be upgraded.

[0005] Optionally, the upgrade request information includes the type of the target slave device; The initiation of the receiving task includes: Determine whether its own type matches the type of the target slave device, and if they match, initiate the receiving task.

[0006] Optionally, before the step of initiating the receiving task, the following steps are also included: Receive the target firmware identifier corresponding to the firmware package to be upgraded sent by the host to the target slave via the second bus; The initiation of the receiving task includes: Determine whether the current firmware identifier matches the target firmware identifier. If they do not match, start the receiving task.

[0007] Optionally, the upgrade request information includes the address of the target slave device; Prior to the step of initiating the receiving task, the following is also included: It determines whether its own address is consistent with the address of the target slave device. If they are consistent, it enters the ready state and returns upgrade ready information to the host through the second bus.

[0008] This invention also constructs an OTA upgrade method for a heating, ventilation, and air conditioning (HVAC) system. The HVAC system includes a wireless communication module, a host, and multiple slave devices. The wireless communication module is connected to the host via a first bus, and the host and the multiple slave devices are connected to a second bus. The OTA upgrade method includes: The wireless communication module determines the target upgrade object and sends upgrade request information to the host through the first bus, wherein the upgrade request information includes the target upgrade object; When the host determines that the target upgrade object is a target slave among the multiple slaves based on the received upgrade request information, it sends the upgrade request information to the target slave through the second bus. At least one slave device initiates a receiving task based on the received upgrade request information; The wireless communication module sends the firmware package to be upgraded to the host via the first bus; After receiving the firmware package to be upgraded, the host sends the firmware package to be upgraded to the target slave via the second bus; The at least one slave device performs a firmware upgrade based on the received firmware package to be upgraded.

[0009] Optionally, it also includes: When the host determines that the target upgrade object is the host based on the received upgrade request information, it enters a ready state and returns upgrade ready information to the wireless communication module through the first bus. When the wireless communication module receives the upgrade ready information, it sends the firmware package to be upgraded to the host through the first bus. The host performs a firmware upgrade based on the received firmware package to be upgraded.

[0010] Optionally, sending the firmware package to be upgraded to the host via the first bus includes: The wireless communication module divides the firmware package to be upgraded into multiple packets and sends the multiple packets to the host one by one through the first bus; The host performs a firmware upgrade based on the received firmware package to be upgraded, including: The host receives the multiple packets one by one, and after receiving all the multiple packets, combines the multiple packets into a firmware package; The integrity of the combined firmware package is verified, and if the verification passes, the firmware is upgraded based on the combined firmware package.

[0011] Optionally, it also includes: For at least one of the multiple packets, the host determines whether the packet was successfully received after receiving it. If so, it returns confirmation information to the wireless communication module through the first bus. The wireless communication module determines whether it receives confirmation information for the sub-packet within a preset time. If it does not receive confirmation, it retransmits the sub-packet.

[0012] Optionally, after the step of the host performing a firmware upgrade based on the received firmware package to be upgraded, the method further includes: The host sends its current firmware identifier to the wireless communication module via the first bus; The wireless communication module determines whether the host has been successfully upgraded based on the received current firmware identifier of the host. And / or, Following the firmware upgrade step, the following is also included: The target slave device sends its current firmware identifier to the host device via the second bus; After receiving the current firmware identifier of the target slave device, the host device sends the current firmware identifier of the target slave device to the wireless communication module through the first bus. The wireless communication module determines whether the target slave device has been successfully upgraded based on the received current firmware identifier of the target slave device.

[0013] The present invention also constructs a heating, ventilation and air conditioning system, comprising: Wireless communication module; Host; and The slave device includes a processor and a memory storing a computer program. When the processor executes the computer program, it implements the steps of the OTA upgrade method described above. The wireless communication module is connected to the host via a first bus, and the host is connected to multiple slave devices via a second bus.

[0014] In the technical solution of this application, since the wireless communication module is connected to the host via the first bus, and the host is connected to multiple slave devices via the second bus, when a firmware upgrade is required for one of the target slave devices, the host, acting as a transmission relay station, will send the upgrade request information received from the wireless communication module and the firmware package to be upgraded to the target slave device via the second bus. The slave devices connected to the second bus can listen for the upgrade request information and initiate a receiving task to receive the firmware package to be upgraded from the second bus before performing the firmware upgrade. Therefore, batch firmware upgrades for multiple slave devices are achieved. Compared with the existing one-to-one upgrade method, this upgrade method significantly reduces the total number of transmissions of the firmware package to be upgraded, shortens the total upgrade time, and also reduces the overall device downtime (the device is unavailable during the upgrade process), thus improving the user experience. Attached Figure Description

[0015] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a logical structure diagram of the HVAC system in the first embodiment of the present invention; Figure 2 This is a flowchart of the OTA upgrade method for a heating, ventilation, and air conditioning system in the first embodiment of the present invention; Figure 3 This is a flowchart of the OTA upgrade method for a heating, ventilation, and air conditioning system in the second embodiment of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] Figure 1This is a logical structure diagram of a heating, ventilation, and air conditioning (HVAC) system according to a first embodiment of the present invention. The HVAC system in this embodiment includes a wireless communication module 10, a host 20, and multiple slave units 31, 32, ..., 33. The number of slave units can be any number greater than or equal to two. The wireless communication module 10 is connected to the host 20 via a first bus. The host 20 and the multiple slave units 31, 32, ..., 33 are connected to a second bus. The host 20 is, for example, an outdoor unit (outdoor host). At least some of the multiple slave units 31, 32, ..., 33 are expandable devices of the same model, running the same firmware. For example, the slave units include multiple indoor unit devices (e.g., fan coil units) and / or multiple underfloor heating devices of the same model.

[0018] In some embodiments, the first bus and the second bus are, for example, RS485 buses. The wireless communication module 10 is, for example, a 4G module, and connects to the cloud platform via a 4G wireless network, serving as the sole network entry point for the entire HVAC system. The 4G module is directly connected to the host via an independent RS485 bus (the first bus), with the host acting as a transmission relay station. It is then connected to multiple slave devices via another independent RS485 bus (the second bus), with the two RS485 buses isolated from each other. None of the slave devices are directly connected to the 4G module; instead, the host forwards the protocol on the second bus. The host 20 can serve as both a target for upgrades and a transmission relay station for slave devices 31, 32, ..., 33. Slave devices 31, 32, ..., 33 can only serve as target devices for upgrades.

[0019] like Figure 2 The diagram shown is a flowchart of the OTA upgrade method for the HVAC system in the first embodiment. Figure 1 The OTA upgrade method of this embodiment is applied to the slave device of the HVAC system and includes: Step S11: When the target upgrade object is the target slave among the multiple slaves, receive the upgrade request information sent by the host to the target slave from the second bus; In this step, the target upgrade object can be a wireless communication module, a master, or a slave. When the target upgrade object is one of multiple slaves (the target slave), the wireless communication module first sends the upgrade request information to the master through the first bus, and the master then sends the upgrade request information to the target slave through the second bus.

[0020] In some applications, the first bus and the second bus each maintain a set of flag registers. These flag registers are divided into four fields: message source, OTA status, type of the target upgrade object, and address of the target upgrade object. The flag register corresponding to the first bus is read and written only by the wireless communication module and the host, while the flag register corresponding to the second bus is read and written only by the host and each slave device.

[0021] The wireless communication module sends an upgrade request to the host by writing to the flag register corresponding to the first bus. Specifically, it writes "wireless communication module" to the message source field of the flag register, "request" to the OTA status field of the flag register, "type of the target slave (e.g., underfloor heating)" to the type field of the target upgrade object of the flag register, and "address of the target slave" to the address field of the target upgrade object of the flag register.

[0022] The host receives upgrade request information by reading the corresponding flag register (the flag register corresponding to the first bus) within its internal system.

[0023] When the host determines that the target upgrade object is the target slave device based on the upgrade request information, it sends the upgrade request information by writing to the corresponding flag register (the flag register corresponding to the second bus). Specifically, "host" is written to the message source field of the flag register, "request" is written to the OTA status field, "type of the target slave device (e.g., underfloor heating)" is written to the target upgrade object type field, and "address of the target slave device" is written to the target upgrade object address field. In this way, all slave devices connected to the second bus can passively listen for the upgrade request information.

[0024] Step S12: Start the receiving task and receive the firmware package to be upgraded sent by the host to the target slave from the second bus; In this step, when multiple slave devices connected to the second bus hear the upgrade request information sent by the master, they can start a receiving task to synchronously receive the firmware package to be upgraded when the master sends it to the target slave device.

[0025] Step S13: Perform firmware upgrade based on the received firmware package to be upgraded.

[0026] In this step, the slave device can perform a firmware upgrade by executing a bootloader after receiving the firmware package.

[0027] In this embodiment, since the wireless communication module is connected to the host via the first bus, and the host is connected to multiple slave devices via the second bus, when a firmware upgrade is needed for one of the target slave devices, the host, acting as a transmission relay station, will send the upgrade request information received from the wireless communication module and the firmware package to be upgraded to the target slave device via the second bus. The slave devices connected to the second bus can also hear the upgrade request information and will initiate a receiving task to receive the firmware package to be upgraded from the second bus before performing the firmware upgrade. Therefore, batch firmware upgrades for multiple slave devices are achieved. Compared to the existing one-to-one upgrade method, this upgrade method significantly reduces the total number of transmissions of the firmware package to be upgraded on the second bus, shortens the total upgrade time, and also reduces the overall device downtime (the device is unavailable during the upgrade process), thus improving the user experience.

[0028] Furthermore, in an optional embodiment, the upgrade request information includes the type of the target slave device; The initiation of the receiving task includes: Determine whether its own type matches the type of the target slave device, and if they match, initiate the receiving task.

[0029] In this embodiment, if there are multiple types of slave devices connected to the second bus, when the master sends an upgrade request to the target slave device via the second bus, each slave device will determine whether its own type matches that of the target slave device. If they match, it will determine that it also needs to be upgraded synchronously (piggyback), and then start a receiving task, waiting for the master to send the firmware package to be upgraded on the second bus. If they do not match, it will determine that it does not need to be upgraded synchronously, and then will not start a receiving task, and will not receive the firmware package to be upgraded sent by the master on the second bus. In this way, not only can batch firmware upgrades of multiple slave devices of the same type (running the same firmware) be realized, but the operation of other types of slave devices is not affected.

[0030] Furthermore, in an optional embodiment, prior to the step of initiating the receiving task, the following is also included: Receive the target firmware identifier corresponding to the firmware package to be upgraded sent by the host to the target slave via the second bus; The initiation of the receiving task includes: Determine whether the current firmware identifier matches the target firmware identifier. If they do not match, start the receiving task.

[0031] In this embodiment, when a slave device connected to the second bus receives an upgrade request and a target firmware identifier, it determines whether its current firmware identifier matches the target firmware identifier. If they do not match, it indicates that it needs to upgrade its firmware and initiates the receiving task. If they match, it indicates that it already has the latest firmware and does not need to upgrade, and therefore does not initiate the receiving task. This avoids the slave device from repeatedly upgrading the same firmware, reducing its power consumption and software resource consumption.

[0032] Furthermore, in an optional embodiment, the upgrade request information includes the address of the target slave device; Prior to the step of initiating the receiving task, the following is also included: It determines whether its own address is consistent with the address of the target slave device. If they are consistent, it enters the ready state and returns upgrade ready information to the host through the second bus.

[0033] In this embodiment, after receiving the upgrade request information, the target slave device determines that the upgrade request information is addressed to itself based on its address, and then enters a ready state. For example, it shuts down functional modules such as the compressor. After entering the ready state, it returns upgrade ready information to the host. When the host receives the upgrade ready information returned by the slave device, it then returns upgrade ready information to the wireless communication module. The wireless communication module only begins sending the firmware package to be upgraded after receiving the upgrade ready information returned by the host. This avoids the firmware package reception failure caused by the target slave device starting to transmit the firmware package before it is ready.

[0034] like Figure 3 The diagram shown is a flowchart of the OTA upgrade method for the HVAC system in the second embodiment. Figure 1 The OTA upgrade method in this embodiment includes: Step S21: The wireless communication module determines the target upgrade object and sends upgrade request information to the host through the first bus, wherein the upgrade request information includes the target upgrade object; In this step, the wireless communication module, acting as the sole network entry point for the entire HVAC system, connects to the cloud platform via a wireless network (e.g., 4G). It can actively query or passively notify the cloud platform to confirm the existence of new firmware. If new firmware exists, it determines whether the target upgrade object is itself, the host, or a slave device, and then initiates the OTA upgrade process. If the new firmware is for a slave device, before initiating the OTA upgrade process, the wireless communication module and the host will perform a pre-check of the firmware identifiers of each slave device according to a preset or random order to identify a target slave device, which is the target upgrade object. Specifically, assuming there are 31 slave devices, first check the firmware identifier of slave device 1. If it does not match the target firmware identifier (the identifier of the new firmware), then slave device 1 is determined to be the target slave device; otherwise, skip slave device 1 and check the firmware identifier of slave device 2. If it does not match the target firmware identifier, then slave device 2 is determined to be the target slave device; otherwise, skip slave device 2 and check the firmware identifier of slave device 3 in the same way, and so on, until the target slave device to be upgraded is determined.

[0035] After identifying the target upgrade object (which can be a 4G module, a host, or a slave), the wireless communication module sends an upgrade request to the host via the first bus. For example, this can be achieved by writing to its internal flag register (the flag register corresponding to the first bus). Specifically, the wireless communication module writes "wireless communication module" to the message source field of the flag register, "request" to the OTA status field of the flag register, "type of target upgrade object" to the type field of the target upgrade object, and "address of target upgrade object" to the address field of the target upgrade object.

[0036] Step S22: When the host determines that the target upgrade object is a target slave among the multiple slaves based on the received upgrade request information, the host sends the upgrade request information to the target slave through the second bus. In this step, the host can receive the upgrade request information, for example, by reading the corresponding internal flag register (the flag register corresponding to the first bus). If the target upgrade object is determined to be a target slave among multiple slaves based on the upgrade request information, the host then sends the upgrade request information to the target slave through the second bus. For example, the host can send the upgrade request information by writing to the corresponding internal flag register (the flag register corresponding to the second bus). Specifically, the host writes "host" to the message source field of the flag register, "request" to the OTA status field of the flag register, "the type of the target slave (e.g., underfloor heating)" to the type field of the target upgrade object of the flag register, and "the address of the target slave" to the address field of the target upgrade object of the flag register.

[0037] Step S23: At least one slave device initiates a receiving task based on the received upgrade request information; In this step, at least one slave device connected to the second bus can passively listen to the upgrade request information sent by the master and then start a receiving task to wait for the master to send the firmware package to be upgraded to the target slave device through the second bus.

[0038] Step S24: The wireless communication module sends the firmware package to be upgraded to the host via the first bus; Step S25: After receiving the firmware package to be upgraded, the host sends the firmware package to be upgraded to the target slave via the second bus; Step S26: The at least one slave device performs a firmware upgrade based on the received firmware package to be upgraded.

[0039] In this step, when the host sends the firmware package to be upgraded to the target slave via the second bus, at least one slave connected to the second bus will also receive the firmware package synchronously and perform firmware upgrade, for example, by executing a bootloader.

[0040] In this embodiment, since the wireless communication module is connected to the host via the first bus, and the host is connected to multiple slave devices via the second bus, when a firmware upgrade is needed for one of the target slave devices, the host, acting as a transmission relay station, will send the upgrade request information received from the wireless communication module and the firmware package to be upgraded to the target slave device via the second bus. The slave devices connected to the second bus can also hear the upgrade request information and will initiate a receiving task to receive the firmware package to be upgraded from the second bus before performing the firmware upgrade. Therefore, batch firmware upgrades for multiple slave devices are achieved. Compared to the existing one-to-one upgrade method, this upgrade method significantly reduces the total number of transmissions of the firmware package to be upgraded on the second bus, shortens the total upgrade time, and also reduces the overall device downtime (the device is unavailable during the upgrade process), thus improving the user experience.

[0041] Furthermore, in an optional embodiment, the OTA upgrade method of the present invention further includes: When the host determines that the target upgrade object is the host based on the received upgrade request information, it enters a ready state and returns upgrade ready information to the wireless communication module through the first bus. When the wireless communication module receives the upgrade ready information, it sends the firmware package to be upgraded to the host through the first bus. The host performs a firmware upgrade based on the received firmware package to be upgraded, for example, by executing a bootloader.

[0042] In this embodiment, when a firmware upgrade of the host is required, after the wireless communication module sends an upgrade request to the host, the host first determines itself as the target upgrade object based on the upgrade request information, and then enters a ready state, for example, by shutting down functional modules and returning upgrade ready information to the wireless communication module. Upon receiving the upgrade ready information, the wireless communication module sends the firmware package to be upgraded to the host, allowing the host to perform a firmware upgrade based on the received firmware package.

[0043] Furthermore, in an optional embodiment, sending the firmware package to be upgraded to the host via the first bus specifically includes: The wireless communication module divides the firmware package to be upgraded into multiple packets and sends each packet to the host via the first bus. In this step, the wireless communication module can divide the firmware package into multiple packets according to a set fixed length. Each packet has its own packet sequence number. If the last packet (the last packet) is not long enough, it can be padded with 0xFF. The host performs a firmware upgrade based on the received firmware package to be upgraded, including: The host receives the multiple packets one by one, and after receiving all the multiple packets, combines the multiple packets into a firmware package; The integrity of the combined firmware package is verified, and if the verification passes, the firmware is upgraded based on the combined firmware package.

[0044] In this embodiment, the wireless communication module can send each packet (carrying a packet sequence number) sequentially according to a preset order. The host receives each packet and saves it, for example, by writing it to FLASH. After receiving all packets, the multiple packets are combined according to their sequence numbers, and the integrity of the combined firmware package is verified. If the verification passes, the bootloader can be redirected to perform the upgrade; otherwise, no redirection is performed.

[0045] Furthermore, in an optional embodiment, the OTA upgrade method of the present invention further includes: For at least one of the multiple packets, the host determines whether the packet was successfully received after receiving it. If so, it returns confirmation information to the wireless communication module through the first bus. The wireless communication module determines whether it receives confirmation information for the sub-packet within a preset time. If it does not receive confirmation, it retransmits the sub-packet.

[0046] In this embodiment, when the host successfully receives a packet, it returns an acknowledgment message (ACK message) to the wireless communication module. The wireless communication module can then determine whether the packet was successfully received by checking whether it receives the acknowledgment message within a preset time (e.g., 5 seconds). If the packet is not successfully received, it can be resent, thus improving the reliability of firmware packet transmission.

[0047] In addition, in some embodiments, if the wireless communication module determines that the host has failed to receive a certain packet multiple times (e.g., three times) in a row, it can determine that the OTA upgrade has failed and exit the upgrade process.

[0048] Furthermore, in an optional embodiment, after the step of the host performing a firmware upgrade based on the received firmware package to be upgraded, the method further includes: The host sends its current firmware identifier to the wireless communication module via the first bus; The wireless communication module determines whether the host has been successfully upgraded based on the received current firmware identifier of the host.

[0049] In this embodiment, after the host performs a firmware upgrade, it can also send its current firmware identifier to the wireless communication module so that the wireless communication module can determine whether the host has been upgraded successfully based on the received current firmware identifier of the host. Specifically, if the current firmware identifier of the host is consistent with the target firmware identifier, it means that the host upgrade is successful; otherwise, the upgrade is unsuccessful, and the host OTA upgrade process can be initiated again.

[0050] Furthermore, in an optional embodiment, after the firmware upgrade step, the method further includes: The target slave device sends its current firmware identifier to the host device via the second bus; After receiving the current firmware identifier of the target slave device, the host device sends the current firmware identifier of the target slave device to the wireless communication module through the first bus. The wireless communication module determines whether the target slave device has been successfully upgraded based on the received current firmware identifier of the target slave device.

[0051] In this embodiment, after the target slave device undergoes a firmware upgrade, it can send its current firmware identifier to the host. The host then sends the target slave device's current firmware identifier to the wireless communication module, allowing the wireless communication module to determine whether the target slave device has successfully upgraded based on the received target slave device's current firmware identifier. If the target slave device's current firmware identifier does not match the target firmware identifier, it indicates that the target slave device has not upgraded successfully, and the host OTA upgrade process should be initiated again for the target slave device. If the target slave device's current firmware identifier matches the target firmware identifier, it indicates that the target slave device has successfully upgraded. At this time, the current firmware identifier of the next slave device can be pre-checked according to a preset order. If the current firmware identifier of the next slave device does not match the target firmware identifier, it indicates that the slave device failed to upgrade during the piggyback upgrade. In this case, the target slave device (target upgrade object) is selected, and the host OTA upgrade process is initiated for the target slave device. If the current firmware identifier of the next slave device matches the target firmware identifier, it indicates that the slave device successfully upgraded during the piggyback upgrade, and the process continues to pre-check the current firmware identifier of the next slave device until all slave devices to be upgraded have been polled.

[0052] The present invention also constructs a heating, ventilation and air conditioning system, such as Figure 1 As shown, the HVAC system in this embodiment includes: a wireless communication module 10, a host 20, and multiple slave units 31, 32, ..., 33. The wireless communication module 10 is connected to the host 20 via a first bus, and the host 20 and the multiple slave units 31, 32, ..., 33 are connected to a second bus. Each slave unit includes a processor and a memory storing a computer program. When the processor executes the computer program, it implements the steps of the OTA upgrade method applied to the slave unit.

[0053] In one specific embodiment, combined with Figure 1 The wireless communication module 10 is a 4G module responsible for initiating the OTA upgrade process. The host unit 20 is the outdoor unit, and the slave units 31, 32, ..., 33 include multiple indoor units and multiple underfloor heating units. The host unit 20 can be either the target for upgrades or a relay station for the slave units 31, 32, ..., 33; the slave units 31, 32, ..., 33 can only be the target for upgrades. Furthermore, the upgrade communication link differs depending on the target: when upgrading the host unit 20, the communication link between the wireless communication module 10 and the host unit 20 is established only via the first bus; when upgrading the slave units 31, 32, ..., 33, the communication link between the wireless communication module 10 and the host unit 20 is first established via the first bus, and then a two-level forwarding is achieved between the host unit 20 and the slave units 31, 32, ..., 33 via the second bus.

[0054] In addition, a set of OTA registers is maintained through the first bus and the second bus respectively. The OTA register corresponding to the first bus is read and written only by the wireless communication module 10 and the host 20, while the OTA register corresponding to the second bus is read and written only by the host 20 and slaves 31, 32, ..., 33. Reading and writing of the OTA registers are all completed through the function code on the respective bus, for example, through the Modbus function code (03 / 06 / 10) on the RS485 bus. The OTA register consists of a flag register and several adjacent registers. The flag register is divided into four fields: message source (e.g., from the 4G module, outdoor unit, indoor unit, floor heating), OTA status (e.g., request, ready / idle, canceled, start, end), type of target upgrade object (e.g., outdoor unit, indoor unit, floor heating), and address of the target upgrade object (e.g., the outdoor unit address is fixed at 0x01; the addresses of the 31 indoor units are 0x81~0x9F; the addresses of the 15 floor heating units are 0xA1~0xAF). The registers immediately following the flag register store the new firmware identifier (e.g., the new firmware version number) and the new firmware file size, respectively. The registers that follow store the firmware sub-packet sequence number and the firmware package content.

[0055] When a firmware upgrade is required for the host 20, the wireless communication module 10 initiates the OTA process and determines that the target upgrade object is the host 20. At this time, the wireless communication module 10 writes "request" to the OTA status of the OTA register corresponding to the first bus, and simultaneously writes the new firmware version number (target firmware identifier) ​​and file size. The host 20 obtains the type and address of the target upgrade object by reading the OTA register, and determines that it is the target upgrade object. Then, it reads the new firmware version number in the OTA register and compares it with its own currently running firmware version number. If the two are different (indicating that an upgrade is needed), the host 20 writes the OTA status of the OTA register to "ready", starts the firmware receiving task, and suspends its own polling communication with slaves 31, 32, ..., 33 on the second bus. During this period, slaves 31, 32, ..., 33 enter the communication timeout (communication failure) protection logic because they cannot receive polling from the host, maintaining a safe state until the upgrade is completed and the host resumes polling.

[0056] After reading that the OTA status in the OTA register is "Ready", the wireless communication module 10 writes the OTA status in the OTA register to "Start" and initiates the firmware transmission task. It sends the firmware in fixed-length packets, carrying the packet sequence number with each packet (padding the last packet with 0xFF if it is shorter than the fixed length). The host 20 receives, saves, and verifies the firmware packet by packet. It sends an acknowledgment message after successfully writing to the FLASH. If the wireless communication module 10 does not receive an acknowledgment message after each packet timeout (approximately 5 seconds), it retransmits. If multiple retransmissions fail, the OTA upgrade is considered a failure and the module exits. Additionally, when receiving the last packet, there is a possibility that the host has already completed the upgrade and will not send an acknowledgment message. Therefore, even if the last packet does not receive an acknowledgment message, the OTA is not considered a failure.

[0057] Once the firmware transmission task is completed, the OTA status of the OTA register written by the wireless communication module 10 is "Completed". Simultaneously, the host 20 performs a comprehensive verification of the firmware package; if successful, it jumps to the bootloader to execute the upgrade; otherwise, it does not jump.

[0058] After the OTA upgrade is completed, the wireless communication module 10 reads the firmware version number of the host 20 through the first bus (the waiting period is up to 10 minutes, and the system polls periodically). If the firmware version number read is consistent with the new firmware version number, the host 20 is considered to have been successfully upgraded.

[0059] When a firmware upgrade is required for a slave device of a certain type among slave devices 31, 32, ..., 33, the wireless communication module 10 first determines the target slave device from among multiple slave devices. Then, it writes a "request" to the OTA status of the OTA register corresponding to the first bus, along with the new firmware version number (target firmware identifier) ​​and file size. The host 20 obtains the type and address of the target upgrade object by reading the OTA register, and determines that the target upgrade object is the target slave device. It then writes a "request" to the OTA status of the OTA register corresponding to the second bus, along with the new firmware version number (target firmware identifier) ​​and file size. Each slave device 31, 32, ..., 33 obtains the type and address of the target upgrade object by reading the OTA register, and first determines whether it is the target slave device. If the slave device is the target slave device, it enters the ready state and returns ready information to the host. Meanwhile, if the type of the slave device is consistent with the type of the target upgrade object, and its own firmware identifier is inconsistent with the target firmware identifier, it will respond to the host that OTA is ready, start the receiving task, and stop normal communication on the second bus; if the type of the slave device is inconsistent with the type of the target upgrade object, or if its own firmware identifier is consistent with the target firmware identifier, the receiving task will not be started.

[0060] After reading the OTA status as "Ready", the wireless communication module 10 writes the OTA status of the OTA register to "Start" and initiates the firmware transmission task. The host 20 receives the firmware, performs protocol conversion, and sends it to the target slave device via the second bus. After initiating the receiving task, the slave device connected to the second bus can synchronously receive the firmware packet, save and verify it, and respond to the host 20.

[0061] Once the firmware transmission task is completed, the OTA status of the OTA register written by the wireless communication module 10 is "Completed". Simultaneously, for the slave device that received the firmware packet, it performs a full packet verification on the firmware packet in Flash. If the verification passes, it jumps to the bootloader; otherwise, it does not jump.

[0062] In some embodiments, the wireless communication module, acting as the sole network entry point for the entire HVAC system, periodically reports its own, the host's, and each slave device's current firmware identifier (firmware version number) to the cloud platform via MQTT / HTTP. The cloud platform then issues an OTA configuration file (containing firmware URL, MD5, version number, upgrade sequence number otaSeq, and whether it is forced). After downloading and verifying the firmware via HTTP, the wireless communication module selectively upgrades itself, the host, the indoor unit, and the underfloor heating system in ascending order of upgrade sequence number. Upgrades to the wireless communication module itself are performed using cloud-based differential packets (LZMA compression) written to the module's FOTA interface and followed by a restart. Non-forced upgrades are only performed when the new firmware version number is higher than the current firmware version number; forced upgrades are only performed when the new firmware version number is different from the current firmware version number (used for downgrade scenarios).

[0063] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. An OTA upgrade method for a heating, ventilation, and air conditioning (HVAC) system, the HVAC system comprising a wireless communication module, a host, and multiple slave devices, characterized in that, The OTA upgrade method is applied to the multiple slave devices, the wireless communication module is connected to the host through a first bus, and the host and the multiple slave devices are connected to a second bus; The OTA upgrade method includes: When the target upgrade object is a target slave among the multiple slaves, the upgrade request information sent by the host to the target slave is received from the second bus; Initiate a receiving task and receive the firmware package to be upgraded sent by the host to the target slave from the second bus; Firmware upgrade is performed based on the received firmware package to be upgraded.

2. The OTA upgrade method for a heating, ventilation, and air conditioning system according to claim 1, characterized in that, The upgrade request information includes the type of the target slave device; The initiation of the receiving task includes: Determine whether its own type matches the type of the target slave device, and if they match, initiate the receiving task.

3. The OTA upgrade method for a heating, ventilation, and air conditioning system according to claim 1, characterized in that, Prior to the step of initiating the receiving task, the following is also included: Receive the target firmware identifier corresponding to the firmware package to be upgraded sent by the host to the target slave via the second bus; The initiation of the receiving task includes: Determine whether the current firmware identifier matches the target firmware identifier. If they do not match, start the receiving task.

4. The OTA upgrade method for a heating, ventilation, and air conditioning system according to claim 1, characterized in that, The upgrade request information includes the address of the target slave device; Prior to the step of initiating the receiving task, the following is also included: It determines whether its own address is consistent with the address of the target slave device. If they are consistent, it enters the ready state and returns upgrade ready information to the host through the second bus.

5. An OTA upgrade method for a heating, ventilation, and air conditioning (HVAC) system, the HVAC system comprising a wireless communication module, a host, and multiple slave devices, characterized in that, The wireless communication module is connected to the host via a first bus, and the host is connected to the multiple slave devices via a second bus. The OTA upgrade method includes: The wireless communication module determines the target upgrade object and sends upgrade request information to the host through the first bus, wherein the upgrade request information includes the target upgrade object; When the host determines that the target upgrade object is a target slave among the multiple slaves based on the received upgrade request information, it sends the upgrade request information to the target slave through the second bus. At least one slave device initiates a receiving task based on the received upgrade request information; The wireless communication module sends the firmware package to be upgraded to the host via the first bus; After receiving the firmware package to be upgraded, the host sends the firmware package to be upgraded to the target slave via the second bus; The at least one slave device performs a firmware upgrade based on the received firmware package to be upgraded.

6. The OTA upgrade method for a HVAC system according to claim 5, characterized in that, Also includes: When the host determines that the target upgrade object is the host based on the received upgrade request information, it enters a ready state and returns upgrade ready information to the wireless communication module through the first bus. When the wireless communication module receives the upgrade ready information, it sends the firmware package to be upgraded to the host through the first bus. The host performs a firmware upgrade based on the received firmware package to be upgraded.

7. The OTA upgrade method for a heating, ventilation, and air conditioning system according to claim 6, characterized in that, Sending the firmware package to be upgraded to the host via the first bus includes: The wireless communication module divides the firmware package to be upgraded into multiple packets and sends the multiple packets to the host one by one through the first bus; The host performs a firmware upgrade based on the received firmware package to be upgraded, including: The host receives the multiple packets one by one, and after receiving all the multiple packets, combines the multiple packets into a firmware package; The integrity of the combined firmware package is verified, and if the verification passes, the firmware is upgraded based on the combined firmware package.

8. The OTA upgrade method for a heating, ventilation, and air conditioning system according to claim 7, characterized in that, Also includes: For at least one of the multiple packets, the host determines whether the packet was successfully received after receiving it. If so, it returns confirmation information to the wireless communication module through the first bus. The wireless communication module determines whether it receives confirmation information for the sub-packet within a preset time. If it does not receive confirmation, it retransmits the sub-packet.

9. The OTA upgrade method for a heating, ventilation, and air conditioning system according to claim 8, characterized in that, After the step of the host performing a firmware upgrade based on the received firmware package to be upgraded, the method further includes: The host sends its current firmware identifier to the wireless communication module via the first bus; The wireless communication module determines whether the host has been successfully upgraded based on the received current firmware identifier of the host. And / or, Following the firmware upgrade step, the following is also included: The target slave device sends its current firmware identifier to the host device via the second bus; After receiving the current firmware identifier of the target slave device, the host device sends the current firmware identifier of the target slave device to the wireless communication module through the first bus. The wireless communication module determines whether the target slave device has been successfully upgraded based on the received current firmware identifier of the target slave device.

10. A heating, ventilation, and air conditioning system, characterized in that, include: Wireless communication module; Host; as well as The slave device includes a processor and a memory storing a computer program, wherein the processor, when executing the computer program, implements the steps of the OTA upgrade method according to any one of claims 1-4; The wireless communication module is connected to the host via a first bus, and the host is connected to multiple slave devices via a second bus.