[go: up one dir, main page]

CN115529238B - Firmware upgrade method, device and equipment for nodes in controller area network - Google Patents

Firmware upgrade method, device and equipment for nodes in controller area network Download PDF

Info

Publication number
CN115529238B
CN115529238B CN202211193955.4A CN202211193955A CN115529238B CN 115529238 B CN115529238 B CN 115529238B CN 202211193955 A CN202211193955 A CN 202211193955A CN 115529238 B CN115529238 B CN 115529238B
Authority
CN
China
Prior art keywords
firmware
node
information
controller
upgraded
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.)
Active
Application number
CN202211193955.4A
Other languages
Chinese (zh)
Other versions
CN115529238A (en
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.)
Zhejiang Supcon Information Industry Co Ltd
Original Assignee
Zhejiang Supcon Information Industry 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 Zhejiang Supcon Information Industry Co Ltd filed Critical Zhejiang Supcon Information Industry Co Ltd
Priority to CN202211193955.4A priority Critical patent/CN115529238B/en
Publication of CN115529238A publication Critical patent/CN115529238A/en
Application granted granted Critical
Publication of CN115529238B publication Critical patent/CN115529238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a method, a device and equipment for upgrading firmware of a node in a controller area network, and relates to the technical field of firmware upgrading. The method is applied to an upper computer in a firmware upgrading system, the firmware upgrading system comprises the upper computer, a controller and at least one node, the upper computer is in communication connection with the controller through an Ethernet, and the controller is in communication connection with each node through a controller local area network. The method comprises the steps of analyzing upgrading firmware selected by a user to obtain firmware information and firmware data, determining nodes to be upgraded according to the firmware information and the types of the nodes, transmitting the firmware information, the firmware data and the identification of the nodes to be upgraded to a controller through an Ethernet, and sending prompt information to the controller after the transmission of the firmware information, the firmware data and the identification of the nodes to be upgraded is completed, wherein the prompt information is used for prompting the controller to start the upgrading of the nodes to be upgraded. By applying the embodiment of the application, the upgrading operation can be simplified, and the time cost and the labor cost are saved.

Description

Method, device and equipment for upgrading firmware of node in controller area network
Technical Field
The present application relates to the field of firmware upgrade technologies, and in particular, to a method, an apparatus, and a device for upgrading firmware of a node in a controller area network.
Background
The firmware is hardware with a software function of the electronic equipment, after leaving the factory, the electronic product gradually exposes more and more problems along with different use and actual application scenes of a user, and the firmware of the electronic equipment is required to be upgraded at the moment so as to repair bug (defect) or meet various actual requirements of the user.
Currently, when firmware upgrade is required to be performed on a node (device) in a controller area network (CAN, controller Area Network), after-sales personnel are often required to perform the firmware upgrade on site, and the operation is tedious, time consuming and the upgrade is troublesome.
Disclosure of Invention
The application aims to provide a method, a device and equipment for upgrading firmware of a node in a controller area network, aiming at the defects in the prior art, so that the upgrading operation can be simplified, and the time cost and the labor cost can be saved.
In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows:
In a first aspect, an embodiment of the present application provides a firmware upgrading method for a node in a controller area network, where the method is applied to an upper computer in a firmware upgrading system, the firmware upgrading system includes the upper computer, a controller, and at least one node, the upper computer is connected to the controller by an ethernet, and the controller is connected to each node by the controller area network, where the method includes:
analyzing the upgrade firmware selected by the user to obtain firmware information and firmware data, wherein the firmware information comprises the model number, the firmware length and the firmware verification information of the node to which the firmware is applied;
Determining nodes to be upgraded according to the firmware information and the model of each node;
transmitting the firmware information, the firmware data and the identification of the node to be upgraded to the controller through the Ethernet;
After the transmission of the firmware information, the firmware data and the identification of the node to be upgraded is completed, prompt information is sent to the controller, and the prompt information is used for prompting the controller to start the upgrade of the node to be upgraded.
Optionally, the determining the node to be upgraded according to the firmware information and the model of each node includes:
Determining at least one optional node according to the firmware information and the model of each node;
Determining at least one optional node to be selected according to the online information of each optional node reported by the controller;
and responding to the selection operation of the user on the at least one selectable node to be selected, and determining the node to be upgraded.
Optionally, the transmitting the firmware information, the firmware data, and the identification of the node to be upgraded to the controller through the ethernet includes:
Transmitting the firmware information and the identification of the node to be upgraded to a first storage module in the controller through the Ethernet;
And transmitting the firmware data to a second storage module in the controller through Ethernet.
Optionally, the method further comprises:
Monitoring first progress information of the firmware information, the firmware data and the identification of the node to be upgraded transmitted to the controller;
And displaying the first progress information.
In a second aspect, an embodiment of the present application further provides a firmware upgrading method for a node in a controller area network, where the method is applied to a controller in a firmware upgrading system, the firmware upgrading system includes an upper computer, the controller and at least one node, the upper computer is connected with the controller through an ethernet, and the controller is connected with each node through the controller area network, and the method includes:
Receiving firmware information, firmware data and an identifier of a node to be upgraded, which are sent by the upper computer, through the Ethernet, wherein the firmware information comprises firmware length and firmware verification information;
after receiving the prompt information sent by the upper computer, transmitting the firmware information and the firmware data to the node to be upgraded through the controller local area network according to the identification of the node to be upgraded, so that the node to be upgraded carries out firmware upgrading based on the firmware information and the firmware data, wherein the prompt information is used for prompting the controller to start the upgrading of the node to be upgraded.
Optionally, the transmitting the firmware information and the firmware data to the node to be upgraded through the controller area network includes:
Transmitting the firmware information to a first storage unit of the node to be upgraded through the controller area network;
acquiring storage information of a second storage unit of the node to be upgraded through the controller area network;
dividing the firmware data according to the storage information of the second storage unit to obtain a plurality of firmware package data;
And respectively transmitting each piece of firmware package data to the second storage unit in the node to be upgraded through the controller area network.
Optionally, the method further comprises:
monitoring second progress information of the firmware information and the firmware data transmitted to the node to be upgraded;
and transmitting the second progress information to the upper computer through the Ethernet so that the upper computer displays the second progress information.
In a third aspect, an embodiment of the present application further provides a method for upgrading firmware of a node in a controller area network, where the method is applied to a node to be upgraded in a firmware upgrading system, where the firmware upgrading system includes an upper computer, a controller, and the node to be upgraded, the upper computer is connected to the controller by an ethernet, and the controller is connected to the node to be upgraded by the controller area network in a communication manner, where the method includes:
Receiving firmware information and firmware data transmitted by a controller through the controller local area network, wherein the firmware information comprises firmware length and firmware verification information;
Restarting the node to be upgraded after the firmware data is received, reading the firmware data based on the firmware length in the firmware information through a boot loader, and checking the firmware data according to firmware checking information in the firmware information;
And if the verification is passed, replacing the original firmware of the node to be upgraded with the firmware data.
Optionally, the reading, by the bootloader, the firmware data based on the firmware length in the firmware information, and verifying the firmware data according to firmware verification information in the firmware information, including:
Reading firmware verification information and firmware length in the firmware information from a first storage unit of the node to be upgraded through the boot loader;
Reading firmware data corresponding to the firmware length from a second storage unit of the node to be upgraded based on the firmware length in the firmware information through the boot loader, and obtaining a first real verification value according to the firmware data;
and determining whether the first true check value is consistent with firmware check information in the firmware information or not through the boot loader.
Optionally, the firmware data includes a plurality of firmware packets, and the receiving controller transmits the firmware information and the firmware data through the controller area network, including:
receiving firmware information transmitted by a controller through the controller local area network;
And receiving firmware package data currently transmitted by a controller through the controller local area network and firmware sub-verification information corresponding to the firmware package data, and verifying the firmware package data according to a second real verification value obtained by the firmware package data and the firmware sub-verification information corresponding to the firmware package data.
In a fourth aspect, an embodiment of the present application provides a firmware upgrading device for a node in a controller area network, where the device is applied to an upper computer in a firmware upgrading system, the firmware upgrading system includes the upper computer, a controller, and at least one node, the upper computer is connected to the controller by an ethernet, and the controller is connected to each node by the controller area network, where the device includes:
The analysis module is used for analyzing the upgrade firmware selected by the user to obtain firmware information and firmware data, wherein the firmware information comprises the model number, the firmware length and the firmware verification information of the node to which the firmware is applied;
The determining module is used for determining the node to be upgraded according to the firmware information and the model of each node;
The first transmission module is used for transmitting the firmware information, the firmware data and the identification of the node to be upgraded to the controller through the Ethernet;
And the sending module is used for sending prompt information to the controller after the firmware information, the firmware data and the identification of the node to be upgraded are transmitted, wherein the prompt information is used for prompting the controller to start the upgrade of the node to be upgraded.
Optionally, the determining module is specifically configured to determine at least one optional node according to the firmware information and the model of each node, determine at least one optional node to be selected according to the online information of each optional node reported by the controller, and determine the node to be upgraded in response to a selection operation of a user on the at least one optional node to be selected.
Optionally, the first transmission module is specifically configured to transmit the firmware information and the identifier of the node to be upgraded to a first storage module in the controller through the ethernet, and transmit the firmware data to a second storage module in the controller through the ethernet.
Optionally, the device further comprises a display module;
the display module is used for monitoring first progress information of the firmware information, the firmware data and the identification of the node to be upgraded, and displaying the first progress information.
In a fifth aspect, an embodiment of the present application provides a firmware upgrading device for a node in a controller area network, where the device is applied to a controller in a firmware upgrading system, the firmware upgrading system includes an upper computer, the controller, and at least one node, the upper computer is communicatively connected to the controller through an ethernet, and the controller is communicatively connected to each node through the controller area network, where the device includes:
the first receiving module is used for receiving firmware information, firmware data and an identifier of a node to be upgraded, which are sent by the upper computer, through the Ethernet, wherein the firmware information comprises firmware length and firmware verification information;
And the second transmission module is used for transmitting the firmware information and the firmware data to the node to be upgraded through the controller local area network after receiving the prompt information sent by the upper computer, so that the node to be upgraded carries out firmware upgrading based on the firmware information and the firmware data, wherein the prompt information is used for prompting the controller to start the upgrading of the node to be upgraded.
The second transmission module is specifically configured to transmit the firmware information to a first storage unit of the node to be upgraded through the controller area network, acquire storage information of a second storage unit of the node to be upgraded through the controller area network, segment the firmware data according to the storage information of the second storage unit to obtain a plurality of firmware package data, and transmit each firmware package data to the second storage unit in the node to be upgraded through the controller area network.
Optionally, the second transmission module is further configured to monitor a second progress information of the firmware information and the firmware data transmitted to the node to be upgraded, and transmit the second progress information to the upper computer through the ethernet, so that the upper computer displays the second progress information.
In a sixth aspect, an embodiment of the present application provides a firmware upgrading device for a node in a controller area network, where the device is applied to a node to be upgraded in a firmware upgrading system, where the firmware upgrading system includes an upper computer, a controller, and the node to be upgraded, the upper computer is connected to the controller by an ethernet, and the controller is connected to the node to be upgraded by a controller area network, where the device includes:
The second receiving module is used for receiving firmware information and firmware data transmitted by the controller through the controller local area network, wherein the firmware information comprises firmware length and firmware verification information;
the verification module is used for restarting the node to be upgraded after the firmware data is received, reading the firmware data based on the firmware length in the firmware information through the boot loader, and verifying the firmware data according to the firmware verification information in the firmware information;
And the replacing module is used for replacing the original firmware of the node to be upgraded with the firmware data if the verification is passed.
Optionally, the verification module is specifically configured to read firmware verification information and firmware length in the firmware information from a first storage unit of the node to be upgraded through the bootloader, read firmware data corresponding to the firmware length from a second storage unit of the node to be upgraded based on the firmware length in the firmware information through the bootloader, obtain a first real verification value according to the firmware data, and determine whether the first real verification value and the firmware verification information in the firmware information are consistent through the bootloader.
Optionally, the firmware data includes a plurality of firmware packetized data;
Correspondingly, the second receiving module is also used for receiving the firmware information transmitted by the controller through the controller local area network, receiving the firmware sub-verification information corresponding to the firmware sub-package data and the firmware sub-verification value obtained by the controller through the current transmission of the controller local area network, and verifying the firmware sub-package data according to the second real verification value obtained by the firmware sub-package data and the firmware sub-verification information corresponding to the firmware sub-package data.
In a seventh aspect, an embodiment of the present application provides an electronic device, including a processor, a storage medium, and a bus, where the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the firmware upgrading method of the node in the controller area network of the first aspect, the second aspect, and the third aspect.
In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor performs the steps of the firmware upgrade method of a node in the controller area network of the first aspect, the second aspect, and the third aspect.
The beneficial effects of the application are as follows:
The embodiment of the application provides a method, a device and equipment for upgrading firmware of a node in a controller area network, which are applied to an upper computer in a firmware upgrading system, the firmware upgrading system comprises an upper computer, a controller and at least one node, wherein the upper computer is in communication connection with the controller through an Ethernet, and the controller is in communication connection with each node through a controller local area network. The method comprises the steps of analyzing upgrading firmware selected by a user to obtain firmware information and firmware data, wherein the firmware information comprises the model, the firmware length and firmware verification information of a node to which the firmware is applied, determining the node to be upgraded according to the firmware information and the model of each node, transmitting the firmware information, the firmware data and the identification of the node to be upgraded to a controller through an Ethernet, and sending prompt information to the controller after the transmission of the firmware information, the firmware data and the identification of the node to be upgraded is completed, wherein the prompt information is used for prompting the controller to start the upgrading of the node to be upgraded.
According to the method for upgrading the firmware of the nodes in the controller area network, which is provided by the embodiment of the application, based on the connection relation that the upper computer is in communication connection with the controller through the Ethernet and the controller is in communication connection with each node through the controller area network, the upper computer matches the model of the node to which the firmware in the analyzed firmware information is applied with the model of each node to obtain the node to be upgraded, the firmware information, the firmware data and the identification of the node to be upgraded are firstly transmitted to the controller through the Ethernet, and then the controller can start the upgrade of the node to be upgraded through the controller area network based on the received firmware information and the received firmware data. According to the application, the remote firmware upgrading can be carried out on the node to be upgraded through the Ethernet, so that the upgrading operation is simplified, and the time cost and the labor cost are saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a firmware upgrade system of a node in a controller area network according to an embodiment of the present application;
Fig. 2 is a flow chart of a firmware upgrading method of a node in a controller area network according to an embodiment of the present application;
fig. 3 is a flowchart of another firmware upgrading method of a node in a controller area network according to an embodiment of the present application;
fig. 4 is a flowchart of a firmware upgrading method of a node in a controller area network according to another embodiment of the present application;
Fig. 5 is a flowchart of a firmware upgrading method of a node in a controller area network according to another embodiment of the present application;
FIG. 6 is a schematic diagram of a storage module of a node to be upgraded according to an embodiment of the present application;
fig. 7 is a flowchart of another firmware upgrading method of a node in a controller area network according to an embodiment of the present application;
fig. 8 is a flowchart of a firmware upgrading method of a node in a controller area network according to another embodiment of the present application;
Fig. 9 is a schematic flow chart of firmware upgrade interaction between an upper computer, a controller and a node to be upgraded according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a firmware upgrading apparatus for a node in a controller area network according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
Before explaining the embodiment of the present application in detail, an application scenario of the present application will be described first. The application scenario may specifically be a scenario of firmware upgrade to a node in a controller area network (Controller Area Network, CAN), where the node may be referred to as a CAN device, and it may be understood that the CAN device is a device that needs to utilize a CAN bus network to perform firmware upgrade, where the CAN device may specifically be an external expansion module of the controller, and it should be noted that the specific form of the CAN device is not limited by the present application. Fig. 1 is a schematic view of a firmware upgrading system for a node in a controller area network according to an embodiment of the present application, as shown in fig. 1, the system may include an upper computer 101, a controller 102 and at least one node 103, where the upper computer 101 is communicatively connected to the controller 102 through an ethernet, and the controller 102 is communicatively connected to each node 103 through the controller area network, i.e. a CAN bus network.
The upper computer 101 is connected to the controller 102 through an ethernet switching device, so that relevant information (such as firmware information and firmware data) of the firmware to be upgraded, which is selected by a user on the upper computer 101, CAN be transmitted to the controller 102 through the ethernet switching device, and then the controller 102 CAN send the received firmware information and firmware data to a node 103 (i.e. a node to be upgraded) to be upgraded through a CAN bus network, and the node to be upgraded performs firmware upgrade according to the obtained firmware information and firmware data. The upper computer 101, the controller 102 and the node to be upgraded CAN be specifically processed in the following way, so that remote firmware upgrade CAN be performed on the CAN equipment through the Ethernet, the upgrade operation is simplified, and the time cost and the labor cost are saved.
The firmware upgrade method of the node in the controller area network according to the present application is illustrated in the following with reference to the accompanying drawings. Fig. 2 is a flow chart of a firmware upgrading method of a node in a controller area network according to an embodiment of the present application. The method is applied to the upper computer 101 in the firmware upgrade system, as shown in fig. 2, and the method may include:
S201, analyzing the upgrade firmware selected by the user to obtain firmware information and firmware data.
The firmware information comprises the model number, the firmware length and the firmware verification information of the node to which the firmware is applied. It can be understood that the firmware information corresponds to header data in the upgrade file (binary file for upgrade, i.e., bin file) obtained by parsing.
The user can select the upgrade firmware which needs to be upgraded currently through the interface of the upper computer according to the actual requirement. The upper computer responds to the selection operation aiming at the upgrade firmware, namely analyzes the selected upgrade firmware to obtain the upgrade file, wherein the upgrade file comprises firmware information and firmware data.
S202, determining the node to be upgraded according to the firmware information and the model of each node.
S203, transmitting the firmware information, the firmware data and the identification of the node to be upgraded to the controller through the Ethernet.
After the upper computer analyzes the firmware information, the model of the node to which the firmware in the firmware information is applied can be matched with the model of each node, and the successfully matched node can be used as the node to be upgraded.
It CAN be understood that the upper computer stores the identifiers of the nodes in advance, and the identifiers of the nodes are the IDs of the nodes in the CAN. After the node to be upgraded is determined, the upper computer can bind the upper file with the identifier of the node to be upgraded, and then transmit the firmware information, the firmware data and the identifier of the node to be upgraded to a controller in communication connection with the upper file through the Ethernet and the Ethernet switching equipment.
In one example, the host computer may first send the firmware information and the identification of the node to be upgraded to the controller via ethernet, and then send the firmware data to the controller via ethernet.
S204, after the transmission of the firmware information, the firmware data and the identification of the node to be upgraded is completed, prompt information is sent to the controller.
The prompt information is used for prompting the controller to start the upgrade of the node to be upgraded. That is, after receiving the prompt message sent by the upper computer, the controller sends the firmware information and the firmware data to the node to be upgraded.
In one example, the host computer may first send the firmware information and the identification of the node to be upgraded to the controller via ethernet, and then send the firmware data to the controller via ethernet. After the transmission of the firmware data is completed, the upper computer can generate prompt information and transmit the prompt information to the controller through the Ethernet, and the controller can start the upgrade of the node to be upgraded based on the received firmware information and the firmware data.
In summary, in the method for upgrading the firmware of the node in the controller area network provided by the application, based on the connection relation that the upper computer is in communication connection with the controller through the ethernet and the controller is in communication connection with each node through the controller area network, the upper computer matches the model of the node to which the firmware in the obtained firmware information is applied with the model of each node to obtain the node to be upgraded, firstly, the firmware information, the firmware data and the identification of the node to be upgraded are transmitted to the controller through the ethernet, and then the controller can start the upgrade of the node to be upgraded through the controller area network based on the received firmware information and the firmware data. According to the application, the remote firmware upgrading can be carried out on the node to be upgraded through the Ethernet, so that the upgrading operation is simplified, and the time cost and the labor cost are saved.
Fig. 3 is a flowchart of another firmware upgrading method of a node in a controller area network according to an embodiment of the present application. As shown in fig. 3, optionally, determining the node to be upgraded according to the firmware information and the model of each node includes:
s301, determining at least one optional node according to the firmware information and the model of the node.
S302, determining at least one optional node to be selected according to the online information of each optional node reported by the controller.
Illustratively, the host computer uses nodes having a model identical to the model of the node to which the firmware included in the firmware information is applied as optional nodes. If the selectable node is one, the selectable node is directly used as the node to be upgraded, and if the selectable node is a plurality of (e.g. 3) selectable nodes, the upper computer also needs to determine the selectable node to be selected according to the online information of the node.
It can be understood that the controller may feed back the online information of each node to the upper computer in advance, that is, the upper computer stores the online information of each optional node in advance, where the online information includes an online state and an offline state. Illustratively, the upper computer takes the optional node with the online information in the online state as the optional node to be selected.
S303, responding to the selection operation of the user for at least one selectable node to be selected, and determining the node to be upgraded.
If the number of the optional nodes to be selected is one, the upper computer needs to select the optional node a to be selected as the node to be upgraded according to the selection operation of the user, if the number of the optional nodes to be selected is multiple, then the optional node a to be selected is used as the node to be upgraded.
Optionally, the transmitting the firmware information, the firmware data and the identification of the node to be upgraded to the controller through the Ethernet includes transmitting the firmware information and the identification of the node to be upgraded to a first storage module in the controller through the Ethernet, and transmitting the firmware data to a second storage module in the controller through the Ethernet.
The controller includes a first memory module and a second memory module, which are the same memory module, such as RAM (Random Access Memory ), for example. For another example, the first memory module may be RAM and the second memory module may be Flash memory, i.e., SPIFlash, that communicates using SPI (SERIAL PERIPHERAL INTERFACE ). The memory space in the SPIFlash may include a self-service space, which is typically used to store relevant parameters of the controller, a temporary space in which firmware data may be stored, and a remaining unused space.
Optionally, the method may further include monitoring first progress information of the transmission of the firmware information, the firmware data, and the identification of the node to be upgraded to the controller, and displaying the first progress information.
In an implementation embodiment, the upper computer monitors, in real time, the amount of data currently transmitted corresponding to the firmware information, the firmware data and the identifier of the node to be upgraded, and uses, as the first running information, the ratio between the amount of data currently transmitted and the total amount of data of the firmware information, the firmware data and the identifier of the node to be upgraded, and the ratio can be displayed in real time by using a transmission progress bar displayed on the upper computer.
Therefore, the user can timely and intuitively know the progress conditions of the upper computer transmitting the firmware information, the firmware data and the identification of the node to be upgraded to the controller through the Ethernet.
The firmware upgrading method of the nodes in the controller area network mentioned in the following examples is applied to the controller in the firmware upgrading system shown in fig. 1, wherein the connection relationship among the upper computer, the controller and each node in the firmware upgrading system can be described with reference to relevant parts, and will not be described here.
Fig. 4 is a flowchart of a firmware upgrading method of a node in a controller area network according to another embodiment of the present application. As shown in fig. 4, the method may include:
s401, receiving firmware information, firmware data and identification of a node to be upgraded, which are sent by the upper computer, through an Ethernet.
The firmware information comprises firmware length and firmware verification information. In one example, the controller stores firmware information and an identification of the node to be upgraded in a first memory module and firmware data in a second memory module.
And S402, after receiving the prompt information sent by the upper computer, transmitting the firmware information and the firmware data to the node to be upgraded through the controller area network according to the identification of the node to be upgraded, so that the node to be upgraded carries out firmware upgrading based on the firmware information and the firmware data.
The prompt information is used for prompting the controller to start the upgrade of the node to be upgraded. That is, after receiving the prompt message sent by the upper computer, the controller sends the firmware information and the firmware data to the node to be upgraded.
In one exemplary embodiment, the host computer first sends the firmware information and the identification of the node to be upgraded to the controller, and then sends the firmware data to the controller. After all the firmware data are sent to the controller, the upper computer sends prompt information to the controller. After receiving the prompt message sent by the upper computer, the controller CAN firstly transmit the firmware message to the node to be upgraded corresponding to the identifier of the node to be upgraded through the CAN bus network, and then transmit the firmware data to the node to be upgraded through the CAN bus network, so that the node to be upgraded carries out firmware upgrading according to the firmware message and the firmware data.
It CAN be seen that, based on the fact that the controller is in communication connection with the upper computer through the Ethernet and is in communication connection with the node to be upgraded through the CAN bus network, the controller CAN receive firmware information and firmware data sent by the upper computer and the identification of the node to be upgraded through the Ethernet, and then based on the controller local area network, the received firmware information and firmware data are sent to the node to be upgraded corresponding to the identification of the node to be upgraded, so that the node to be upgraded CAN perform firmware upgrading based on the firmware information and the firmware data. That is, remote firmware upgrades can be performed in this way, avoiding the need for after-market personnel to perform the firmware upgrades in the field.
Meanwhile, after receiving the prompt information sent by the upper computer, the controller sends firmware information and firmware data to the node to be upgraded, so that data transmission among the upper computer, the controller and the node to be upgraded CAN be divided into two independent stages, the high speed of the Ethernet and the low speed of the CAN bus network CAN be staggered, and the success rate of firmware upgrading of the node to be upgraded is further improved.
Fig. 5 is a flowchart of a firmware upgrading method of a node in a controller area network according to another embodiment of the present application. As shown in fig. 5, optionally, the above-mentioned transmitting the firmware information and the firmware data to the node to be upgraded through the controller area network includes:
S501, transmitting the firmware information to a first storage unit of a node to be upgraded through a controller area network.
S502, obtaining storage information of a second storage unit of the node to be upgraded through a controller area network.
The controller CAN communicate with the node to be upgraded through a CANopen protocol, which is a high-level communication protocol constructed on the CAN, and the SDO (SERVICE DATA Object) protocol in the CANopen protocol includes two protocols, such as the SDO Segment protocol and the SDO Block protocol.
Fig. 6 is a schematic structural diagram of a storage module of a node to be upgraded according to an embodiment of the present application. As shown in fig. 6, the storage module of the node to be upgraded includes a Bootloader unit, an application unit, a second storage unit, a first storage unit and a remaining unused unit, where the Bootloader unit is used for storing a Bootloader space, the application unit is used for firmware upgrade, that is, firmware data on the application unit is firmware data upgraded by the node to be upgraded, the second storage unit is a space for storing firmware data, and the first storage unit is a space for storing firmware information.
As described in connection with fig. 6, the controller may utilize the SDO Segment protocol to transmit firmware information to the first storage unit of the node to be upgraded through the CAN bus network. It should be understood that the second storage unit may be formed by a plurality of Flash sectors, for example, the storage space length of each Flash sector is 8 bytes, and it should be noted that the present application is not limited to the length of the Flash sector. The controller can obtain the storage information of the second storage unit of the node to be upgraded, namely the length of the Flash sector in the second storage unit, through the SDO Segment protocol.
S503, dividing the firmware data according to the storage information of the second storage unit to obtain a plurality of firmware package data.
S504, respectively transmitting the firmware package data to a second storage unit in the node to be upgraded through the controller area network.
Continuing with the above example, after the controller obtains the length of the Flash sector in the second storage unit, the firmware data may be divided based on the length of the Flash sector to obtain a plurality of firmware package data, where the length of the last divided firmware package data is less than or equal to the length of the Flash sector, such as 8 bytes.
After obtaining the plurality of firmware package data, the controller can further obtain the storage address of each firmware package data in the second storage unit. The controller uses SDO Block protocol to store the storage address of each firmware packet data in the second storage unit through CAN bus network.
It can be seen that the firmware information and the firmware data sent by the controller to the node to be upgraded can be stored in the first storage unit and the second storage unit in advance, so that the normal operation of the node to be upgraded is not affected in the data transmission process.
Optionally, the method can further comprise monitoring second progress information of the firmware information and the firmware data transmitted to the node to be upgraded, and transmitting the second progress information to the upper computer through the Ethernet so that the upper computer displays the second progress information.
In an implementation embodiment, the controller monitors the firmware information and the current transmitted data amount corresponding to the firmware data transmitted to the node to be upgraded in real time, takes the ratio between the current transmitted data amount and the total data amount corresponding to the firmware information and the firmware data as second progress information, and transmits the second progress information to the upper computer through the Ethernet, so that the upper computer can display the ratio in real time on a transmission progress bar displayed on an interface of the upper computer.
Therefore, the user CAN timely and intuitively know the progress condition of the upper computer sending the firmware information and the firmware data to the node to be upgraded through the CAN bus network.
The firmware upgrading method of the node in the controller area network mentioned in the following example is applied to the node (node to be upgraded) in the firmware upgrading system shown in fig. 1, wherein the connection relationship among the upper computer, the controller and each node in the firmware upgrading system can be described with reference to relevant parts, and will not be described here.
Fig. 7 is a flowchart of another firmware upgrading method for a node in a controller area network according to an embodiment of the present application. As shown in fig. 7, the method may include:
s701, receiving firmware information and firmware data transmitted by a controller through a controller area network.
The firmware information comprises firmware length and firmware verification information. For example, as described with reference to fig. 6, firmware information sent by the controller through the CAN bus network may be received first, and the firmware information may be stored in a first storage unit of the memory module, and then firmware data sent by the controller through the CAN bus network may be received, and the firmware data may be stored in a second storage unit of the memory module.
S702, restarting the node to be upgraded after the firmware data is received, reading the firmware data based on the firmware length in the firmware information through a boot loader, and checking the firmware data according to the firmware checking information in the firmware information.
S703, if the verification is passed, replacing the original firmware of the node to be upgraded with the firmware data.
An exemplary node to be upgraded can determine whether complete firmware data is received currently according to the firmware length in the received firmware information, if the node to be upgraded determines that complete firmware data is received, the node to be upgraded can restart, further operate a boot loader, read firmware data corresponding to the firmware length from a storage unit storing the firmware data according to the firmware length in the firmware information through the boot loader, and further check the firmware data according to the firmware data corresponding to the firmware length and firmware check information in the firmware information, so as to determine whether an error occurs in the process of sending the firmware data to the node to be upgraded by the controller. If the verification is passed, that is, it is determined that no error occurs in the process of sending the firmware data to the node to be upgraded by the controller, the original firmware of the node to be upgraded is replaced by the firmware data, and the firmware of the node to be upgraded is upgraded.
It can be seen that the node to be upgraded can automatically receive the firmware information and the firmware data transmitted by the controller through the controller local area network, and further perform firmware upgrading, so that remote firmware upgrading can be performed, and the phenomenon that after-sales personnel are required to perform firmware upgrading on site is avoided.
The method comprises the steps of reading firmware data based on the firmware length in the firmware information through a boot loader, and verifying the firmware data according to the firmware verification information in the firmware information, wherein the method comprises the steps of reading the firmware verification information and the firmware length in the firmware information from a first storage unit of a node to be upgraded through the boot loader, reading the firmware data corresponding to the firmware length from a second storage unit of the node to be upgraded based on the firmware length in the firmware information through the boot loader, obtaining a first real verification value according to the firmware data, and determining whether the first real verification value is consistent with the firmware verification information in the firmware information through the boot loader.
As described with reference to fig. 6, if it is determined that the second storage unit stores the complete firmware data, the node to be upgraded is restarted, and the Bootloader in the Bootloader unit is operated, so that the firmware verification information and the firmware length in the firmware information are read from the first storage unit through the Bootloader, the Bootloader reads the firmware data corresponding to the firmware length from the second storage unit based on the read firmware length, and further calculates to obtain the first real verification value according to the firmware data corresponding to the firmware length.
After the first true check value is obtained, the first true check value may be compared with firmware check information. If the first real verification value is inconsistent with the firmware verification information, the controller is proved to have an error when sending the firmware data to the node to be upgraded, and the node to be upgraded can send a retransmission instruction to the controller, and the firmware information stored in the first storage unit and the firmware data stored in the second storage unit are deleted.
If the first real verification value is consistent with the firmware verification information, deleting the related data of the original firmware in the application area through the boot loader, and copying the firmware data corresponding to the firmware length in the second storage unit into the application area, namely, carrying out firmware upgrading on the node to be upgraded.
Furthermore, after the firmware data corresponding to the firmware length in the second storage unit is copied to the application area, the verification can be performed according to the firmware verification information and the real verification value obtained by calculation according to the firmware data corresponding to the firmware length, so that errors in the copying process are avoided.
Therefore, the efficiency and the accuracy of upgrading the node to be upgraded can be improved.
Fig. 8 is a flowchart of a firmware upgrading method of a node in a controller area network according to another embodiment of the present application. As shown in fig. 8, optionally, the receiving firmware information and firmware data transmitted by the controller through the controller area network includes:
S801, receiving firmware information transmitted by a controller through a controller area network.
S802, receiving firmware package data currently transmitted by the controller through the controller local area network and firmware sub-verification information corresponding to the firmware package data, and verifying the firmware package data according to a second real verification value obtained by the firmware package data and the firmware sub-verification information corresponding to the firmware package data.
Illustratively, as described in connection with fig. 6, the node to be upgraded stores firmware information transmitted by the controller over the CAN bus network in the first storage unit.
According to the above description, the controller may divide the firmware data into a plurality of firmware sub-packets according to the storage information of the second storage unit of the node to be upgraded, and may calculate the firmware sub-check information corresponding to each firmware sub-packet according to each firmware sub-packet.
Based on the above, the node to be upgraded can store the currently received firmware sub-packet data in the second storage unit, store the firmware sub-check information corresponding to the firmware sub-packet data in the first storage unit, further calculate a second real check value according to the firmware sub-packet data in the second storage unit, compare the second real check value with the firmware sub-check information corresponding to the firmware sub-packet data, and determine whether to continue to receive other firmware sub-packet data sent by the controller according to the comparison result.
It can be seen that the controller divides the firmware data into a plurality of firmware sub-packet data, sends the firmware sub-packet data and the firmware sub-check information corresponding to the firmware sub-packet data to the node to be upgraded, and the node to be upgraded can check according to the firmware sub-packet data and the firmware sub-check information corresponding to the firmware sub-packet data, so that transmission errors can be found as soon as possible, and firmware upgrading efficiency is improved.
Fig. 9 is a schematic flow chart of firmware upgrade interaction between an upper computer, a controller and a node to be upgraded according to an embodiment of the present application. As illustrated in fig. 9, the method may include:
and S901, the upper computer analyzes the upgrade firmware selected by the user to obtain firmware information and firmware data.
S902, the upper computer transmits the firmware information, the firmware data and the identification of the node to be upgraded to the controller through the Ethernet.
S903, the controller receives firmware information, firmware data and the identification of the node to be upgraded, which are sent by the upper computer, through the Ethernet.
S904, the upper computer sends prompt information to the controller after the transmission of the firmware information, the firmware data and the identification of the node to be upgraded is completed.
And S905, after receiving the prompt information sent by the upper computer, the controller transmits the firmware information and the firmware data to the node to be upgraded through the controller local area network according to the identification of the node to be upgraded, so that the node to be upgraded carries out firmware upgrading based on the firmware information and the firmware data.
S906, the node to be upgraded receives the firmware information and the firmware data transmitted by the controller through the controller local area network.
S907, restarting the node to be upgraded after the node to be upgraded receives the firmware data, reading the firmware data based on the firmware length in the firmware information through the boot loader, and checking the firmware data according to the firmware checking information in the firmware information.
And S908, if the verification is passed, the node to be upgraded replaces the original firmware of the node to be upgraded with the firmware data.
For the specific details of the method, reference may be made to the relevant parts of the foregoing method embodiments, and the disclosure is not repeated here.
Fig. 10 is a schematic structural diagram of a firmware upgrading apparatus for a node in a controller area network according to an embodiment of the present application. The device is applied to an upper computer in a firmware upgrading system, the firmware upgrading system comprises the upper computer, a controller and at least one node, the upper computer is in communication connection with the controller through an Ethernet, the controller is in communication connection with each node through a controller local area network, and the device comprises:
The parsing module 1001 is configured to parse the upgraded firmware selected by the user to obtain firmware information and firmware data, where the firmware information includes a model number, a firmware length, and firmware verification information of a node to which the firmware is applied;
a determining module 1002, configured to determine a node to be upgraded according to the firmware information and a model of each node;
A first transmission module 1003, configured to transmit firmware information, firmware data, and an identifier of a node to be upgraded to the controller through ethernet;
and the sending module 1004 is configured to send, after the transmission of the firmware information, the firmware data, and the identifier of the node to be upgraded is completed, a prompt message to the controller, where the prompt message is used to prompt the controller to start the upgrade of the node to be upgraded.
Optionally, a determining module 1002 is specifically configured to determine at least one optional node according to the firmware information and the model of each node, determine at least one optional node to be selected according to the online information of each optional node reported by the controller, and determine the node to be upgraded in response to a selection operation of the user on the at least one optional node to be selected.
Optionally, the first transmission module 1003 is specifically configured to transmit the firmware information and the identifier of the node to be upgraded to the first storage module in the controller through ethernet, and transmit the firmware data to the second storage module in the controller through ethernet.
Optionally, the device also comprises a display module;
The display module is used for monitoring first progress information of the firmware information, the firmware data and the identification of the node to be upgraded transmitted to the controller, and displaying the first progress information.
The embodiment of the application provides a firmware upgrading device of a node in a controller area network, which is applied to a controller in a firmware upgrading system, wherein the firmware upgrading system comprises an upper computer, the controller and at least one node, the upper computer is in communication connection with the controller through an Ethernet, and the controller is in communication connection with each node through the controller area network, and the device comprises:
the first receiving module is used for receiving firmware information, firmware data and an identifier of a node to be upgraded, which are sent by the upper computer, through the Ethernet, wherein the firmware information comprises firmware length and firmware verification information;
The second transmission module is used for transmitting the firmware information and the firmware data to the node to be upgraded through the controller area network after receiving the prompt information sent by the upper computer according to the identification of the node to be upgraded, so that the node to be upgraded carries out firmware upgrading based on the firmware information and the firmware data, wherein the prompt information is used for prompting the controller to start the upgrading of the node to be upgraded.
The second transmission module is specifically configured to transmit the firmware information to the first storage unit of the node to be upgraded through the controller area network, acquire the storage information of the second storage unit of the node to be upgraded through the controller area network, segment the firmware data according to the storage information of the second storage unit to obtain a plurality of firmware package data, and transmit each firmware package data to the second storage unit in the node to be upgraded through the controller area network.
Optionally, the second transmission module is further configured to monitor second progress information of transmitting the firmware information and the firmware data to the node to be upgraded, and transmit the second progress information to the upper computer through the ethernet, so that the upper computer displays the second progress information.
The embodiment of the application provides a firmware upgrading device of a node in a controller area network, which is applied to a node to be upgraded in a firmware upgrading system, wherein the firmware upgrading system comprises an upper computer, a controller and the node to be upgraded, the upper computer is in communication connection with the controller through an Ethernet, and the controller is in communication connection with the node to be upgraded through the controller area network, and the device comprises:
The second receiving module is used for receiving firmware information and firmware data transmitted by the controller through the controller local area network, wherein the firmware information comprises firmware length and firmware verification information;
the verification module is used for restarting the node to be upgraded after the firmware data is received, reading the firmware data based on the firmware length in the firmware information through the boot loader, and verifying the firmware data according to the firmware verification information in the firmware information;
and the replacing module is used for replacing the original firmware of the node to be upgraded with the firmware data if the verification is passed.
The method comprises the steps of updating a first storage unit of a node to be updated, selecting a verification module, specifically, reading firmware verification information and firmware length in firmware information from a first storage unit of the node to be updated through a boot loader, reading firmware data corresponding to the firmware length from a second storage unit of the node to be updated through the boot loader based on the firmware length in the firmware information, obtaining a first real verification value according to the firmware data, and determining whether the first real verification value is consistent with the firmware verification information in the firmware information through the boot loader.
Optionally, the firmware data comprises a plurality of firmware subcontracting data;
the second receiving module is also used for receiving the firmware information transmitted by the controller through the controller local area network, receiving the firmware sub-check information corresponding to the firmware sub-packet data and the firmware sub-packet data currently transmitted by the controller through the controller local area network, and checking the firmware sub-packet data according to the second real check value obtained by the firmware sub-packet data and the firmware sub-check information corresponding to the firmware sub-packet data.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The modules above may be one or more integrated circuits configured to implement the above methods, such as one or more Application SPECIFIC INTEGRATED Circuits (ASIC), or one or more microprocessors (DIGITAL SIGNAL Processor DSP), or one or more field programmable gate arrays (Field Programmable GATE ARRAY FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 11, where the electronic device may include a processor 1101, a storage medium 1102, and a bus 1103, where the storage medium 1102 stores machine-readable instructions executable by the processor 1101, and when the electronic device is running, the processor 1101 communicates with the storage medium 1102 through the bus 1103, and the processor 1101 executes the machine-readable instructions to perform the steps of the above-described method embodiments. The specific implementation manner and the technical effect are similar, and are not repeated here.
Optionally, the present application further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor performs the steps of the above-described method embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the application. The storage medium includes various media capable of storing program codes, such as a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk or an optical disk.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application. It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (11)

1. The method is applied to an upper computer in a firmware upgrading system, wherein the firmware upgrading system comprises the upper computer, a controller and at least one node, the upper computer is in communication connection with the controller through an Ethernet, and the controller is in communication connection with each node through a controller area network, and the method comprises the following steps:
analyzing the upgrade firmware selected by the user to obtain firmware information and firmware data, wherein the firmware information comprises the model number, the firmware length and the firmware verification information of the node to which the firmware is applied;
Determining nodes to be upgraded according to the firmware information and the model of each node;
transmitting the firmware information, the firmware data and the identification of the node to be upgraded to the controller through the Ethernet;
after the transmission of the firmware information, the firmware data and the identification of the node to be upgraded is completed, sending prompt information to the controller, wherein the prompt information is used for prompting the controller to send the firmware information and the firmware data to the node to be upgraded and starting the upgrade of the node to be upgraded;
The determining the node to be upgraded according to the firmware information and the model of each node includes:
Determining at least one optional node according to the firmware information and the model of each node;
Determining at least one optional node to be selected according to the online information of each optional node reported by the controller;
and responding to the selection operation of the user on the at least one selectable node to be selected, and determining the node to be upgraded.
2. The method of claim 1, wherein the transmitting the firmware information, the firmware data, and the identification of the node to be upgraded to the controller over the ethernet comprises:
Transmitting the firmware information and the identification of the node to be upgraded to a first storage module in the controller through the Ethernet;
And transmitting the firmware data to a second storage module in the controller through Ethernet.
3. The method according to claim 1, wherein the method further comprises:
Monitoring first progress information of the firmware information, the firmware data and the identification of the node to be upgraded transmitted to the controller;
And displaying the first progress information.
4. The method is applied to a controller in a firmware upgrading system, the firmware upgrading system comprises an upper computer, the controller and at least one node, the upper computer is in communication connection with the controller through an Ethernet, and the controller is in communication connection with each node through the controller area network, and the method comprises the following steps:
Receiving firmware information, firmware data and identification of nodes to be upgraded sent by the upper computer through the Ethernet, wherein the firmware information comprises firmware length and firmware verification information, the nodes to be upgraded are determined to be at least one optional node by the upper computer according to the firmware information and the model of each node, the optional node to be selected is determined according to the online information of each optional node reported by the controller, and the node to be upgraded is determined in response to the selection operation of a user on the optional node to be selected;
after receiving the prompt information sent by the upper computer, transmitting the firmware information and the firmware data to the node to be upgraded through the controller local area network according to the identification of the node to be upgraded, so that the node to be upgraded carries out firmware upgrading based on the firmware information and the firmware data, wherein the prompt information is used for prompting the controller to start the upgrading of the node to be upgraded.
5. The method of claim 4, wherein the transmitting the firmware information and the firmware data to the node to be upgraded over the controller area network comprises:
Transmitting the firmware information to a first storage unit of the node to be upgraded through the controller area network;
acquiring storage information of a second storage unit of the node to be upgraded through the controller area network;
dividing the firmware data according to the storage information of the second storage unit to obtain a plurality of firmware package data;
And respectively transmitting each piece of firmware package data to the second storage unit in the node to be upgraded through the controller area network.
6. The method according to claim 4, wherein the method further comprises:
monitoring second progress information of the firmware information and the firmware data transmitted to the node to be upgraded;
and transmitting the second progress information to the upper computer through the Ethernet so that the upper computer displays the second progress information.
7. The method is applied to a node to be upgraded in a firmware upgrading system, the firmware upgrading system comprises an upper computer, a controller and the node to be upgraded, the upper computer is in communication connection with the controller through an Ethernet, the node to be upgraded is determined to be at least one optional node by the upper computer according to the firmware information and the model of each node, at least one optional node to be selected is determined according to the online information of each optional node reported by the controller, the node to be upgraded is determined in response to the selection operation of a user on the at least one optional node to be selected, and the controller is in communication connection with the node to be upgraded through the controller local network, and the method comprises the following steps:
Receiving firmware information and firmware data transmitted by a controller through the controller local area network, wherein the firmware information comprises firmware length and firmware verification information, and the controller sends the firmware information and the firmware data based on prompt information sent by the upper computer and starts the upgrade of the node to be upgraded;
Restarting the node to be upgraded after the firmware data is received, reading the firmware data based on the firmware length in the firmware information through a boot loader, and checking the firmware data according to firmware checking information in the firmware information;
And if the verification is passed, replacing the original firmware of the node to be upgraded with the firmware data.
8. The method of claim 7, wherein the reading, by the bootloader, the firmware data based on the firmware length in the firmware information, and the verifying the firmware data based on firmware verification information in the firmware information, comprises:
Reading firmware verification information and firmware length in the firmware information from a first storage unit of the node to be upgraded through the boot loader;
Reading firmware data corresponding to the firmware length from a second storage unit of the node to be upgraded based on the firmware length in the firmware information through the boot loader, and obtaining a first real verification value according to the firmware data;
and determining whether the first true check value is consistent with firmware check information in the firmware information or not through the boot loader.
9. The method of claim 7, wherein the firmware data comprises a plurality of firmware packetization data, wherein the receiving the firmware information and the firmware data transmitted by the controller over the controller area network comprises:
receiving firmware information transmitted by a controller through the controller local area network;
And receiving firmware package data currently transmitted by a controller through the controller local area network and firmware sub-verification information corresponding to the firmware package data, and verifying the firmware package data according to a second real verification value obtained by the firmware package data and the firmware sub-verification information corresponding to the firmware package data.
10. The device is applied to an upper computer in a firmware upgrading system, wherein the firmware upgrading system comprises the upper computer, a controller and at least one node, the upper computer is in communication connection with the controller through an Ethernet, and the controller is in communication connection with each node through a controller area network, and the device comprises:
The analysis module is used for analyzing the upgrade firmware selected by the user to obtain firmware information and firmware data, wherein the firmware information comprises the model number, the firmware length and the firmware verification information of the node to which the firmware is applied;
The determining module is used for determining the node to be upgraded according to the firmware information and the model of each node;
The transmission module is used for transmitting the firmware information, the firmware data and the identification of the node to be upgraded to the controller through the Ethernet;
the sending module is used for sending prompt information to the controller after the transmission of the firmware information, the firmware data and the identification of the node to be upgraded is completed, wherein the prompt information is used for prompting the controller to send the firmware information and the firmware data to the node to be upgraded and starting the upgrade of the node to be upgraded;
The determining module is specifically configured to:
Determining at least one optional node according to the firmware information and the model of each node;
Determining at least one optional node to be selected according to the online information of each optional node reported by the controller;
and responding to the selection operation of the user on the at least one selectable node to be selected, and determining the node to be upgraded.
11. An electronic device comprising a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor in communication with the storage medium via the bus when the electronic device is in operation, the processor executing the machine-readable instructions to perform the steps of the firmware upgrade method of a node in a controller area network according to any one of claims 1-9.
CN202211193955.4A 2022-09-28 2022-09-28 Firmware upgrade method, device and equipment for nodes in controller area network Active CN115529238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211193955.4A CN115529238B (en) 2022-09-28 2022-09-28 Firmware upgrade method, device and equipment for nodes in controller area network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211193955.4A CN115529238B (en) 2022-09-28 2022-09-28 Firmware upgrade method, device and equipment for nodes in controller area network

Publications (2)

Publication Number Publication Date
CN115529238A CN115529238A (en) 2022-12-27
CN115529238B true CN115529238B (en) 2025-04-08

Family

ID=84699950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211193955.4A Active CN115529238B (en) 2022-09-28 2022-09-28 Firmware upgrade method, device and equipment for nodes in controller area network

Country Status (1)

Country Link
CN (1) CN115529238B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573810A (en) * 2016-03-23 2016-05-11 重庆邮电大学 Remote upgrade method and remote upgrade device for wireless sensor network node

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538517B (en) * 2020-04-24 2023-07-14 苏州浪潮智能科技有限公司 A server firmware upgrade method, system, electronic equipment and storage medium
CN113655737B (en) * 2021-06-29 2023-05-26 北京峰智睿联科技有限公司 Vehicle-mounted electronic controller rapid upgrading system and method transmitted through CAN

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573810A (en) * 2016-03-23 2016-05-11 重庆邮电大学 Remote upgrade method and remote upgrade device for wireless sensor network node

Also Published As

Publication number Publication date
CN115529238A (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN105262627B (en) Firmware upgrading method, device and system
CN112486629B (en) Micro-service state detection method, micro-service state detection device, electronic equipment and storage medium
CN109471653B (en) Application program updating method, electronic device, server and storage medium
CN103530199A (en) Software running error repairing method, device and system
CN113468049B (en) Configurable interface-based test method, device, equipment and medium
EP2437174A1 (en) Method for managing server apparatus and management apparatus thereof
CN113220660A (en) Data migration method, device and equipment and readable storage medium
CN111897846A (en) Cache data verification method, device, equipment and storage medium
CN111433739A (en) Program upgrade method and embedded device
CN107071036A (en) A kind of method, the webserver and system for downloading driving file
CN115529238B (en) Firmware upgrade method, device and equipment for nodes in controller area network
CN116483409A (en) Remote firmware updating method, system, electronic equipment and storage medium
JP2009193358A (en) Information processing device
CN108234216B (en) Method and device for downloading data message
CN104580523A (en) Self-service terminal monitoring data storage method and self-service terminal monitoring server
CN120474912A (en) A CPLD remote online upgrade method, system and electronic device based on SPI communication
CN111385613B (en) Television system repairing method, storage medium and application server
CN116257268B (en) Device upgrading method, device, electronic device and storage medium
US20090083747A1 (en) Method for managing application programs by utilizing redundancy and load balance
CN119484449A (en) Data transmission method, device, monitoring equipment and storage medium
CN119271242A (en) Firmware update method and computing device
CN115118464B (en) Method and device for detecting collapse host, electronic equipment and storage medium
CN114185804B (en) Interface testing method and device and terminal equipment
CN102457394B (en) Management method of server device and management device thereof
CN116909599A (en) Method, device, equipment and storage medium for upgrading engine offline software

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
GR01 Patent grant
GR01 Patent grant