CN110187906B - Method for updating firmware of embedded equipment under multilayer heterogeneous network - Google Patents

Method for updating firmware of embedded equipment under multilayer heterogeneous network Download PDF

Info

Publication number
CN110187906B
CN110187906B CN201910408588.7A CN201910408588A CN110187906B CN 110187906 B CN110187906 B CN 110187906B CN 201910408588 A CN201910408588 A CN 201910408588A CN 110187906 B CN110187906 B CN 110187906B
Authority
CN
China
Prior art keywords
layer
equipment
program
data
json
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
CN201910408588.7A
Other languages
Chinese (zh)
Other versions
CN110187906A (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.)
Tiandi Changzhou Automation Co Ltd
Changzhou Research Institute of China Coal Technology and Engineering Group Corp
Original Assignee
Tiandi Changzhou Automation Co Ltd
Changzhou Research Institute of China Coal Technology and Engineering Group Corp
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 Tiandi Changzhou Automation Co Ltd, Changzhou Research Institute of China Coal Technology and Engineering Group Corp filed Critical Tiandi Changzhou Automation Co Ltd
Priority to CN201910408588.7A priority Critical patent/CN110187906B/en
Publication of CN110187906A publication Critical patent/CN110187906A/en
Application granted granted Critical
Publication of CN110187906B publication Critical patent/CN110187906B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method for updating firmware of embedded equipment under a multilayer heterogeneous network, under the stimulation of client software, all equipment in the network can generate JSON routing information data, the N-th layer equipment routing information is uploaded to an N-1-th layer through a bus, after the N-1-th layer equipment is completely received, the self attribute and the link relation between the self attribute and the N-th layer are added and then transmitted to an N-2-th layer, finally, the self attribute is collected to the first layer equipment and transmitted to a remote host for analysis, when the firmware is updated, according to target equipment selected by a user, the remote host can generate a target route and transmits the target route along with a program file, and after the route is analyzed by each layer of equipment, the target equipment is forwarded, and finally, the program file is transmitted to the target equipment. The invention uses JSON to describe the device route, combines IAP technology, and the remote host can update any device firmware in a multilayer heterogeneous network, thereby greatly reducing the engineering maintenance cost.

Description

Method for updating firmware of embedded equipment under multi-layer heterogeneous network
The technical field is as follows:
the invention relates to the technical field of embedded systems, in particular to a method for updating firmware of embedded equipment under a multilayer heterogeneous network.
The background art comprises the following steps:
currently, there are three common methods for updating firmware of embedded devices: firstly, programming a JTAG/SWD interface; programming an ISP interface; and thirdly, updating the firmware remotely by using bus communication and IAP technology. The firmware can be updated by all three methods, but the emphasis is different: JTAG/SWD is used for downloading and debugging in the program development stage; the ISP is mainly used for firmware programming during batch production; remote bus firmware updates are mostly used for product field maintenance.
(1) No matter JTAG/SWD or ISP interfaces need auxiliary tools (such as a PC (personal computer) and a J-link) and a product shell needs to be disassembled (such interfaces are not led out generally), the operations are forbidden in some industrial occasions, such as flammable and explosive places such as underground coal mines, chemical engineering and the like, one non-intrinsic safety or explosion-proof equipment is forbidden to enter the places, and explosion-proof products in the two places are forbidden to open a cover. Both of these interface applications are very limited.
(2) The remote firmware updating is carried out by utilizing bus communication and IAP technology, so that the product maintenance cost is reduced to a certain degree, and the method can be applied to various industrial occasions. However, research finds that most applications are limited to single link (ethernet/RS 485/CAN, etc.) and single-layer network topologies, and before updating, the device to be upgraded needs to be disconnected from the communication network and connected to auxiliary equipment for firmware updating. This requires that the engineer must be in the field and that the equipment is likely to be offline for a long period of time. Long periods of time off-line of the equipment are not allowed in some systems (coal mine safety monitoring systems). Remote firmware updates under single-link, single-tier network topologies do not solve all the problems.
The invention content is as follows:
the invention aims to provide a method for updating firmware of embedded equipment in a multilayer heterogeneous network, which uses JSON to describe equipment routing, combines the prior art, and can update the firmware of any equipment in the multilayer network and various links (hereinafter referred to as the multilayer heterogeneous network) by a remote host, thereby greatly reducing the engineering maintenance cost.
The key for realizing the upgrade of the multilayer heterogeneous network is to realize the route description, and the core of the route description is hierarchical relationship description. Some lightweight data exchange formats, such as XML, JSON, inherently have the advantage of describing hierarchical relationships. The present invention utilizes JSON to describe device routing information.
The multilayer heterogeneous network needs to acquire a network topology, and a program file route is established on the basis of the network topology. From the perspective of a user, all devices in the network need to be visually obtained, and then an upgrade object is selected; from the system operation perspective, all devices in the system need to make explicit the object of the program file when acting as a repeater, and further plan the forwarding action.
In order to achieve the purpose, the invention provides a method for updating firmware of embedded equipment under a multilayer heterogeneous network, under the stimulation of client software, all equipment in the network can generate JSON routing information data, the N-th layer equipment routing information is uploaded to an N-1-th layer through a bus, after the N-1-th layer equipment is completely received, self attributes and the link relation between the self attributes and the N-th layer are added and then transmitted to an N-2-th layer, and finally collected to first-layer equipment and transmitted to a remote host for analysis, when the firmware is updated, the remote host can generate a target route and sends the target route along with a program file according to target equipment selected by a user, and each layer of equipment analyzes the route and then forwards the route, and finally sends the program file to the target equipment.
Specifically, the method for updating the firmware of the embedded device in the multi-layer heterogeneous network specifically comprises the following steps:
(1) collecting JSON routing information data of the Nth layer of equipment on the Nth-1 layer of equipment;
(2) the N-1 layer is transmitted to the N-2 layer, and the attribute description and the link relation between the attribute description and the N layer are added;
(3) finally, the first-layer equipment transmits the gathered JSON routing information data to the remote host;
(4) the remote host analyzes the routing data and draws a network topology;
(5) a user selects equipment needing firmware updating according to network topology;
(6) the remote host generates the route description JSON data of the target equipment according to the selection of the user, and issues the JSON data and the program file to the first layer of equipment together;
(7) after the first layer device judges the route, the route information is updated, the data is sent to the second layer device and is transmitted layer by layer, the N-1 layer device analyzes the route and judges that the device under the bus port needs to be updated, and the N-1 layer device starts the bus forwarding program data.
The embedded device is provided with a Bootloader program, after the remote host is electrified, the Bootloader program is firstly operated, the Bootloader verifies the application program, and after the verification is passed, an interrupt vector is set, the application program is skipped, and the application program is executed; if the verification is not passed, the Bootloader monitors the communication bus, sorts the program data packets, programs the application program to the designated Flash sector after the program data is received, and then tries to jump and execute the application program again.
In addition, the embedded device is also provided with a Probe program, the Probe program is used for monitoring a bus and sorting program data packets, after program data are received completely, the program data are jumped to a Bootloader, and the Bootloader programs a new application program to a specified Flash sector, so that program updating is realized.
The method for updating the firmware of the embedded equipment under the multilayer heterogeneous network has the following positive effects:
(1) remote firmware updating of embedded equipment under a multi-layer heterogeneous network is realized, compared with the prior art, the embedded equipment does not need to go deep into the field, maintenance workload is reduced, similar equipment of the whole network can be updated simultaneously, and working efficiency is improved;
(2) the firmware updating auxiliary equipment does not need to enter an industrial field and has no application occasion limitation;
(3) network topology information can be generated, an equipment tree is formed, the firmware updating progress and state are fed back, and the identification degree of firmware updating is improved;
(4) the equipment to be updated does not need to be disconnected from the original network, and the normal communication of the equipment is not influenced in the updating process;
(5) the protocol is flexible, and no limitation is caused by network level and link form.
Description of the drawings:
FIG. 1 is a flowchart of a firmware update method for an embedded device in a multi-layer heterogeneous network according to the present invention;
FIG. 2 is a diagram of an embedded software structure of the firmware updating method for embedded devices in a multi-layer heterogeneous network according to the present invention;
FIG. 3 is a schematic diagram of a routing JSON key value of the present invention;
fig. 4 is a schematic diagram of a JSON key of the program file according to the present invention.
The specific implementation mode is as follows:
the following detailed description of the preferred embodiments of the present invention, taken in conjunction with the accompanying drawings, will make the advantages and features of the invention more readily understood by those skilled in the art, and thus will more clearly and distinctly define the scope of the invention.
The network form to which the invention is applied is not limited to the network level and the Link form, but for the purpose of explaining the process, a network topology of a three-layer network is drawn briefly, as shown in fig. 1, wherein L1-D1 represents a device with an ID of 1 on the first-layer network, Link1 represents Link form 1, and commonly used links include ethernet, RS485, CAN and the like. Under the stimulation of client software, all devices in the network can generate JSON routing information data, the JSON routing information data is transmitted to upper-layer devices through buses, after the upper-layer devices receive the JSON routing information data completely, the JSON routing information data is added with self attributes and link relations, then the JSON routing information data is transmitted to the upper layer, and finally the JSON routing information data is collected and transmitted to the client software for analysis by the first-layer devices. The JSON object contains key values of a device address, a device type, a software/hardware version number, an upgrade progress, a port, and the like, as shown in fig. 3, where the port is used to extend a subordinate device. The step I is the summary of JSON data of third-layer equipment L3-D1, L3-D2 and L3-D3 in second-layer equipment L2-Dn; step two, JSON data transmitted from the two-layer device L2-Dn to the one-layer device L1-Dn is added with self attribute description and the link relation between L3-Dx and L2-Dn; step three is JSON data transmitted to the remote host by L1-Dn. And analyzing the routing data by the client software to draw the network topology under the L1-Dn equipment, namely the step IV.
The user selects the device which needs to update the firmware according to the network topology, the client software generates program file routing description JSON data according to the user selection, and the JSON data not only contains necessary routing and enabling information, but also contains some key fields for describing the program, such as program name, length, verification, version and the like, as shown in FIG. 4. The JSON packet is issued together with the program data, each level of equipment in the network analyzes JSON after receiving the JSON packet, a route is judged, and if the program does not belong to the local machine, a starting bus is forwarded. In FIG. 1, step five, the user selects two three-layer devices L2-Dn under L1-Dn for upgrade; step six, the client software simultaneously issues the JSON and the program data to L1-Dn; in the step (c), after the L1-Dn equipment judges the route, the route information is updated, and the data is sent to the L2-Dn; the L2-Dn analyzes the route to judge that two devices under the Link3 need to be updated, and the L2-Dn starts the Link3 Link to forward program data.
The structure of the embedded device software with multi-layer heterogeneous network firmware updating function is shown in fig. 2. After the MCU is powered on, the Bootloader program is firstly operated. The Bootloader checks the application program, sets an interrupt vector after the application program passes the check, and skips and executes the application program; if the verification is not passed, the Bootloader monitors the communication bus, sorts the program data packets, programs the application program to the designated Flash sector after the program data is received, and then tries to jump and execute the application program again. The Probe program is the key to realizing the multi-layer heterogeneous network firmware update. The remote firmware updating work flow of the single-machine product comprises the following steps: and embedding the Probe program into a user program to monitor a bus and sort program data packets, after receiving the program data, skipping to a Bootloader, and programming a new application program to a specified Flash sector by the Bootloader to further realize program updating. In a multi-layer network, a Probe program needs to analyze routing information of program data besides completing the above functions, and when the program data is judged not to belong to the local computer, a bus needs to be started according to the routing description, and the routing information and the program data need to be forwarded.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (1)

1. A method for updating firmware of embedded equipment under a multilayer heterogeneous network is characterized by comprising the following steps:
(1) under the stimulation of client software, all equipment in the network can generate JSON routing information data, and the N-th layer of equipment routing information is uploaded to an N-1 layer through a bus;
(2) the N-1 layer is transmitted to the N-2 layer, and self attribute description and the link relation between the self attribute description and the N layer are added;
(3) finally, the first-layer equipment transmits the summarized JSON routing information data to a remote host for analysis;
(4) the remote host analyzes the routing data and draws a network topology;
(5) a user selects equipment needing firmware updating according to network topology;
(6) the remote host generates the JSON data of the routing description of the target equipment according to the selection of the user and sends the JSON data and the program file to the first layer of equipment together;
(7) after the first layer equipment judges the route, updating the route information, sending the data to the second layer equipment for layer-by-layer transmission, analyzing the route by the N-1 layer equipment to judge the equipment under the bus port of the equipment to be updated, and starting bus forwarding program data by the N-1 layer equipment;
the embedded device is provided with a Bootloader program, after the remote host is electrified, the Bootloader program is firstly operated, the Bootloader verifies the application program, and after the verification is passed, an interrupt vector is set, the application program is skipped, and the application program is executed; if the verification fails, the Bootloader monitors the communication bus, sorts the program data packets, programs the application program to the designated Flash sector after the program data is received, and then tries to jump and execute the application program again; the embedded device is provided with a Probe program, the Probe program is used for monitoring a bus and sorting program data packets, after program data are received completely, the Bootloader is skipped, a new application program is programmed to a specified Flash sector by the Bootloader, and then program updating is achieved.
CN201910408588.7A 2019-05-16 2019-05-16 Method for updating firmware of embedded equipment under multilayer heterogeneous network Active CN110187906B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910408588.7A CN110187906B (en) 2019-05-16 2019-05-16 Method for updating firmware of embedded equipment under multilayer heterogeneous network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910408588.7A CN110187906B (en) 2019-05-16 2019-05-16 Method for updating firmware of embedded equipment under multilayer heterogeneous network

Publications (2)

Publication Number Publication Date
CN110187906A CN110187906A (en) 2019-08-30
CN110187906B true CN110187906B (en) 2022-07-15

Family

ID=67716567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910408588.7A Active CN110187906B (en) 2019-05-16 2019-05-16 Method for updating firmware of embedded equipment under multilayer heterogeneous network

Country Status (1)

Country Link
CN (1) CN110187906B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966595B (en) * 2020-08-13 2024-04-05 安徽芯纪元科技有限公司 Method for positioning core in software debugging system and method for transmitting debugging message
CN113590152A (en) * 2021-07-23 2021-11-02 深圳市朗驰欣创科技股份有限公司 Equipment upgrading method and system, embedded equipment, upper computer and storage medium
CN116149713B (en) * 2023-04-19 2023-12-15 广州擎天实业有限公司 Program upgrading method and device for all-level equipment under tree-type heterogeneous network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107078956A (en) * 2014-12-11 2017-08-18 博科通迅系统有限公司 Multilayer distributed router architecture
CN107465539A (en) * 2017-07-25 2017-12-12 北京康得新创科技股份有限公司 The upgrade-system of the upgrade method of firmware, terminal and firmware
CN108923976A (en) * 2018-06-28 2018-11-30 中国人民解放军63698部队 Space communication private network lightweight network operation management system
CN109144551A (en) * 2018-09-05 2019-01-04 杭州和利时自动化有限公司 Equipment firmware update and system under a kind of multi-layer networking mode

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11082294B2 (en) * 2017-08-15 2021-08-03 Mueller International, Llc Broadcast remote firmware update

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107078956A (en) * 2014-12-11 2017-08-18 博科通迅系统有限公司 Multilayer distributed router architecture
CN107465539A (en) * 2017-07-25 2017-12-12 北京康得新创科技股份有限公司 The upgrade-system of the upgrade method of firmware, terminal and firmware
CN108923976A (en) * 2018-06-28 2018-11-30 中国人民解放军63698部队 Space communication private network lightweight network operation management system
CN109144551A (en) * 2018-09-05 2019-01-04 杭州和利时自动化有限公司 Equipment firmware update and system under a kind of multi-layer networking mode

Also Published As

Publication number Publication date
CN110187906A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN110187906B (en) Method for updating firmware of embedded equipment under multilayer heterogeneous network
CN110308753B (en) Intelligent agricultural robot cloud control system and method
Jain et al. Cloud to edge: distributed deployment of process-aware IoT applications
CN104407977B (en) Based on the automatization uniting and adjustment testing method of the task system stage by stage of model inspection
US8321037B2 (en) PLC distributed control system
JP2003514276A (en) How to isolate faults from error messages
CN110099098A (en) Industrial robot data uploading method, system, readable storage medium storing program for executing and equipment
CN103984323A (en) Integrated configurable industrial information monitoring, analyzing and controlling system
CN112130812B (en) Analysis model construction method and system based on data stream mixed arrangement
US10908627B2 (en) Edge analytics control devices and methods
CN114398115A (en) Visual pipeline generation method and device, storage medium and electronic equipment
CN108490897A (en) A kind of automatic control system of fully-mechanized mining working
CN108600357A (en) A kind of foster management system of oil and gas equipment dimension and working method based on SOA
CN103825893A (en) Method, device and system for collecting information
CN108121221A (en) A kind of robotic command interface control system and method
Gong et al. The Data Acquisition and Control System Based on IoT-CAN Bus.
CN110933952B (en) Method for semantic search and rules for distributed data systems
CN205596147U (en) WirelessHART adapter, network node and network
CN101951407B (en) Teletransmission type intelligent bus communicator
JP2000010805A (en) Routing method for console message, and console system
CN112003753B (en) Expected value judgment, acquisition, transmission and monitoring system and method based on configurable gateway
CN116962425B (en) Controller virtualization control system, method and storage medium
CN113535156B (en) Graphical programming method and platform of logistics transportation control system
CN217425956U (en) High-speed fan remote monitering system based on 4G internet of things
CN118095786A (en) Reconstruction method and system for digital assembly production line of airplane

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