CN113342385A - Software upgrading method and device and air conditioner control panel - Google Patents

Software upgrading method and device and air conditioner control panel Download PDF

Info

Publication number
CN113342385A
CN113342385A CN202110474858.1A CN202110474858A CN113342385A CN 113342385 A CN113342385 A CN 113342385A CN 202110474858 A CN202110474858 A CN 202110474858A CN 113342385 A CN113342385 A CN 113342385A
Authority
CN
China
Prior art keywords
controller
software
software data
data
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110474858.1A
Other languages
Chinese (zh)
Inventor
聂德云
李更祥
杨晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bergstrom Changzhou Air Conditioning System Co ltd
Original Assignee
Bergstrom Changzhou Air Conditioning System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bergstrom Changzhou Air Conditioning System Co ltd filed Critical Bergstrom Changzhou Air Conditioning System Co ltd
Priority to CN202110474858.1A priority Critical patent/CN113342385A/en
Publication of CN113342385A publication Critical patent/CN113342385A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/40Circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a software upgrading method and device and an air conditioner control panel. The method comprises the following steps: the method comprises the steps that a first controller receives update data sent by a terminal through wireless transmission, wherein the update data comprise update target parameters and software data; determining whether an update target is the first controller based on the update target parameter; when the update target is the first controller, upgrading the software of the first controller by adopting the software data; and when the update target is a second controller, sending the software data to the second controller through wired transmission so that the second controller can be upgraded based on the software data.

Description

Software upgrading method and device and air conditioner control panel
Technical Field
The disclosure relates to the technical field of software, and in particular relates to a software upgrading method and device and an air conditioner control panel.
Background
As the technology of parking air conditioners matures, more and more trucks have been equipped with parking air conditioners. Upgrading software for the parking air conditioner is an important item in daily maintenance of the parking air conditioner.
There are a number of embedded devices in parking air conditioners such as: an air conditioner control panel, an air conditioner system controller, a compressor controller and the like, which means that upgrading software of the parking air conditioner simultaneously involves upgrading software of the air conditioner control panel, the air conditioner system controller and the compressor controller.
Disclosure of Invention
The embodiment of the disclosure provides a software upgrading method and device and an air conditioner control panel. The technical scheme is as follows:
at least one embodiment of the present disclosure provides a software upgrading method, including:
the method comprises the steps that a first controller receives update data sent by a terminal through wireless transmission, wherein the update data comprise update target parameters and software data;
determining whether an update target is the first controller based on the update target parameter;
when the update target is the first controller, upgrading the software of the first controller by adopting the software data;
and when the update target is a second controller, sending the software data to the second controller through wired transmission so as to upgrade the second controller based on the software data, wherein the second controller is connected with the first controller through a bus.
Optionally, the sending the software data to the second controller through wired transmission includes:
after the handshake between the first controller and the second controller is successful, sending an erasing command, wherein the erasing command is used for instructing the second controller to erase the software data in the application program area;
after the software data in the application program area is successfully erased, the software data is sent, and the second controller is used for receiving the software data and storing the software data in the application program area;
after the software data is successfully sent, sending an updating ending command;
and after the updating end command is successfully sent, sending a jump command, wherein the jump command is used for instructing the second controller to jump to the application program area and run the software data in the application program area.
Optionally, the software data includes a plurality of lines of code, and the sending the software data includes:
and sending the multiple lines of codes to the second controller line by line, and sending the next line of codes after each line of codes is successfully sent.
Optionally, the method further comprises:
and when the number of times of failure of handshake failure, failure of software data erasure, failure of software data transmission, failure of update ending command transmission or failure of skip command transmission exceeds a threshold value, determining that the communication between the first controller and the second controller is interrupted, and exiting the update mode.
Optionally, the receiving the update data sent by the terminal through wireless transmission includes:
receiving the update target parameter, the updated file length and the update start command sent by the terminal;
storing the updated target parameters and the updated file length in a controller parameter area;
receiving software data sent by the terminal;
and storing the software data in an updating program backup area.
Optionally, the upgrading the software of the first controller by using the software data includes:
erasing software data in the application program area;
copying the software data in the updater backup area into the application area;
determining whether the erasing and the copying are successful;
and when the erasing and the copying are successful, jumping to the application program area and running the software data in the application program area.
Optionally, the method further comprises:
determining the number of repetitions of erasing and copying when the erasing and copying are unsuccessful;
when the times of erasing and copying do not exceed the threshold value, whether the transmission of the software data is finished or not is judged again;
and under the condition that the transmission of the software data is finished, whether an update target is the first controller is judged again.
Optionally, the method further comprises:
when the update target is the first controller and the equipment to which the first controller belongs is powered on again, whether the transmission of the software data is finished is judged again;
and under the condition that the transmission of the software data is finished, whether an update target is the first controller is judged again.
At least one embodiment of the present disclosure provides a software upgrading apparatus, including:
the terminal comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving updating data sent by the terminal through wireless transmission, and the updating data comprises updating target parameters and software data;
a determination module for determining whether an update target is a first controller based on the update target parameter;
the upgrading module is used for upgrading the software of the first controller by adopting the software data when the updating target is the first controller;
and the sending module is used for sending the software data to a second controller through wired transmission when the update target is the second controller so as to upgrade the second controller based on the software data, and the second controller is connected with the first controller through a bus.
At least one embodiment of the present disclosure provides an air conditioning control panel comprising a processor and a memory, the memory storing at least one program code, the program code being loaded and executed by the processor to implement the software upgrade method as set forth in any one of the preceding claims.
At least one embodiment of the present disclosure provides a computer-readable storage medium having at least one program code stored therein, the program code being loaded and executed by a processor to implement a software upgrade method as claimed in any one of the preceding claims.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
the embodiment of the disclosure wirelessly receives the update data through the first controller, then determines whether the update target is the first controller or the second controller based on the update target parameter in the update data, directly performs software update by using the software data if the update target is the first controller, and sends the software data to the second controller by wire if the update target is the second controller, thereby realizing software upgrade of the second controller. According to the scheme, when software is upgraded, the controllers needing software upgrading are not needed to be distinguished manually, and the controllers are not needed to be connected with different controllers, the whole process is automatically executed by the first controller, so that the software upgrading of the first controller and the second controller is realized, and the method is simple and convenient; simultaneously, this scheme only need first controller can carry out wireless transmission can, consequently only need set up the wireless transmission module on first controller, need not to set up on the second controller, saved the hardware cost.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a software upgrading system provided by an embodiment of the present disclosure;
FIG. 2 is a schematic view of a partition of a memory in an air conditioner control panel provided by an embodiment of the present disclosure;
FIG. 3 is a flowchart of a software upgrading method provided by an embodiment of the present disclosure;
FIG. 4 is a flowchart of a software upgrading method provided by the embodiments of the present disclosure;
fig. 5 is a software upgrading flow chart of an air conditioner control panel provided by the embodiment of the disclosure;
fig. 6 is a software upgrade flow diagram of a compressor controller provided by an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a software upgrading apparatus provided by an embodiment of the present disclosure;
fig. 8 shows a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The use of "first," "second," "third," and similar terms in the description and claims of the present disclosure are not intended to indicate any order, quantity, or importance, but rather are used to distinguish one element from another. Also, the use of the terms "a" or "an" and the like do not denote a limitation of quantity, but rather denote the presence of at least one. The word "comprise" or "comprises", and the like, means that the element or item listed before "comprises" or "comprising" covers the element or item listed after "comprising" or "comprises" and its equivalents, and does not exclude other elements or items.
In the related art, the software upgrade of the air conditioner is implemented through wired communication (for example, a computer performs software flashing on a controller of the air conditioner), and also implemented through wireless communication. However, no matter how the communication is realized, the software upgrading processes of different embedded devices are separated. Taking wireless communication as an example, if software of an air conditioner control panel needs to be upgraded, wireless communication with the air conditioner control panel is required, and if software of a compressor controller needs to be upgraded, wireless communication with the compressor controller is required. On the one hand, the method is complex to operate, and on the other hand, each embedded device is required to be provided with a wireless communication module, so that the cost of the air conditioner is increased.
Fig. 1 is a schematic structural diagram of a software upgrading system of an air conditioner according to an embodiment of the present disclosure. Referring to fig. 1, the system includes: a terminal 10 and an air conditioner 20. The air conditioner 20 includes an air conditioner control panel 21, an air conditioning system controller 22, and a compressor controller 23.
Wherein, the air-conditioning control panel 21 and the terminal 10 can communicate wirelessly, the air-conditioning control panel 21 is connected with the air-conditioning system controller 22 and the compressor controller 23 through the bus respectively.
The air conditioner control panel 21 includes a wireless transmission device 211 and a processing device 212, and the wireless transmission device 211 is used for wireless communication with the terminal 10.
Illustratively, the terminal 10 is a mobile terminal, such as a cell phone. The wireless transmission device 211 is a bluetooth module, such as a bluetooth 4.0 module, e.g., an LSD4BT-P74MLSP2 module of rierda bluetooth 4.0. The mobile phone is connected with the Bluetooth module in the air-conditioning control panel 21 through the mobile phone Bluetooth module. In other embodiments, the wireless transmission device 211 is other wireless communication modules such as 4G, 5G, wireless fidelity (WIFI), and the like.
Illustratively, the processing device 212 is a single chip microcomputer, such as an embedded single chip microcomputer S9KEAZ 128. The Bluetooth module and the single chip microcomputer communicate through a Universal Asynchronous Receiver/Transmitter (UART) bus. The single chip microcomputer communicates with the air conditioning system controller 22 and the compressor controller 23 through a Local Interconnect Network (LIN) bus, respectively. In other embodiments, the single chip microcomputer is respectively communicated with the air conditioning system controller 22 and the compressor controller 23 through other communication modes such as a 485 bus or an ethernet.
In the embodiment of the disclosure, the single chip microcomputer burns software with a boot loader (Bootloader) into a memory (such as Flash memory) before leaving a factory. And by which icf files divide Flash into 4 regions, as shown in fig. 2: wherein, the Bootloader program area is from 0 to 0x2000, and the space is 8K; the application program (APP) area is 0x 2001-0 x10C00, and the space is 59K; taking 0x10C 01-0 x1F800 as a Backup (Backup) area of an updating program, wherein the space is 59K; the controller Parameter (Parameter) area is set from 0x1F801 to 0x1FFFF, and the space is 2K.
In the embodiment of the disclosure, a wechat applet for software upgrading is installed in the mobile phone, and the mobile phone performs a software upgrading process through the wechat applet.
It should be noted that the method provided by the embodiment of the present disclosure is not only applicable to software upgrade of an air conditioner, but also applicable to software upgrade of other devices, where each of the devices has a first controller (or referred to as a first embedded device, such as an air conditioner control panel) capable of performing wireless transmission and a second controller (or referred to as a second embedded device, such as an air conditioning system controller and a compressor controller) incapable of performing wireless transmission, and the first controller and the second controller are connected through a bus.
Fig. 3 is a flowchart of a software upgrading method provided by an embodiment of the present disclosure. The method is performed by the first controller 21 in fig. 1, see fig. 3, and comprises:
s31: and receiving update data sent by the terminal through wireless transmission, wherein the update data comprises update target parameters and software data.
Taking an air conditioner as an example, the update target includes: the system comprises a first controller and a second controller, wherein the first controller is an air conditioner control panel, the second controller is an air conditioner system controller and a compressor controller, and therefore the update target parameter can be represented by 2 bits, for example, 01 represents that the update target is the air conditioner control panel, 10 represents that the update target is the air conditioner system controller, and 11 represents that the update target is the compressor controller.
In the embodiment of the disclosure, the software data is a Hex file, and the Hex file format is a file format which can be programmed into and executed by the single chip microcomputer. And when in transmission, the codes in the Hex file are transmitted line by line.
S32: determining whether an update target is the first controller based on the update target parameter.
When the update target is the first controller, step S33 is executed. When the update target is the second controller, step S34 is executed.
S33: and upgrading the software of the first controller by adopting the software data.
S34: and sending the software data to the second controller through wired transmission so that the second controller can be upgraded based on the software data.
The embodiment of the disclosure wirelessly receives the update data through the first controller, then determines whether the update target is the first controller or the second controller based on the update target parameter in the update data, directly performs software update by using the software data if the update target is the first controller, and sends the software data to the second controller by wire if the update target is the second controller, thereby realizing software upgrade of the second controller. According to the scheme, when software is upgraded, the controllers needing software upgrading are not needed to be distinguished manually, and the controllers are not needed to be connected with different controllers, the whole process is automatically executed by the first controller, so that the software upgrading of the first controller and the second controller is realized, and the method is simple and convenient; simultaneously, this scheme only need first controller can carry out wireless transmission can, consequently only need set up the wireless transmission module on first controller, need not to set up on the second controller, saved the hardware cost.
The following describes a software upgrading method provided by the embodiment of the present disclosure, taking software upgrading of each embedded device of the air conditioner in fig. 1 as an example. Since the air conditioning system controller 22 and the compressor controller 23 play the same role in the method, only the compressor controller 23 is taken as an example in the following embodiments, and the process of upgrading the software of the air conditioning system controller 22 is the same as that of the compressor controller 23.
Fig. 4 is a flowchart of a software upgrading method for an air conditioner according to an embodiment of the present disclosure. The method is performed by the terminal 10, the air conditioner control panel 21 and the compressor controller 23 in fig. 1, and referring to fig. 4, the method includes:
s41: and the terminal and the air conditioner control panel establish Bluetooth connection.
In the embodiment of the disclosure, the terminal establishes a bluetooth connection with the air conditioner control panel through the wechat applet.
S42: and the terminal determines the software version information of each embedded device.
And the terminal acquires the software version information of each embedded device from the air conditioner control panel.
In one possible implementation, the software version information may be stored in a controller parameter area of the air conditioner control panel. And after the Bluetooth connection is established, the air conditioner control panel sends the software version information in the controller parameter area to the terminal.
The software version information comprises software versions of an air conditioner control panel, an air conditioner system controller and a compressor controller, wherein the software versions of the air conditioner system controller or the compressor controller can be recorded when the air conditioner control panel assists the air conditioner system controller or the compressor controller to carry out software upgrading, or can be acquired by the air conditioner control panel and the air conditioner system controller or the compressor controller in an interactive mode. The software version may be obtained from software data at the time of the software upgrade.
S43: and the terminal determines an update target based on the software version information of each embedded device.
After the terminal inquires the software version information, the software version information is compared with the latest software version of each device in the terminal to determine whether the software version information is different. If the two are completely consistent, updating is not needed, and the flow is ended.
If the software versions are not completely consistent, determining the equipment with inconsistent software versions, and determining the equipment as an update target. It should be noted that the number of the determined update targets may be 1, 2, or 3, and when the number is greater than 1, the subsequent update processes are updated one by one, that is, the processes of the subsequent steps S44-S51 are required to be performed for updating each target.
S44: the terminal sends an erasing command to the air conditioner control panel; the air conditioner control panel receives the erase command.
S45: and the air conditioner control panel erases the data in the control parameter area and the update program backup area based on the erasing command.
When the air conditioner control panel executes the erasing command, the software executing the erasing records whether the erasing is successful, and when the erasing is successful, the air conditioner control panel sends an erasing success indication to the terminal to inform the terminal of successful erasing; and when the erasing fails, the air conditioner control panel sends an erasing failure indication to the terminal to inform the terminal of the erasing failure.
S46: and when the air conditioner control panel is successfully erased, the terminal sends an update target parameter, an updated file length and an update starting command to the air conditioner control panel. The air conditioner control panel receives the update target parameter, the updated file length and the update start command, and stores in the control parameter area.
As described above, after the update target is determined, the Hex file corresponding to the update target is determined, and the updated file length is the length of the Hex file.
Optionally, after receiving the update start command, the air conditioner control panel enters an update mode, and indicates the user through an update identifier on the panel, for example, displaying an "UP" word.
S47: the terminal sends software data to an air conditioner control panel; the air conditioner control panel receives the software data and stores the software data in the updating program backup area.
Illustratively, the software data includes a plurality of lines of code, and the sending the software data includes:
and sending the plurality of lines of codes to the air conditioning system controller or the compressor controller line by line, and sending the next line of codes after each line of codes is successfully sent.
In the embodiment of the disclosure, each time the air conditioner control panel receives a line of codes, a receiving success identifier is sent to the terminal once, and the terminal sends the next line of codes after receiving the receiving success identifier. If the terminal does not receive the successful receiving identifier after the set time (for example, 30 seconds), the code sent last time is repeatedly sent, if the successful receiving identifier is not received for a plurality of times (for example, 10 times), the bluetooth is disconnected or the air conditioner control panel is powered off, at this moment, the process is ended, and the WeChat applet of the terminal can output an update failure prompt.
If the air conditioner control panel does not receive the code for more than a set time (for example, 30 seconds), sending a receiving failure identifier to the terminal, and if the receiving failure identifier is continuously sent for multiple times (for example, 10 times), ending the process and exiting the updating mode.
S48: when the software data is sent, the terminal sends a transmission ending identifier to the air conditioner control panel; the air conditioner control panel receives the transmission ending mark and stores the transmission ending mark in the control parameter area.
S49: and after the transmission is finished, the air conditioner control panel determines whether the update target is the air conditioner control panel or not based on the update target parameter.
The air conditioner control panel periodically checks the control parameter area, and when the transmission end flag is checked in the control parameter area, step S49 is executed. And at the moment, the position of the update target parameter stored in the controller parameter area inquired by the air conditioner control panel determines the update target based on the update target parameter.
When the update target is the air conditioner control panel, step S50 is performed. When the update target is the air conditioning system controller or the compressor controller, step S51 is performed.
Optionally, the method further comprises:
when the update target is the air conditioner control panel and the air conditioner is powered on again, whether the transmission of the software data is finished or not is judged again; and under the condition that the transmission of the software data is finished, whether an update target is the air conditioner control panel is judged again.
The air conditioner is powered on again, which may be operated by a user or generated by accident, and then jumps to a Bootloader program after being powered on again, and then judges whether transmission is finished and updates the target.
S50: and the air conditioner control panel adopts the software data to upgrade the software of the air conditioner control panel.
And if the update target is the air conditioner control panel, the air conditioner control panel jumps back to the Bootloader, the software data in the update program backup area is copied to the application program area in the Bootloader, and the software data is transferred to the application program area after the copying is finished, so that the software update and the upgrade of the air conditioner control panel are finished.
S51: and the air conditioner control panel sends the software data to the compressor controller so that the compressor controller can be upgraded based on the software data.
If the update target is the compressor controller, the air conditioner control panel jumps back to the Bootloader, and the software data stored in the update program backup area is sent to the compressor controller through LIN communication in the Bootloader hollow control panel, so that the software of the compressor controller is updated and upgraded.
The detailed process of step S50 will be described below with reference to fig. 5. Fig. 5 is a software upgrading flowchart of an air conditioner control panel provided in an embodiment of the present disclosure. The method is performed by an air conditioner control panel, and referring to fig. 5, the method includes:
s61: and erasing the software data in the application program area.
Software in the air conditioner control panel for erasing records whether the erasing is successful.
S62: copying the software data in the updater backup area to the application area.
When copying, the codes in the software data are copied into the application program area line by line. Each copy of a row requires determining whether the copy was successful, and whether the copy was successful. The software performing the copy in the air conditioner control panel records whether the copy is successful, and in this step, determining whether the copy is successful includes: firstly, determining whether the copying is successful or not based on the record of the software for executing copying, reading the line of codes into a cache and comparing the line of codes with corresponding codes in an updating program backup area when the record of the software for executing copying indicates that the copying is successful, if the line of codes is completely consistent with the corresponding codes in the updating program backup area, the copying is successful, otherwise, the copying fails.
In the above copying process, the amount of code that has been copied is recorded by a counter, and copying ends when the value of the counter and the updated file length are equal.
S63: it is determined whether the erasure and the copy are successful. When the erasing and copying are successful, step S64 is performed; when the erasing and copying are unsuccessful, step S65 is performed.
When one of the erasure and the copy is unsuccessful, the erasure and the copy are not successful, and when both the erasure and the copy are successful, the erasure and the copy are successful.
S64: and jumping to the application program area and running the software data in the application program area.
In addition to jumping to the application area when the erasure and copy are successful, the update flag may be reset, for example, no longer indicating to the user on the panel by the update flag, for example, no longer displaying the "UP" word.
S65: the number of erasures and duplications is determined.
Here, the number of times of erasing and copying means the number of times of erasing repetition and the number of times of repetition in copying, which is larger. For example, one erasure, three copies, the number of erasures and copies is 3.
In the present disclosure, the number of times of repetition of each action is recorded by a corresponding counter, for example, the number of times of repetition of erasing is recorded by using one counter.
S66: and when the times of erasing and copying do not exceed the threshold value, judging whether the transmission of the software data is finished again.
Illustratively, the threshold is 3 times.
And when the times of erasing and copying exceed the threshold value, the air conditioner control panel stays in the Bootloader program, and the updating is finished. At the moment, the air conditioner control panel can also feed back a software upgrading failure message of the air conditioner control panel to the terminal, so that a user can conveniently overhaul hardware.
S67: and under the condition that the transmission of the software data is finished, whether an update target is the air conditioner control panel is judged again.
When the update target is the air conditioner control panel, step S50 is performed. When the update target is the air conditioning system controller or the compressor controller, step S51 is performed.
The detailed process of step S51 will be described below with reference to fig. 6. Fig. 6 is a flow chart of software upgrade of a compressor controller according to an embodiment of the present disclosure. The method is performed by an air conditioner control panel and a compressor controller, and referring to fig. 6, the method includes:
s71: and the air conditioner control panel and the compressor controller are used for handshaking.
Illustratively, the handshaking between the air conditioner control panel and the compressor controller comprises: the air conditioner control panel sends a handshake command to the compressor controller, and the compressor controller receives the handshake command and returns a handshake response.
For example, if the air conditioner control panel receives the handshake response, it is determined that the handshake is successful, and then step S72 is executed; and if no handshake response is received, determining that the handshake fails and retransmitting the handshake command. If multiple (e.g., 3) handshakes fail, communication with the compressor controller is interrupted and the refresh mode is exited.
S72: and after the handshaking is successful, the air conditioner control panel sends an erasing command. The compressor controller receives the erase command.
S73: the compressor controller erases the software data in the application area.
The manner in which the compressor controller erases and determines whether the erasure is successful is the same as that of the air conditioner control panel, and refer to step S45.
S74: the compressor controller sends an erasing success indication after the application program area is successfully erased; the air conditioner control panel receives an erase success indication.
For example, if the air conditioner control panel receives the erase success indication, it determines that the application program area is successfully erased, and then step S74 is executed; and if the erasing success indication is not received, determining that the erasing is failed, and retransmitting the erasing command. If multiple (e.g., 3) erasures fail, communication with the compressor controller is interrupted and the refresh mode is exited.
S75: after the software data in the application program area are successfully erased, the air conditioner control panel sends the software data; the compressor controller receives the software data and stores it in the application area.
The manner of transmitting the software data and whether the transmission of the software data is successful or not by the air conditioner control panel is the same as that of the terminal, and refer to step S47.
S76: after the software data is successfully sent, the air conditioner control panel sends an updating ending command; the compressor controller receives the update end command.
Exemplarily, the air conditioner control panel determines that one row of codes is successfully transmitted when receiving the successful receiving identifier, and transmits the next row of codes until all codes are completely transmitted; if the receiving success identification is not received, the line code is failed to be sent, and the line code is sent again. If sending a row of codes multiple times (e.g., 3 times) fails, communication with the compressor controller is interrupted and the update mode is exited.
S77: after the updating ending command is successfully sent, the air conditioner control panel sends a jump command; the compressor controller receives the jump command.
For example, if the air conditioner control panel receives the reception success indication of the update end command, it determines that the update end command is successfully transmitted, and then step S77 is executed; and if the receiving success indication of the updating end command is not received, determining that the updating end command fails to be sent, and resending the updating end command. If sending the update-complete command fails multiple times (e.g., 3 times), communication with the compressor controller is interrupted and the update mode is exited.
S78: the compressor controller jumps to the application area and runs the software data therein.
For example, if the air conditioner control panel receives a successful receiving indication of the jump command, it is determined that the jump command is successfully sent, and the air conditioner control panel may reset the update identifier, for example, no longer indicate the user through the update identifier on the panel, for example, no longer display the word "UP", and exit the update mode;
and if the receiving success indication of the jump command is not received, determining that the jump command fails to be sent, and resending the jump command. If multiple (e.g., 3) transmissions of the jump command fail, communication with the compressor controller is interrupted and the update mode is exited.
Fig. 7 is a schematic structural diagram of a software upgrading apparatus according to an embodiment of the present disclosure. Referring to fig. 7, the apparatus includes a receiving module 801, a determining module 802, an upgrading module 803, and a transmitting module 804.
The receiving module 801 is configured to receive update data sent by a terminal through wireless transmission, where the update data includes an update target parameter and software data;
the determining module 802 is configured to determine whether an update target is a first controller based on the update target parameter;
the upgrading module 803 is configured to upgrade, when the update target is the first controller, software of the first controller by using the software data;
the sending module 804 is configured to send the software data to a second controller through wired transmission when the update target is the second controller, so that the second controller performs upgrading based on the software data, and the second controller is connected to the first controller through a bus.
Optionally, the sending module 804 is configured to send an erase command after the handshake between the first controller and the second controller is successful, where the erase command is used to instruct the second controller to erase software data in the application program area; after the software data in the application program area is successfully erased, the software data is sent, and the second controller is used for receiving the software data and storing the software data in the application program area; after the software data is successfully sent, sending an updating ending command; and after the updating end command is successfully sent, sending a jump command, wherein the jump command is used for instructing the second controller to jump to the application program area and run the software data in the application program area.
Optionally, the software data includes a plurality of lines of code, and the sending module 804 is configured to send the plurality of lines of code to the second controller line by line, and send a next line of code after each line of code is successfully sent.
Optionally, the determining module 802 is further configured to determine that communication between the first controller and the second controller is interrupted and exit the update mode when the number of times of failure of handshake failure, failure of software data erasure, failure of software data transmission, failure of update end command transmission, or failure of skip command transmission exceeds a threshold.
Optionally, the receiving module 801 is configured to receive the update target parameter, the updated file length, and the update start command sent by the terminal; storing the updated target parameters and the updated file length in a controller parameter area; receiving software data sent by the terminal; and storing the software data in an updating program backup area.
Optionally, the upgrade module 803 is used to erase software data in the application program area; copying the software data in the updater backup area into the application area; determining whether the erasing and the copying are successful; and when the erasing and the copying are successful, jumping to the application program area and running the software data in the application program area.
Optionally, the determining module 802 is further configured to determine a number of repetitions of erasing and copying when the erasing and copying are unsuccessful; when the times of erasing and copying do not exceed the threshold value, whether the transmission of the software data is finished or not is judged again; and under the condition that the transmission of the software data is finished, whether an update target is the first controller is judged again.
Optionally, the determining module 802 is further configured to, when the update target is the first controller and the device to which the first controller belongs is powered on again, re-determine whether the transmission of the software data is finished; and under the condition that the transmission of the software data is finished, whether an update target is the first controller is judged again.
It should be noted that: in the software upgrading apparatus provided in the foregoing embodiment, when upgrading software, only the division of the functional modules is described as an example, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the software upgrading device and the software upgrading method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 8 shows a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. The electronic device may be an air conditioner control panel. Generally, an electronic device includes: a processor 901 and a memory 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 901 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state.
Memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 902 is used to store at least one instruction for execution by processor 901 to implement the software upgrade methods provided by method embodiments herein.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended to be exemplary only and not to limit the present disclosure, and any modification, equivalent replacement, or improvement made without departing from the spirit and scope of the present disclosure is to be considered as the same as the present disclosure.

Claims (10)

1. A method of upgrading software, the method comprising:
the method comprises the steps that a first controller receives update data sent by a terminal through wireless transmission, wherein the update data comprise update target parameters and software data;
determining whether an update target is the first controller based on the update target parameter;
when the update target is the first controller, upgrading the software of the first controller by adopting the software data;
and when the update target is a second controller, sending the software data to the second controller through wired transmission so as to upgrade the second controller based on the software data, wherein the second controller is connected with the first controller through a bus.
2. The method of claim 1, wherein sending the software data to the second controller via wired transmission comprises:
after the handshake between the first controller and the second controller is successful, sending an erasing command, wherein the erasing command is used for instructing the second controller to erase the software data in the application program area;
after the software data in the application program area is successfully erased, the software data is sent, and the second controller is used for receiving the software data and storing the software data in the application program area;
after the software data is successfully sent, sending an updating ending command;
and after the updating end command is successfully sent, sending a jump command, wherein the jump command is used for instructing the second controller to jump to the application program area and run the software data in the application program area.
3. The method of claim 2, wherein the software data comprises a plurality of lines of code, and wherein sending the software data comprises:
and sending the multiple lines of codes to the second controller line by line, and sending the next line of codes after each line of codes is successfully sent.
4. The method of claim 2, further comprising:
and when the number of times of failure of handshake failure, failure of software data erasure, failure of software data transmission, failure of update ending command transmission or failure of skip command transmission exceeds a threshold value, determining that the communication between the first controller and the second controller is interrupted, and exiting the update mode.
5. The software upgrading method according to any one of claims 1 to 4, wherein the receiving terminal receives the update data transmitted by wireless transmission, and comprises:
receiving the update target parameter, the updated file length and the update start command sent by the terminal;
storing the updated target parameters and the updated file length in a controller parameter area;
receiving software data sent by the terminal;
and storing the software data in an updating program backup area.
6. The software upgrading method according to claim 5, wherein the upgrading the software of the first controller using the software data includes:
erasing software data in the application program area;
copying the software data in the updater backup area into the application area;
determining whether the erasing and the copying are successful;
and when the erasing and the copying are successful, jumping to the application program area and running the software data in the application program area.
7. The software upgrading method of claim 6, further comprising:
determining the number of repetitions of erasing and copying when the erasing and copying are unsuccessful;
when the times of erasing and copying do not exceed the threshold value, whether the transmission of the software data is finished or not is judged again;
and under the condition that the transmission of the software data is finished, whether an update target is the first controller is judged again.
8. The method according to any one of claims 1 to 4, further comprising:
when the update target is the first controller and the equipment to which the first controller belongs is powered on again, whether the transmission of the software data is finished is judged again;
and under the condition that the transmission of the software data is finished, whether an update target is the first controller is judged again.
9. A software upgrading apparatus, characterized in that the apparatus comprises:
the terminal comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving updating data sent by the terminal through wireless transmission, and the updating data comprises updating target parameters and software data;
a determination module for determining whether an update target is a first controller based on the update target parameter;
the upgrading module is used for upgrading the software of the first controller by adopting the software data when the updating target is the first controller;
and the sending module is used for sending the software data to a second controller through wired transmission when the update target is the second controller so as to upgrade the second controller based on the software data, and the second controller is connected with the first controller through a bus.
10. An air conditioning control panel comprising a processor and a memory, the memory storing at least one program code, the program code being loaded and executed by the processor to implement the software upgrade method according to any one of claims 1 to 8.
CN202110474858.1A 2021-04-29 2021-04-29 Software upgrading method and device and air conditioner control panel Pending CN113342385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110474858.1A CN113342385A (en) 2021-04-29 2021-04-29 Software upgrading method and device and air conditioner control panel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110474858.1A CN113342385A (en) 2021-04-29 2021-04-29 Software upgrading method and device and air conditioner control panel

Publications (1)

Publication Number Publication Date
CN113342385A true CN113342385A (en) 2021-09-03

Family

ID=77469079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110474858.1A Pending CN113342385A (en) 2021-04-29 2021-04-29 Software upgrading method and device and air conditioner control panel

Country Status (1)

Country Link
CN (1) CN113342385A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114035856A (en) * 2021-09-30 2022-02-11 黄冈普赫氢能商用车有限公司 Control method and storage medium for peripheral devices during batch updating of ECU application layer software

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103438551A (en) * 2013-08-21 2013-12-11 青岛海信日立空调系统有限公司 Central air conditioner control system and control software updating method thereof
CN104216745A (en) * 2014-08-29 2014-12-17 万向钱潮股份有限公司 Online upgrading system and method for semi-active suspension ECU (Electronic Control Unit) controller software
CN104765632A (en) * 2015-04-15 2015-07-08 南京汽车集团有限公司 BootLoader management method
CN109491688A (en) * 2018-11-16 2019-03-19 珠海云洲智能科技有限公司 The method, apparatus and system of firmware upgrade are carried out to the control equipment of unmanned boat
CN109683941A (en) * 2018-12-27 2019-04-26 四川九洲空管科技有限责任公司 A kind of answering machine method for upgrading software based on single-chip on-line loaded
CN109885322A (en) * 2019-01-11 2019-06-14 郑州嘉晨电器有限公司 A kind of long-range programming system of intelligence instrument
CN110134415A (en) * 2019-04-12 2019-08-16 深圳市致宸信息科技有限公司 A kind of controller and its method for upgrading software and device
CN112506562A (en) * 2020-12-29 2021-03-16 一汽解放汽车有限公司 Vehicle software upgrading method and system, vehicle and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103438551A (en) * 2013-08-21 2013-12-11 青岛海信日立空调系统有限公司 Central air conditioner control system and control software updating method thereof
CN104216745A (en) * 2014-08-29 2014-12-17 万向钱潮股份有限公司 Online upgrading system and method for semi-active suspension ECU (Electronic Control Unit) controller software
CN104765632A (en) * 2015-04-15 2015-07-08 南京汽车集团有限公司 BootLoader management method
CN109491688A (en) * 2018-11-16 2019-03-19 珠海云洲智能科技有限公司 The method, apparatus and system of firmware upgrade are carried out to the control equipment of unmanned boat
CN109683941A (en) * 2018-12-27 2019-04-26 四川九洲空管科技有限责任公司 A kind of answering machine method for upgrading software based on single-chip on-line loaded
CN109885322A (en) * 2019-01-11 2019-06-14 郑州嘉晨电器有限公司 A kind of long-range programming system of intelligence instrument
CN110134415A (en) * 2019-04-12 2019-08-16 深圳市致宸信息科技有限公司 A kind of controller and its method for upgrading software and device
CN112506562A (en) * 2020-12-29 2021-03-16 一汽解放汽车有限公司 Vehicle software upgrading method and system, vehicle and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114035856A (en) * 2021-09-30 2022-02-11 黄冈普赫氢能商用车有限公司 Control method and storage medium for peripheral devices during batch updating of ECU application layer software

Similar Documents

Publication Publication Date Title
US10552143B2 (en) Relay device, program update system, and program update method
US20190050219A1 (en) Program updating system, program updating method, and computer program
JP2009053920A (en) Program management system for on-vehicle electronic control unit
CN109783123A (en) Vehicle-mounted T-BOX terminal and firmware upgrade method
KR20110076432A (en) System for upgrading multi-program by using can communication and method thereof
CN112698857A (en) Data flashing method and device
EP3805918B1 (en) Program update system, program transmission device, and program transmission method
CN107015829B (en) Audio system upgrading method and device
CN113760332A (en) Software upgrading method and electronic equipment
CN113342385A (en) Software upgrading method and device and air conditioner control panel
CN105045671A (en) Method and device for upgrading systems of intelligent terminals
US20240069906A1 (en) Server, software update system, distribution method, and non-transitory storage medium
CN112486733B (en) System restoration method, device, terminal and storage medium
CN114489732A (en) Method and device for updating FPGA (field programmable Gate array) firmware of equipment and electronic equipment
EP3923139A1 (en) Electronic control device and method for using non-volatile memory
JP3634810B2 (en) Memory rewriting device
CN114780114A (en) Firmware upgrading method, system, vehicle and storage medium
CN111427604A (en) Remote software upgrading system and method based on functional mobile phone
CN112000358B (en) Upgrading method of charging pile and intelligent charging pile
EP0444535A2 (en) Programmable controller having automatic control of interlock process
US20220342651A1 (en) Center, ota master, system, distribution method, non-transitory storage medium, and vehicle
US20220405083A1 (en) Ota master, system, method, non-transitory storage medium, and vehicle
US20220342653A1 (en) Ota master, center, system, update method, non-transitory storage medium, and vehicle
KR100630871B1 (en) User terminal, method for upgrading software of user terminal and recording medium
US20220405080A1 (en) Ota master, system, method, non-transitory storage medium, and vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination