Background
Currently, in order to improve the cruising ability of the headset, a charging device is generally equipped. During the production and repair process, the upgrading method of the charging device program firmware is generally as follows: the firmware program updating of the charging equipment is to perform program firmware updating on a Microcontroller (MCU) on a Printed Circuit Board Assembly (PCBA) by adopting a special firmware burning tool and software on the PCBA. However, the special firmware programming tool is generally developed and sold by an MCU original factory, is expensive, is complex in software operation of the matched firmware programming tool, has high requirements on personnel specialty and technology, is low in programming efficiency, needs to disassemble a shell for a repaired product after sale of the product, is low in maintenance degree, needs to replace a shell part, and is high in cost.
Disclosure of Invention
The present application is directed to solving at least one of the problems in the prior art. Therefore, the application provides a program firmware upgrading method, charging equipment and upgrading equipment, which can overcome the defects brought by the traditional program firmware upgrading of the MCU microcontroller on the PCBA by adopting a special firmware burning tool and software, improve the upgrading efficiency and reduce the cost.
The program firmware upgrading method according to the embodiment of the first aspect of the application is applied to charging equipment and comprises the following steps:
establishing a communication path with an upgrading device, wherein the communication path is established by inserting the upgrading device into a charging interface of the charging device;
acquiring an upgrading firmware program sent by the upgrading equipment through the communication channel;
carrying out program verification on the obtained upgraded firmware program to obtain a verification result;
and upgrading the firmware according to the verification result.
When the firmware of the charging equipment needs to be upgraded, the charging interface of the charging equipment can be connected with the upgrading equipment, and a communication channel is established between the charging interface and the upgrading equipment after connection, and the communication channel is used for receiving an upgrading firmware program sent from the upgrading equipment. The charging equipment acquires the upgrade firmware program sent from the upgrade equipment, and the upgrade firmware program is transmitted to the charging equipment from the upgrade equipment through the communication channel. The charging equipment verifies the obtained upgrading firmware program, and after the upgrading firmware program is verified, the firmware of the charging equipment can be upgraded according to the upgrading firmware program.
According to the program firmware upgrading method provided by the embodiment of the application, at least the following beneficial effects are achieved: the charging equipment acquires the upgrade firmware program sent from the upgrade equipment through the communication channel and verifies the upgrade firmware program, so that the integrity of the upgrade program firmware acquired by the charging equipment from the upgrade equipment can be ensured, the accuracy of firmware upgrade of the charging equipment can be improved, and the efficiency of firmware upgrade is improved. After the upgrade firmware program is verified, the firmware of the charging equipment can be upgraded according to the verification result. The program firmware upgrading method is simple in steps, and the purpose of upgrading the firmware can be achieved without operating the program firmware by professional persons.
According to some embodiments of the present application, the establishing a communication path with an upgrade apparatus includes:
checking the charging interface to determine that the upgrading device is inserted into the charging interface;
and establishing a communication channel with the upgrading equipment according to the checking result of the checking.
According to some embodiments of the application, the checking the charging interface comprises: and checking the charging interface through timing polling.
According to some embodiments of the application, the program verification comprises: the first verification and the second verification, correspondingly, the program verification of the obtained upgrade firmware program to obtain a verification result, including:
performing first verification on the obtained upgrading firmware program through the MCU to judge that the obtained upgrading firmware program is normal;
and reading and writing the upgrade firmware program to an internal program storage area of the MCU microcontroller according to a verification result of the first verification, and performing second verification on the read and written upgrade firmware program by the internal program storage area, wherein the second verification is used for judging that the read and written upgrade firmware program is normal.
The program firmware upgrading method according to the embodiment of the second aspect of the application is applied to upgrading equipment and comprises the following steps:
inserting a charging interface of the charging equipment to generate a communication path;
and sending an upgrading firmware program to the charging equipment through the communication channel, and upgrading the firmware by the charging equipment according to the upgrading firmware program.
When the firmware of the charging equipment needs to be upgraded, the charging interface of the charging equipment can be connected with the upgrading equipment, a communication channel is established between the charging interface and the upgrading equipment after the charging interface and the upgrading equipment are connected, and the communication channel is used for sending an upgrading firmware program to the charging equipment. And the upgrading firmware program is transmitted to the charging equipment from the upgrading equipment through the communication channel, and the charging equipment upgrades the firmware according to the upgrading firmware program.
According to the program firmware upgrading method provided by the embodiment of the application, at least the following beneficial effects are achieved: the program firmware upgrading method is simple in steps, and the purpose of upgrading the firmware can be achieved without operating the program firmware by professional persons.
A charging apparatus according to an embodiment of a third aspect of the present application includes:
the first generation module is used for generating a communication channel, and the communication channel is generated by inserting an upgrading device into a charging interface of the charging device;
an obtaining module, configured to obtain, through the communication path, an upgrade firmware program sent by the upgrade device;
the verification module is used for carrying out program verification on the obtained upgrading firmware program to obtain a verification result;
and the upgrading module is used for upgrading the firmware according to the verification result.
The charging equipment comprises a first generating module, an obtaining module, a checking module and an upgrading module, wherein an upgrading firmware program of the upgrading equipment is obtained into the charging equipment through the first generating module, the obtaining module, the checking module and the upgrading module, the upgrading firmware program is checked, and the firmware of the charging equipment is upgraded after the checking is passed.
According to the charging equipment of the embodiment of the application, at least the following beneficial effects are achieved: according to the embodiment of the application, the charging interface of the charging equipment is connected with the upgrading equipment only, and the firmware is waited to be upgraded. This simplifies the process and eliminates the need for specialized tools and software to upgrade the firmware. The embodiment of the application can update the firmware of the charging equipment under the condition of not damaging the shell of a product, and the cost of firmware upgrading is reduced.
An upgrade apparatus according to a fourth aspect embodiment of the present application includes:
the second generation module is used for generating a communication channel, and the communication channel is generated by inserting the upgrading equipment into a charging interface of charging equipment;
and the sending module is used for sending the firmware upgrading program to the charging equipment through the communication channel.
The upgrading device of the embodiment of the application comprises a second generating module and a sending module. The upgrading device stores a specific upgrading firmware program, the upgrading firmware program of the upgrading device is transmitted to the charging device through the modules, and the charging device updates the firmware according to the upgrading firmware program.
The upgrading device according to the embodiment of the application has at least the following beneficial effects: the operation process of firmware upgrading of the charging equipment is simplified, the firmware is not required to be upgraded by adopting special tools and software, the firmware of the charging equipment can be upgraded only by connecting the upgrading equipment with the charging interface of the charging equipment, and the operation is simple and convenient.
An upgrade system according to an embodiment of a fifth aspect of the present application includes: the charging apparatus of the third aspect embodiment of the present application and the upgrade apparatus of the fourth aspect embodiment of the present application.
The upgrading system of the embodiment of the application comprises the charging equipment and the upgrading equipment which are combined with each other to finish the upgrading process of the firmware of the charging equipment.
The upgrading system according to the embodiment of the application has at least the following beneficial effects: according to the embodiment of the application, the charging equipment and the upgrading equipment only need to be connected, and the operation is simple and convenient.
An electronic device according to a sixth aspect embodiment of the present application includes:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions for execution by the at least one processor to cause the at least one processor, when executing the instructions, to implement a method of program firmware upgrade according to the first aspect of the present application.
The computer-readable storage medium according to the seventh aspect of the present application, comprising:
the computer-readable storage medium stores computer-executable instructions for performing the method of upgrading a program firmware according to the first aspect of the present application.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, the first and second are only used for distinguishing technical features, and are not understood to indicate or imply relative importance or implicitly indicate the number of indicated technical features or implicitly indicate the precedence of the indicated technical features.
In the description of the present application, unless otherwise expressly limited, terms such as set, mounted, connected and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meaning of the terms in the present application by combining the detailed contents of the technical solutions.
In the description of the present application, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Currently, in order to improve the cruising ability of the headset, a wireless headset charging box is generally equipped. In the production and repair process, the upgrading mode of the program firmware of the wireless earphone charging box is generally as follows: the charging box firmware program updating is to perform program firmware updating on a Microcontroller (MCU) on a Printed Circuit Board Assembly (PCBA) by adopting a special firmware burning tool and software on the PCBA. However, the special firmware programming tool is generally developed and sold by an MCU original factory, is expensive, is complex in software operation of the matched firmware programming tool, has high requirements on personnel specialty and technology, is low in programming efficiency, needs to disassemble a shell for a repaired product after sale of the product, is low in maintenance degree, needs to replace a shell part, and is high in cost.
The specific structure of the wireless headset charging box adopted in the existing upgrading method, as shown in fig. 1, includes a charginginterface 110, anMCU microcontroller 120, apower module 130, a human-machine interface 140, aheadset interface 150, and anupdate interface 160. A power supply path is formed between the charginginterface 110 and thepower supply module 130, and the charginginterface 110 provides working power supply for thepower supply module 130 after charging. Upgrading the firmware of theMCU microcontroller 120 in the conventional wirelessheadset charging box 100 is achieved through theproprietary update interface 160, which requires upgrading the firmware through computer software using a proprietary MCU burning tool.
Based on this, the embodiment of the application provides a program firmware upgrading method, device, electronic device and storage medium, which can overcome the defects brought by the traditional method of upgrading the program firmware of the MCU microcontroller on the PCBA by using a special firmware burning tool and software, improve the upgrading efficiency, and reduce the cost.
It should be noted that thecharging device 300 mentioned in this embodiment of the present application may be a wireless headset charging box, and a specific structural block diagram of the charging device is shown in fig. 2, and the wirelessheadset charging box 100 in this embodiment of the present application includes a charginginterface 110, anMCU microcontroller 120, apower supply module 130, a human-computer interface 140, and aheadset interface 150. A power supply path is also arranged between the charginginterface 110 and thepower supply module 130, and the charginginterface 110 provides working power supply for thepower supply module 130 after charging. The communication data PIN of the charginginterface 110 is connected with the PIN of theMCU microcontroller 120, a communication path is arranged between theMCU microcontroller 120 and the charginginterface 110, and the two modules can communicate with each other. Compared with the structure of the conventional wirelessearphone charging box 100, the wirelessearphone charging box 100 provided by the embodiment of the application changes the firmware updating by adopting the special interface into the firmware updating by adopting theoriginal charging interface 110 of the wirelessearphone charging box 100, so that the structure of the wirelessearphone charging box 100 is simpler. The charginginterface 110 may obtain the upgraded firmware program transmitted from thefirmware device 200, transmit the upgraded firmware program to theMCU microcontroller 120, verify the upgraded firmware program, and finally upgrade the firmware by theMCU microcontroller 120. The embodiment of updating the MCU firmware using the exposed charginginterface 110 may not only be used to change the housing of the wirelessheadset charging box 100, but also be used to upgrade the firmware of the wirelessheadset charging box 100. Compared with the traditional special firmware programming tool and software for upgrading the program and firmware of theMCU 120 on the PCBA, the wirelessearphone charging box 100 and thefirmware device 200 are connected only by the embodiment of the application, and the firmware upgrading is waited to be completed. The operation process is simplified, and special tools and software are not required to be adopted to upgrade the firmware. The embodiment of the application can update the firmware of the wirelessearphone charging box 100 under the condition of not damaging the shell of a product, and the cost of firmware upgrading is reduced.
It should be noted that theupgrade apparatus 400 mentioned in this embodiment of the present application may be afirmware apparatus 200, and a specific structural block diagram of thefirmware apparatus 200 is shown in fig. 3, where thefirmware apparatus 200 in this embodiment of the present application includes: the firmware updating system comprises afirmware updating interface 210, afirmware memory module 220 and apower supply module 230, wherein thefirmware updating interface 210 writes and stores program firmware to be updated in thefirmware memory module 220, and thepower supply module 230 is used for supplying working power to thefirmware memory module 220. Thefirmware update interface 210 in thefirmware apparatus 200 can write and store the program firmware to be updated in thefirmware memory module 230, and thepower supply module 230 can also provide operating power for thefirmware memory module 220. Thefirmware updating interface 210 is used for updating the firmware, so that the firmware in thefirmware memory module 220 can be updated when the firmware needs to be updated, the updated firmware can be stored without additionally changing thefirmware device 200, and the cost for updating the firmware is greatly reduced. Thepower module 230 provided in thefirmware apparatus 200 can also provide power to thefirmware memory module 220 in time to supplement the working power of thefirmware memory module 220 in time. Thefirmware device 200 of the embodiment of the application has the advantages of simple structure, low cost, mass production and more convenient operation.
In some embodiments of the present application, the memory device of thefirmware memory module 220 comprises: EEPROM (Electrically Erasable Programmable Read-Only Memory), FLASH (solid state Memory and animation editor) and MCU. The EEPROM supports byte erasure, has long period and can modify data in the running process. FLASH is a broad-sense EEPROM, and is called FLASH in order to distinguish it from a general EEPROM that is erased and written in units of bytes. The FLASH has low power consumption, supports byte erasure and is convenient to modify data. Some MCUs have no program memory, and executable codes can only be placed in external EEPROM and FLASH. In addition, the MCU can be used for storing some parameters, and storing some data which needs to be stored after power failure. The biggest difference between EEPROM and FLASH is that the former operates according to sector and the latter operates according to byte, the addressing modes of the two are different, and the structures of the memory cells are also different. EEPROM is used more as a non-volatile data memory and FLASH is suitable for use as a program memory. In the application, the MCU is designed and integrated with two nonvolatile memories, namely FLASH and EEPROM, and the advantages of the FLASH and EEPROM are combined, so that the firmware program can be better stored and upgraded. It is noted that in some embodiments, the memory devices offirmware memory module 220 include not only EEPROM, FLASH, and MCU. Those skilled in the art can select the storage device of thefirmware memory module 220 according to actual situations, and will not be described in detail here.
In some embodiments of the present application, the interface of the wirelessheadset charging box 100 employs I2C (I2C Bus, Inter-Integrated Circuit) or UART (Universal Asynchronous Receiver Transmitter/Transmitter) or USB (Universal Serial Bus). I2C is a bi-directional interface standard with a bus arbitration mechanism. The interface of thefirmware device 200 in the embodiment of the present application is I2C, which is very suitable for performing short-distance and frequent data communication with the wirelessheadset charging box 100. The UART converts data to be transmitted between serial communication and parallel communication. The UART only needs to use two wires, has simple circuit structure, wide application and convenient replacement. USB is an external bus standard that specifies the connections and communications between devices. The interface of thefirmware device 200 in the embodiment of the application adopts the USB, and the USB is convenient to carry, unified in standard and convenient to use.
It should be noted that, in some embodiments, the interface offirmware apparatus 200 may be implemented not only by I2C or UART or USB, but also by USART (Universal Synchronous and Asynchronous transceiver/Asynchronous Receiver/Transmitter). Those skilled in the art can select the interface of thefirmware apparatus 200 according to actual situations, and will not be described in detail here.
Specifically, when thecharging device 300 is connected to theupgrading device 400 in the present application, as shown in fig. 4, a communication path is established between the wirelessheadset charging box 100 and thefirmware device 200, and the firmware upgrading of the program firmware of the wirelessheadset charging box 100 can be completed by using the charginginterfaces 110 exposed by thefirmware device 200 and the wirelessheadset charging box 100, so that the structure between the modules is simple, and the firmware upgrading efficiency is high.
In a first aspect, an embodiment of the present application provides a method for upgrading a program firmware, which is applied to thecharging device 300.
Referring to fig. 5, fig. 5 is a flowchart of a program firmware upgrading method according to some embodiments of the present application, which specifically includes the steps of:
s100, establishing a communication path with theupgrading device 400, wherein the communication path is established by inserting theupgrading device 400 into the charginginterface 110 of thecharging device 300;
s200, acquiring an upgrading firmware program sent by upgradingequipment 400 through a communication channel;
s300, carrying out program verification on the obtained upgraded firmware program to obtain a verification result;
and S400, upgrading the firmware according to the verification result.
In step S100, when the firmware of thecharging device 300 needs to be upgraded, the charginginterface 110 of thecharging device 300 may be connected to theupgrading device 400, and a communication path is established between the charginginterface 110 and theupgrading device 400 after the connection, so as to receive the upgraded firmware program sent from theupgrading device 400.
In some embodiments, as shown in fig. 6, step S100 further includes the steps of:
s110, checking the charginginterface 110 to determine that theupgrade apparatus 400 is inserted into the charginginterface 110;
s120, establishing a communication path with theupgrade apparatus 400 according to the checked checking result.
In step S110, after theupgrade apparatus 400 is inserted into the charginginterface 110 of the chargingapparatus 300, the charginginterface 110 needs to be checked, and whether theupgrade apparatus 400 is successfully inserted into the charginginterface 110 is determined. This may confirm that theupgrade apparatus 400 is inserted into the charginginterface 110 of the chargingapparatus 300, and ensure that the upgrade firmware program in theupgrade apparatus 400 can be transferred to thecharging apparatus 300.
In step S120, if it is checked that theupgrade apparatus 400 is not inserted into the charginginterface 110 of the chargingapparatus 300, theupgrade apparatus 400 is reinserted into the charginginterface 110 of the chargingapparatus 300. If it is checked that theupgrade apparatus 400 is inserted into the charginginterface 110 of the chargingapparatus 300, a communication path is established between the chargingapparatus 300 and theupgrade apparatus 400 for transmitting the upgrade firmware program.
In the embodiment of the present application, the charginginterface 110 is checked, so that a situation that the firmware upgrade fails due to the fact that the user cannot successfully insert theupgrade device 400 into thecharging device 300 can be avoided, whether a communication path is established between the chargingdevice 300 and theupgrade device 400 can be checked before the firmware is upgraded, and the efficiency of firmware upgrade is improved.
In step S200, the chargingapparatus 300 acquires the upgraded firmware program transmitted from theupgrading apparatus 400, and the upgraded firmware program is transferred from theupgrading apparatus 400 to thecharging apparatus 300 through the communication path.
In some embodiments, the program verification includes: the first verification and the second verification, as shown in fig. 7, the step S200 further includes the steps of:
step S210, performing first verification on the obtained upgrading firmware program through theMCU 120 to judge that the obtained upgrading firmware program is normal;
step S220, the upgrade firmware program is read and written into the internal program storage area of theMCU microcontroller 120 according to the first verification result, and the internal program storage area performs a second verification on the read and written upgrade firmware program, where the second verification is used to determine that the read and written upgrade firmware program is normal.
TheMCU microcontroller 120 performs a first check on the upgrade firmware program transmitted from theupgrade apparatus 400, where the first check is used to determine whether the acquired upgrade firmware program is normal. If it is verified that the acquired upgraded firmware program is not normal, the operation of firmware upgrade is stopped, and theupgrade apparatus 400 is reconnected to the charginginterface 110 of the chargingapparatus 300. And if the obtained firmware upgrading program is verified to be normal, the next firmware upgrading operation can be carried out. By doing so, whether the firmware upgrading program is completely and accurately transmitted to theMCU 120 can be checked in time, and the accuracy of the firmware upgrading success can be improved.
If the verification result of the first verification fails, the upgraded firmware program is not read and written to the internal program memory area of theMCU microcontroller 120. If the verification result of the first verification is successful and the upgrade firmware program received by theMCU microcontroller 120 is complete and accurate, the upgrade firmware program is read and written into the internal program storage area of theMCU microcontroller 120, then the read and written upgrade firmware program is subjected to second verification by the internal program storage area, and the second verification is used for judging whether the upgrade firmware program read and written by theMCU microcontroller 120 is normal or not. If the second check checks that the upgrade firmware program read from and written to the internal program storage region is not normal, the firmware upgrade operation is stopped, theupgrade device 400 needs to be reconnected to the charginginterface 110 of thecharging device 300, and if the read upgrade firmware program is checked to be normal, the next firmware upgrade operation can be performed. Therefore, whether the firmware program read and written in the internal program storage area is complete and accurate can be checked in time, and the accuracy of the firmware upgrading success is improved.
Before the firmware is upgraded, the chargingdevice 300 in the embodiment of the present application is checked for multiple times and then stored in the internal program storage area, so that the success rate of the firmware upgrade can be improved, and the efficiency of the firmware upgrade can be improved.
In step S300, the chargingdevice 300 verifies the acquired upgraded firmware program, so that the accuracy of firmware upgrade can be improved.
In step S400, after the firmware upgrade program is verified by the chargingdevice 300, the firmware upgrade of thecharging device 300 may be completed according to the firmware upgrade program.
The program firmware upgrading method is simple in steps, and the purpose of upgrading the firmware can be achieved without operating the program firmware by professional persons.
In some embodiments, checking charginginterface 110 includes: the charginginterface 110 is checked through timed polling, where the timed polling refers to that theMCU microcontroller 120 checks the charginginterface 110 at a certain interval time, and checks whether theupgrade apparatus 400 is inserted into the charginginterface 110.
The charginginterface 110 can be checked for many times in a timed polling mode, so that the checking accuracy can be ensured, and the firmware upgrading efficiency is improved.
The chargingdevice 300 in the embodiment of the present application may further be provided with a key for checking the charginginterface 110, and a user may actively press the key to check the charginginterface 110, so that the user obtains a feedback check result, and the use experience of the user is improved.
It should be noted that, the chargingdevice 300 in the embodiment of the present application may use other human-machine interfaces 140 instead of checking the charginginterface 110 in the form of setting a key, as long as the user can use the function of checking the charginginterface 110 on thecharging device 300, and those skilled in the art can select the function according to actual situations, which is not described in detail herein.
In the embodiment of the present application, the chargingdevice 300 establishes a communication path with theupgrade device 400, where the communication path is established by inserting theupgrade device 400 into the charginginterface 110 of thecharging device 300; acquiring an upgrade firmware program transmitted by theupgrade apparatus 400 through a communication path; carrying out program verification on the obtained upgraded firmware program to obtain a verification result; and upgrading the firmware according to the verification result. The chargingdevice 300 acquires the upgrade firmware program sent from theupgrade device 400 through the communication path, and verifies the upgrade firmware program, so that the integrity of the upgrade program firmware acquired by the chargingdevice 300 from theupgrade device 400 can be ensured, the accuracy of firmware upgrade of thecharging device 300 can be improved, and the efficiency of firmware upgrade can be improved. After the updated firmware program is verified, the firmware of thecharging device 300 can be updated according to the verification result. The program firmware upgrading method is simple in steps, and the purpose of upgrading the firmware can be achieved without operating the program firmware by professional persons.
In a second aspect, an embodiment of the present application provides a program firmware upgrading method, which is applied to theupgrading apparatus 400.
Referring to fig. 8, the method for upgrading program firmware provided by the present application specifically includes the steps of:
s500, inserting the charginginterface 110 of thecharging device 300 to generate a communication path;
s600, sending the firmware upgrading program to thecharging device 300 through the communication path, and upgrading the firmware by the chargingdevice 300 according to the firmware upgrading program.
In some embodiments, theupgrade apparatus 400 stores an upgrade firmware program, and when the firmware of the chargingapparatus 300 needs to be upgraded, the chargingapparatus 300 may be connected to theupgrade apparatus 400, and a communication path is established between the two after connection, so as to send the upgrade firmware program to thecharging apparatus 300.
In some embodiments, the chargingdevice 300 obtains the upgraded firmware program transmitted from theupgrading device 400, the upgraded firmware program is transmitted from theupgrading device 400 to thecharging device 300 through the communication path, and thecharging device 300 performs firmware upgrade according to the upgraded firmware program.
In the embodiment of the present application, a communication path is generated by inserting the charginginterface 110 of thecharging device 300, then the upgrade firmware program is sent to thecharging device 300 through the communication path, and thecharging device 300 performs firmware upgrade according to the upgrade firmware program.
In a third aspect, an embodiment of the present application further provides acharging device 300 for executing the program firmware upgrade method mentioned in the first aspect.
In some embodiments, the chargingdevice 300 includes:
a first generating module, configured to generate a communication path, where the communication path is generated by inserting theupgrading device 400 into the charginginterface 110 of thecharging device 300;
an acquisition module for acquiring the upgrade firmware program transmitted by theupgrade apparatus 400 through the communication path;
the verification module is used for carrying out program verification on the obtained upgrading firmware program to obtain a verification result;
and the upgrading module is used for upgrading the firmware according to the verification result.
In this embodiment of the application, theupgrade device 400 stores an upgrade firmware program, and when the firmware of thecharging device 300 needs to be upgraded, the chargingdevice 300 may be connected to theupgrade device 400, and a communication path is established between the two after the connection for receiving the upgrade firmware program sent from theupgrade device 400. The chargingapparatus 300 acquires the upgraded firmware program transmitted from theupgrading apparatus 400, and the upgraded firmware program is transferred from theupgrading apparatus 400 to thecharging apparatus 300 through the communication path. The chargingdevice 300 verifies the acquired upgraded firmware program, so that the accuracy of firmware upgrade can be improved. After the firmware upgrading program is verified by the chargingdevice 300, the firmware of thecharging device 300 can be upgraded according to the firmware upgrading program. The upgrading step of the firmware of thecharging device 300 in the embodiment of the application is simple, and only the charginginterface 110 of thecharging device 300 needs to be connected with theupgrading device 400 to wait for the completion of upgrading, so that the difficulty in upgrading the firmware is reduced.
In a fourth aspect, an embodiment of the present application further provides an upgrade apparatus for executing the program firmware upgrade method mentioned in the second aspect.
In some embodiments, theupgrade apparatus 400 includes:
a second generating module, configured to generate a communication path, where the communication path is generated by inserting theupgrading device 400 into the charginginterface 110 of thecharging device 300;
and a sending module, configured to send the firmware upgrade program to thecharging device 300 through the communication path.
In this embodiment, theupgrade device 400 stores an upgrade firmware program, and when the firmware of thecharging device 300 needs to be upgraded, the chargingdevice 300 may be connected to theupgrade device 400, and a communication path is established between the two devices after the connection for sending the upgrade firmware program to thecharging device 300. The chargingapparatus 300 acquires the upgrade firmware program transmitted from theupgrade apparatus 400, and thecharging apparatus 300 performs firmware upgrade according to the upgrade firmware program. The program firmware upgrading method is simple in steps, and the purpose of upgrading the firmware can be achieved without operating the program firmware by professional persons.
In a fifth aspect, the present application further provides acharging apparatus 300 including the embodiment of the third aspect of the present application and anupgrading apparatus 400 including the embodiment of the fourth aspect of the present application.
In the embodiment of the present application, the upgrade system includes the chargingapparatus 300 and theupgrade apparatus 400 of the embodiment of the present application. After thecharging equipment 300 is connected with theupgrading equipment 400, a communication channel is established, the upgrading of the program firmware of thecharging equipment 300 can be completed by utilizing theupgrading equipment 400 and the charginginterface 110 exposed out of thecharging equipment 300, the structures among the modules are simple, and the firmware upgrading efficiency is high.
In a sixth aspect, an embodiment of the present application further provides an electronic device.
In some embodiments, an electronic device includes: at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions, and the instructions are executed by the at least one processor, so that when the at least one processor executes the instructions, the method for upgrading the program firmware in the embodiment of the application is realized.
The processor and memory may be connected by a bus or other means.
The memory, which is a non-transitory computer readable storage medium, may be used to store a non-transitory software program and a non-transitory computer executable program, such as the program firmware upgrade method described in the embodiments of the present application. The processor implements the above described program firmware upgrade method by running non-transitory software programs and instructions stored in memory.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area can store and execute the program firmware upgrading method. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software programs and instructions required to implement the program firmware upgrade methods described above are stored in a memory and, when executed by one or more processors, perform the program firmware upgrade methods mentioned in the embodiments of the first and second aspects described above.
In a seventh aspect, this application further provides a computer-readable storage medium.
In some embodiments, a computer-readable storage medium stores computer-executable instructions for performing the program firmware upgrade methods mentioned in the embodiments of the first and second aspects.
In some embodiments, the storage medium stores computer-executable instructions that, when executed by one or more control processors, for example, by a processor in the electronic device, cause the one or more processors to perform the program firmware upgrade method.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present application. Furthermore, the embodiments and features of the embodiments of the present application may be combined with each other without conflict.