IO module firmware upgrade method, device, equipment and readable storage medium
Through the EtherCAT master station, the firmware upgrade of IO modules is solved, and the complexity and low efficiency of IO module upgrades in the existing technology are achieved without disassembly and remote upgrades and support for multiple upgrade scenarios, which improves the convenience of upgrades and efficiency.
Patent Information
- Application Number
- CN202411480679.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The existing IO module firmware upgrade solution relies on the traditional SWD or JTAG protocols, and requires disassembly of modules and using debugging tools, resulting in complex operations and high time costs, which cannot meet the needs of batch or specified module upgrades, and lacks flexibility and convenience.
The EtherCAT master site uses the FOE protocol to upgrade firmware without disassembling modules, supports multiple upgrade scenarios, parsing verification code instructions and firmware packages, matching target IO modules, and performing remote firmware upgrades.
It greatly improves the convenience and efficiency of firmware upgrade of IO modules, supports batch and designated module upgrades, meets the needs of different scenarios, and realizes disassembly-free remote upgrade.
Smart Images

Figure CN119011329B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of system upgrades, and more specifically, to an IO module firmware upgrade method, apparatus, device, and readable storage medium. Background Art
[0002] With the development of industrial automation and IoT technology, the demand for IO modules in industrial automation systems is increasing. These IO modules communicate with the system master through different buses (such as EtherCAT, RS485, etc.) to achieve data input and output. However, in the mass production of IO modules, product iterations, and different scenarios on user sites, firmware upgrades have become an important and frequent demand. The current status of different bus expansion IO modules and their firmware upgrades is discussed.
[0003] Most of the IO module firmware upgrade solutions on the market currently rely on traditional SWD (Serial Wire Debug) or JTAG (Joint Test Action Group) protocols, which require additional debugging tools and steps, such as disassembling modules and connecting debuggers, which not only affects the normal operation of the system, increases the complexity and time cost of operations, but also reduces the efficiency of upgrades. In addition, the existing upgrade solutions cannot meet the needs of batch upgrades or specified module upgrades, lack flexibility and convenience, and cannot meet the different scene requirements of users on site.
[0004] Based on this, the present application provides an IO module firmware upgrade solution that does not require module disassembly and supports multiple upgrade scenarios, greatly improving the convenience and efficiency of IO module firmware upgrades. Summary of the invention
[0005] In view of this, the present application provides an IO module firmware upgrade method, device, equipment and readable storage medium, which uses the FOE protocol through the EtherCAT master station to perform firmware upgrades without disassembling the module, supports multiple upgrade scenarios, and greatly improves the convenience and efficiency of IO module firmware upgrades.
[0006] A method for upgrading IO module firmware, comprising:
[0007] Receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, wherein the firmware upgrade request includes a firmware upgrade file name and a verification code instruction;
[0008] Parsing the verification code instruction, and sending firmware verification code information to the parsed designated site number;
[0009] Receive a firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station, and generate a plurality of firmware packages and FOE password instructions for the firmware upgrade file package;
[0010] Parse the encryption header and the FOE password instruction of each firmware package, and determine each target IO module of each IO module of the EtherCAT slave station that matches the parsed verification code and meets the parsed upgrade firmware attribute requirements and the upgrade firmware information;
[0011] The firmware packages are respectively sent to the corresponding target IO modules, so as to perform firmware upgrade on the target IO modules based on the upgrade firmware information in the firmware packages.
[0012] Optionally, parsing the encrypted header and the FOE password instruction of each firmware package, determining each IO module of the EtherCAT slave station that matches the parsed verification code and meets the parsed upgrade firmware attribute requirements and the upgrade firmware information, including:
[0013] Parsing the encrypted header of each of the firmware packages, and performing configuration matching detection on the EtherCAT slave station according to the upgraded firmware attribute requirements and the verification code obtained by the parsing, to determine each IO module to be upgraded that meets the upgraded firmware attribute requirements and matches the parsed verification code among the IO modules of the EtherCAT slave station;
[0014] The FOE password instruction is parsed, and site polling detection is performed on each IO module to be upgraded according to the designated site number information obtained by the parsing, so as to determine each target IO module in the IO modules to be upgraded that meets the designated site number information.
[0015] Optionally, the encrypted header of each firmware package is parsed, and the EtherCAT slave is configured to be matched according to the upgraded firmware attribute requirements and the verification code obtained by the parsing, to determine each IO module to be upgraded that meets the upgraded firmware attribute requirements and matches the verification code obtained by the parsing, including:
[0016] Parsing the encrypted header of each firmware package to obtain the upgrade-specified hardware version, upgrade-specified module type and verification code;
[0017] Polling is performed to detect whether there are IO modules in the EtherCAT slave station configuration that meet the upgrade specified hardware version and the upgrade specified module type and match the parsed verification code, and each IO module that meets the requirements is determined as each IO module to be upgraded.
[0018] Optionally, also include:
[0019] The mismatch information or error information generated by the configuration matching detection and the site polling detection is collected, integrated into an upgrade error report and sent to the EtherCAT master station.
[0020] Optionally, parsing the FOE password instruction, and performing site polling detection on each IO module to be upgraded according to the designated site number information obtained by the parsing, and determining each target IO module in the IO modules to be upgraded that meets the designated site number information, includes:
[0021] Parsing the FOE password instruction;
[0022] If the parsed designated site number information represents a unique site, the site numbers of the IO modules to be upgraded are detected by polling, and the IO modules corresponding to the site numbers recorded in the designated site number information are determined as target IO modules;
[0023] If the parsed designated site number information represents a site module type, the module type of each IO module to be upgraded is detected by polling, and each IO module belonging to the site module type recorded in the designated site number information is determined as each target IO module.
[0024] Optionally, after sending each of the firmware packages to the corresponding target IO modules respectively, the method further includes:
[0025] Send a FOE response request to the EtherCAT master.
[0026] An IO module firmware upgrade device, comprising:
[0027] A request receiving unit, used to receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, wherein the firmware upgrade request includes a firmware upgrade file name and a verification code instruction;
[0028] An instruction parsing unit, used for parsing the verification code instruction and sending firmware verification code information to the designated site number obtained by the parsing;
[0029] A file receiving unit is used to receive a firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station, and generate a plurality of firmware packages and FOE password instructions for the firmware upgrade file package;
[0030] A file parsing unit, used for parsing the encrypted header of each firmware package and the FOE password instruction, and determining each target IO module in each IO module of the EtherCAT slave station that matches the parsed verification code and meets the parsed upgrade firmware attribute requirements and the upgrade firmware information;
[0031] The distribution upgrade unit is used to send each of the firmware packages to the corresponding target IO modules respectively, so as to perform firmware upgrade on each of the target IO modules based on the upgrade firmware information in the firmware package.
[0032] Optionally, the file parsing unit includes:
[0033] An encryption header parsing unit, used to parse the encryption header of each of the firmware packages, and perform configuration matching detection on the EtherCAT slave station according to the upgraded firmware attribute requirements and the verification code obtained by the parsing, to determine each IO module to be upgraded that meets the upgraded firmware attribute requirements and matches the verification code obtained by the parsing among the IO modules of the EtherCAT slave station;
[0034] The FOE parsing unit is used to parse the FOE password instruction, and perform site polling detection on each IO module to be upgraded according to the designated site number information obtained by the parsing, and determine each target IO module in the IO modules to be upgraded that meets the designated site number information.
[0035] An IO module firmware upgrade device, comprising a memory and a processor;
[0036] The memory is used to store programs;
[0037] The processor is used to execute the program to implement each step of the IO module firmware upgrade method as described in any one of the above items.
[0038] A readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, each step of the IO module firmware upgrade method as described in any one of the above items is implemented.
[0039] It can be seen from the above technical solution that an IO module firmware upgrade method, device, equipment and readable storage medium provided in the embodiment of the present application first receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, and the firmware upgrade request includes a firmware upgrade file name and a verification code instruction. After that, the verification code instruction is parsed, and the firmware verification code information is sent to the designated site number obtained by the parsing. Subsequently, the firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station is received, and several firmware packages and FOE password instructions are generated for the firmware upgrade file package. The encryption header and the FOE password instruction of each firmware package are parsed to determine the target IO modules in each IO module of the EtherCAT slave station that match the parsed verification code and meet the parsed upgrade firmware attribute requirements and the upgrade firmware information. Finally, each of the firmware packages is sent to the corresponding target IO modules respectively, so as to perform firmware upgrade on each target IO module based on the upgrade firmware information in the firmware package.
[0040] This application receives the firmware upgrade file sent by the EtherCAT master station, and generates several firmware packages and FOE password instructions for the firmware upgrade file package. Then, the encryption header and FOE password instructions of each firmware package are parsed to determine the target IO modules in each IO module of the EtherCAT slave station that match the parsed inspection code and meet the parsed upgrade firmware attribute requirements and upgrade firmware information. Finally, each firmware package is sent to each corresponding target IO module to perform firmware upgrade on each target IO module. In this process, remote firmware upgrade can be achieved without disassembling the IO module, which greatly improves the convenience and efficiency of IO module firmware upgrade. In addition, this application also supports a variety of upgrade scenarios, which can not only realize batch upgrades of modules of the same type, but also specify a module type for upgrade when there are different types of modules in the configuration, and specify the site number for firmware upgrade, meeting the different scene requirements of the user site. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0042] Figure 1 A schematic diagram of an application system framework disclosed in an embodiment of the present application;
[0043] Figure 2 A schematic diagram of a FOE protocol file transmission disclosed in an embodiment of the present application;
[0044] Figure 3 A flowchart of an IO module firmware upgrade method disclosed in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of an IO module firmware upgrade device disclosed in an embodiment of the present application;
[0046] Figure 5 This is a hardware structure block diagram of an IO module firmware upgrade device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] Before introducing the present application, the application scenario of the present application is first introduced.
[0049] Figure 1 A schematic diagram of an application system framework disclosed in an embodiment of the present application.
[0050] This application can be applied to Figure 1 In the system shown, the system framework is mainly composed of EtherCAT master and EtherCAT slave. Among them, the EtherCAT master is the control core of the system, which is responsible for sending commands and receiving data from the slave. The EtherCAT master can be a variety of devices, including but not limited to a general PLC (programmable logic controller) that supports the EtherCAT master and a PC host computer with the EtherCAT master installed. The EtherCAT slave is the execution unit in the system, which is responsible for receiving the command of the master and performing the corresponding operation, and at the same time feeding back the operation results or status data to the master. The EtherCAT slave can be a variety of devices, but in this application, it specifically refers to the EtherCAT coupler, which supports the mounting of IO modules based on the 485 bus protocol extension. The IO module is a device used in the slave for input and output signals. They can be mounted on the coupler as needed. The IO module supports the 485 bus protocol and can communicate with the coupler through the RS485 interface.
[0051] Figure 2 This is a schematic diagram of a FOE protocol file transmission disclosed in an embodiment of the present application. Figure 2 As shown in the figure, the steps of the FOE (File Access over EtherCAT) communication process in the EtherCAT network include:
[0052] 1. FOE write request: It starts from the EtherCAT master station, which sends a message called "FOE write request" to the EtherCAT slave station. This request contains the password for verification and the file name to be written. The arrow indicates that the message flows from the master station to the slave station.
[0053] 2. FOE response request (PacketNo=0): After receiving the "FOE write request", the slave will send a message called "FOE response request" to the master as a response. This response message contains a sequence number (PacketNo), the initial value of which is 0. The arrow indicates that the message flows from the slave to the master.
[0054] 3. FOE Response (PacketNo=0): After the master receives the "FOE Response Request (PacketNo=0)" from the slave, it sends a message called "FOE Response" as confirmation. The sequence number in this confirmation message matches the request sequence number of the slave, which is also 0. The arrow indicates that the message flows from the master to the slave.
[0055] 4. FOE data write request (PacketNo=1): After confirming that the communication is established, the slave will send a message called "FOE data write request" to the master. This message contains the data to be written, and the sequence number is incremented to 1. If this is the last data packet, it will be specially marked as "last data". The arrow indicates that the message flows from the slave to the master.
[0056] 5. FOE write data service (PacketNo=1): After the master receives the "FOE data write request (PacketNo=1)", it processes the data and sends a message called "FOE write data service" as a response. The sequence number in this response message matches the request sequence number of the slave, which is also 1. The arrow indicates that the message flows from the master to the slave.
[0057] 6. For subsequent data packets, repeat steps 4 and 5: If there is more data to be written, the slave will continue to send "FOE data write request" messages with the sequence number incremented. The master will send a "FOE write data service" message in response accordingly. This process will be repeated until all data has been sent and confirmed.
[0058] 7. FOE reply request (PacketNo=n, last data): When all data has been sent, the slave will send a message called "FOE reply request" as a sign of completion. The sequence number in this message will be the sequence number of the last data packet (e.g. n), and will be specially marked as "last data". The arrow indicates that the message flows from the slave to the master.
[0059] 8. FOE Response (PacketNo=n): After the master receives the "FOE Response Request (PacketNo=n, last data)", it will send a message called "FOE Response" as the final confirmation. The sequence number in this confirmation message matches the request sequence number of the slave, which is also n. This marks the end of the entire FOE write process.
[0060] An embodiment of the present application provides an IO module firmware upgrade method, which can be applied to the control system or processor of an EtherCAT slave station, and can also be applied to various computer terminals or smart terminals. The execution subject can be the processor or server of the computer terminal or smart terminal.
[0061] Next, the present application scheme is introduced. The present application proposes the following technical scheme, please see below for details.
[0062] Figure 3 This is a flowchart of an IO module firmware upgrade method disclosed in an embodiment of the present application.
[0063] like Figure 3 As shown, the method may include:
[0064] Step S1, receiving a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, wherein the firmware upgrade request includes a firmware upgrade file name and a verification code instruction.
[0065] Step S2: parsing the verification code instruction, and sending firmware verification code information to the designated site number obtained by parsing.
[0066] Specifically, the EtherCAT slave receives a firmware upgrade request sent by the EtherCAT master using the FOE protocol. This request not only contains the name of the firmware file to be upgraded, but also comes with a verification code instruction for verifying the integrity of the firmware. The verification code instruction is usually a digital signature or checksum value that ensures that the slave can verify that it has not been tampered with or damaged before receiving and preparing to apply the firmware file. The EtherCAT slave will then parse the verification code instruction and determine the designated site number that needs to be upgraded based on the parsing result. Subsequently, the slave may send firmware verification code information to the relevant site as a basis for subsequent determination of the upgrade module and verification of the integrity of the firmware upgrade file. This step depends on the specific firmware upgrade process and protocol implementation. The specific operation may vary depending on the system design and protocol implementation. In some cases, the slave may directly use the received verification code to verify the integrity of the firmware file without sending information to other sites. This application should not be limited to the above method, but its core purpose is to ensure the accuracy and reliability of the firmware upgrade process.
[0067] Step S3, receiving a firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station, and generating a plurality of firmware packages and FOE password instructions for the firmware upgrade file package.
[0068] Specifically, the user sets the EtherCAT bus state to the bootstrap state machine and prepares to send the firmware file to the slave. In this process, the user transfers the firmware file to the master, which then uses the FOE (File Operations over EtherCAT) protocol to send the file to the EtherCAT slave coupler. After receiving the firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master, the coupler will unpack the firmware upgrade file and generate several firmware packages and FOE password instructions.
[0069] Step S4, parsing the encryption header and the FOE password instruction of each firmware package, determining each IO module of the EtherCAT slave station that matches the parsed verification code and meets the parsed upgrade firmware attribute requirements and the target IO modules of the upgrade firmware information.
[0070] Specifically, the purpose of this step is to accurately identify those IO modules in the EtherCAT slave that match the parsed verification code and meet the upgrade firmware attribute requirements and upgrade firmware information. Specifically, the system will first parse the encrypted header of the firmware package to extract key upgrade information, such as the applicable hardware version, module type, and verification code for integrity verification. Subsequently, this information will be used to compare the IO modules of the EtherCAT slave one by one to screen out those IO modules to be upgraded that meet the upgrade conditions and match the verification code. Next, the system will also parse the FOE password instruction to obtain key information such as the specified site number contained therein, and perform further site verification on the screened IO modules to be upgraded based on this, and finally determine the true target IO module. This process ensures the accuracy and efficiency of the firmware upgrade and avoids unnecessary waste of resources. It is divided into the following two steps:
[0071] Step S41, parsing the encrypted header of each of the firmware packages, and performing configuration matching detection on the EtherCAT slave station according to the upgraded firmware attribute requirements and the verification code obtained by the parsing, to determine the IO modules to be upgraded among the IO modules of the EtherCAT slave station that meet the upgraded firmware attribute requirements and match the verification code obtained by the parsing.
[0072] Further, step S41 includes:
[0073] ① Parse the encrypted header of each firmware package to obtain the upgrade-specified hardware version, upgrade-specified module type and verification code;
[0074] ② Polling to detect whether there are IO modules in the EtherCAT slave configuration that meet the upgrade specified hardware version and the upgrade specified module type and match the parsed verification code, and determine the IO modules that meet the requirements as the IO modules to be upgraded.
[0075] The system first starts to parse the encrypted header of each firmware package, as shown in Table 1, which contains the attribute requirements of the upgraded firmware, including but not limited to the supported hardware version, module type and other key information, and also extracts a check code for verifying the integrity of the firmware. Then, the system will use this parsed information to compare and configure each IO module in the EtherCAT slave station one by one, and find the IO module to be upgraded that meets the upgrade firmware attribute requirements and fully matches the parsed check code.
[0076]
[0077] Step S42, parsing the FOE password instruction, and performing site polling detection on the IO modules to be upgraded according to the designated site number information obtained by the parsing, to determine the target IO modules in the IO modules to be upgraded that meet the designated site number information.
[0078] Further, step S42 includes:
[0079] ① Parsing the FOE password instruction;
[0080] ② If the parsed designated site number information represents a unique site, the site numbers of the IO modules to be upgraded are detected by polling, and the IO modules corresponding to the site numbers recorded in the designated site number information are determined as the target IO modules;
[0081] ③ If the parsed designated site number information represents the site module type, the module type of each IO module to be upgraded is detected by polling, and each IO module belonging to the site module type recorded in the designated site number information is determined as each target IO module.
[0082] The system parses the FOE password instruction to obtain key information such as the designated site number contained therein, and performs further site verification on the selected IO modules to be upgraded based on this information. The system will perform site polling detection on the IO modules to be upgraded based on the designated site number information obtained through the analysis. As shown in Table 2, if the parsed designated site number information points to a unique site, the system will compare the site numbers of each IO module to be upgraded one by one to ensure that only those IO modules that completely match the designated site number will be determined as the target IO modules. If the parsed designated site number information represents a certain type of site module, the system will detect the module type of each IO module to be upgraded, and filter out those IO modules that meet the specified site module type as the target IO modules. Through this step, the system can ensure the accuracy of the firmware upgrade and avoid incorrectly applying the firmware to IO modules that do not need to be upgraded, thereby ensuring the stability and reliability of the entire EtherCAT network.
[0083]
[0084] Step S5: Send each of the firmware packages to the corresponding target IO modules respectively, so as to upgrade the firmware of each of the target IO modules based on the upgraded firmware information in the firmware package.
[0085] Specifically, each firmware package is sent to each corresponding target IO module to perform a firmware upgrade on each target IO module, that is, to upgrade a single site or a site of the same module type. At this time, according to the upgrade requirements parsed in the above steps, batch upgrades of modules of the same type can be achieved, and when there are different types of modules in the configuration, a module type can be specified for upgrade, and a site number can be specified for firmware upgrade, meeting the different scene requirements of the user site.
[0086] according to Figure 2 As shown in the schematic diagram of the FOE protocol transmission file, it can be understood that in the present application, after each of the firmware packages is sent to the corresponding target IO modules respectively, it should also include a process of sending a FOE response request to the EtherCAT master station.
[0087] In addition, this application includes:
[0088] The mismatch information or error information generated by the configuration matching detection and the site polling detection is collected, integrated into an upgrade error report and sent to the EtherCAT master station.
[0089] Specifically, in this application, once the configuration matching detection and site polling detection generate mismatch information or error information, the device will immediately collect and integrate the feedback information and error information into an upgraded error report and transmit it back to the main station through the FOE protocol, so that users can easily troubleshoot and resolve the error information.
[0090] It can be seen from the above technical solution that an IO module firmware upgrade method, device, equipment and readable storage medium provided in the embodiment of the present application first receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, and the firmware upgrade request includes a firmware upgrade file name and a verification code instruction. After that, the verification code instruction is parsed, and the firmware verification code information is sent to the designated site number obtained by the parsing. Subsequently, the firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station is received, and several firmware packages and FOE password instructions are generated for the firmware upgrade file package. The encryption header and the FOE password instruction of each firmware package are parsed to determine the target IO modules in each IO module of the EtherCAT slave station that match the parsed verification code and meet the parsed upgrade firmware attribute requirements and the upgrade firmware information. Finally, each of the firmware packages is sent to the corresponding target IO modules respectively, so as to perform firmware upgrade on each target IO module based on the upgrade firmware information in the firmware package.
[0091] This application receives the firmware upgrade file sent by the EtherCAT master station, and generates several firmware packages and FOE password instructions for the firmware upgrade file package. Then, the encryption header and FOE password instructions of each firmware package are parsed to determine the target IO modules in each IO module of the EtherCAT slave station that match the parsed inspection code and meet the parsed upgrade firmware attribute requirements and upgrade firmware information. Finally, each firmware package is sent to each corresponding target IO module to perform firmware upgrade on each target IO module. In this process, remote firmware upgrade can be achieved without disassembling the IO module, which greatly improves the convenience and efficiency of IO module firmware upgrade. In addition, this application also supports a variety of upgrade scenarios, which can not only realize batch upgrades of modules of the same type, but also specify a module type for upgrade when there are different types of modules in the configuration, and specify the site number for firmware upgrade, meeting the different scene requirements of the user site.
[0092] An IO module firmware upgrade device provided in an embodiment of the present application is described below. The IO module firmware upgrade device described below and the IO module firmware upgrade method described above can refer to each other.
[0093] See also Figure 4 , Figure 4A schematic diagram of an IO module firmware upgrade device disclosed in an embodiment of the present application.
[0094] like Figure 4 As shown, the IO module firmware upgrade device may include:
[0095] The request receiving unit 110 is used to receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, wherein the firmware upgrade request includes a firmware upgrade file name and a verification code instruction;
[0096] The instruction parsing unit 120 is used to parse the verification code instruction and send the firmware verification code information to the designated site number obtained by the parsing;
[0097] The file receiving unit 130 is used to receive a firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station, and generate a plurality of firmware packages and FOE password instructions for the firmware upgrade file package;
[0098] The file parsing unit 140 is used to parse the encrypted header of each firmware package and the FOE password instruction, and determine each target IO module in each IO module of the EtherCAT slave station that matches the parsed verification code and meets the parsed upgrade firmware attribute requirements and the upgrade firmware information;
[0099] The distribution upgrade unit 150 is used to send each of the firmware packages to the corresponding target IO modules respectively, so as to perform firmware upgrade on each of the target IO modules based on the upgrade firmware information in the firmware package.
[0100] It can be seen from the above technical solution that an IO module firmware upgrade method, device, equipment and readable storage medium provided in the embodiment of the present application first receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, and the firmware upgrade request includes a firmware upgrade file name and a verification code instruction. After that, the verification code instruction is parsed, and the firmware verification code information is sent to the designated site number obtained by the parsing. Subsequently, the firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station is received, and several firmware packages and FOE password instructions are generated for the firmware upgrade file package. The encryption header and the FOE password instruction of each firmware package are parsed to determine the target IO modules in each IO module of the EtherCAT slave station that match the parsed verification code and meet the parsed upgrade firmware attribute requirements and the upgrade firmware information. Finally, each of the firmware packages is sent to the corresponding target IO modules respectively, so as to perform firmware upgrade on each target IO module based on the upgrade firmware information in the firmware package.
[0101] This application receives the firmware upgrade file sent by the EtherCAT master station, and generates several firmware packages and FOE password instructions for the firmware upgrade file package. Then, the encryption header and FOE password instructions of each firmware package are parsed to determine the target IO modules in each IO module of the EtherCAT slave station that match the parsed inspection code and meet the parsed upgrade firmware attribute requirements and upgrade firmware information. Finally, each firmware package is sent to each corresponding target IO module to perform firmware upgrade on each target IO module. In this process, remote firmware upgrade can be achieved without disassembling the IO module, which greatly improves the convenience and efficiency of IO module firmware upgrade. In addition, this application also supports a variety of upgrade scenarios, which can not only realize batch upgrades of modules of the same type, but also specify a module type for upgrade when there are different types of modules in the configuration, and specify the site number for firmware upgrade, meeting the different scene requirements of the user site.
[0102] Optionally, the file parsing unit may include:
[0103] An encryption header parsing unit, used to parse the encryption header of each of the firmware packages, and perform configuration matching detection on the EtherCAT slave station according to the upgraded firmware attribute requirements and the verification code obtained by the parsing, to determine each IO module to be upgraded that meets the upgraded firmware attribute requirements and matches the verification code obtained by the parsing among the IO modules of the EtherCAT slave station;
[0104] The FOE parsing unit is used to parse the FOE password instruction, and perform site polling detection on each IO module to be upgraded according to the designated site number information obtained by the parsing, and determine each target IO module in the IO modules to be upgraded that meets the designated site number information.
[0105] Optionally, the encryption header parsing unit may include:
[0106] An attribute parsing unit, used to parse the encrypted header of each firmware package to obtain the upgrade-specified hardware version, upgrade-specified module type and verification code;
[0107] The configuration polling unit is used to poll and detect whether there are IO modules in the EtherCAT slave station configuration that meet the upgrade specified hardware version and the upgrade specified module type and match the parsed verification code, and determine the IO modules that meet the requirements as the IO modules to be upgraded.
[0108] Optionally, the IO module firmware upgrade device may further include:
[0109] The error reporting unit is used to collect the mismatch information or error information generated by the configuration matching detection and the site polling detection, integrate them into an upgrade error report and send them to the EtherCAT master station.
[0110] Optionally, the FOE parsing unit may include:
[0111] A password instruction unit, used for parsing the FOE password instruction;
[0112] A first polling unit is used to poll and detect the site numbers of the IO modules to be upgraded when the parsed designated site number information represents a unique site, and determine the IO modules corresponding to the site numbers recorded in the designated site number information as target IO modules;
[0113] The second polling unit is used to poll and detect the module type of each IO module to be upgraded when the parsed designated site number information represents the site module type, and determine each IO module belonging to the site module type recorded in the designated site number information as each target IO module.
[0114] Optionally, the IO module firmware upgrade device may further include:
[0115] The response feedback unit is used to send a FOE response request to the EtherCAT master station after sending each of the firmware packages to the corresponding target IO modules.
[0116] The IO module firmware upgrade apparatus provided in the embodiment of the present application can be applied to IO module firmware upgrade equipment. Figure 5 The hardware structure diagram of the IO module firmware upgrade device is shown in FIG. Figure 5 , the hardware structure of the IO module firmware upgrade device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0117] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0118] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;
[0119] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;
[0120] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:
[0121] Receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, wherein the firmware upgrade request includes a firmware upgrade file name and a verification code instruction;
[0122] Parsing the verification code instruction, and sending firmware verification code information to the parsed designated site number;
[0123] Receive a firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station, and generate a plurality of firmware packages and FOE password instructions for the firmware upgrade file package;
[0124] Parse the encryption header and the FOE password instruction of each firmware package, and determine each target IO module of each IO module of the EtherCAT slave station that matches the parsed verification code and meets the parsed upgrade firmware attribute requirements and the upgrade firmware information;
[0125] The firmware packages are respectively sent to the corresponding target IO modules, so as to perform firmware upgrade on the target IO modules based on the upgrade firmware information in the firmware packages.
[0126] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0127] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0128] Receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, wherein the firmware upgrade request includes a firmware upgrade file name and a verification code instruction;
[0129] Parsing the verification code instruction, and sending firmware verification code information to the parsed designated site number;
[0130] Receive a firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station, and generate a plurality of firmware packages and FOE password instructions for the firmware upgrade file package;
[0131] Parse the encryption header and the FOE password instruction of each firmware package, and determine each target IO module of each IO module of the EtherCAT slave station that matches the parsed verification code and meets the parsed upgrade firmware attribute requirements and the upgrade firmware information;
[0132] The firmware packages are respectively sent to the corresponding target IO modules, so as to perform firmware upgrade on the target IO modules based on the upgrade firmware information in the firmware packages.
[0133] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0134] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0135] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0136] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for upgrading IO module firmware, characterized in that: include: Receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, wherein the firmware upgrade request includes a firmware upgrade file name and a verification code instruction; Parsing the verification code instruction, and sending firmware verification code information to the parsed designated site number; Receive a firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station, and generate a plurality of firmware packages and FOE password instructions for the firmware upgrade file; Parsing the encrypted header of each of the firmware packages, and performing configuration matching detection on the EtherCAT slave station according to the upgraded firmware attribute requirements and the verification code obtained by the parsing, to determine each IO module to be upgraded that meets the upgraded firmware attribute requirements and matches the parsed verification code among the IO modules of the EtherCAT slave station; Parse the FOE password instruction, and perform site polling detection on each IO module to be upgraded according to the designated site number information obtained by the parsing, and determine each target IO module that meets the designated site number information among the IO modules to be upgraded; Sending each of the firmware packages to the corresponding target IO modules respectively, so as to perform firmware upgrade on each of the target IO modules based on the upgrade firmware information in the firmware packages; The encrypted header of each firmware package is parsed, and the EtherCAT slave is configured to match the firmware attribute requirements and the verification code obtained by the parsing, and the IO modules to be upgraded that meet the firmware attribute requirements and match the verification code obtained by the parsing are determined in each IO module of the EtherCAT slave, including: Parsing the encrypted header of each firmware package to obtain the upgrade-specified hardware version, upgrade-specified module type and verification code; Polling to detect whether there is an IO module in the EtherCAT slave configuration that meets the upgrade specified hardware version and the upgrade specified module type and matches the parsed verification code, and determining each IO module that meets the requirements as each IO module to be upgraded; Parsing the FOE password instruction, and performing site polling detection on each IO module to be upgraded according to the designated site number information obtained by the parsing, and determining each target IO module in the IO modules to be upgraded that meets the designated site number information, including: Parsing the FOE password instruction; If the parsed designated site number information represents a unique site, the site numbers of the IO modules to be upgraded are detected by polling, and the IO modules corresponding to the site numbers recorded in the designated site number information are determined as target IO modules; If the parsed designated site number information represents a site module type, the module type of each IO module to be upgraded is detected by polling, and each IO module belonging to the site module type recorded in the designated site number information is determined as each target IO module.
2. The method according to claim 1, characterized in that Also includes: The mismatch information or error information generated by the configuration matching detection and the site polling detection is collected, integrated into an upgrade error report and sent to the EtherCAT master station.
3. The method according to claim 1, characterized in that After sending each of the firmware packages to the corresponding target IO modules respectively, the method further includes: Send a FOE response request to the EtherCAT master.
4. An IO module firmware upgrade device, characterized in that: include: A request receiving unit, used to receive a firmware upgrade request sent by the EtherCAT master station using the FOE protocol, wherein the firmware upgrade request includes a firmware upgrade file name and a verification code instruction; An instruction parsing unit, used for parsing the verification code instruction and sending firmware verification code information to the designated site number obtained by the parsing; A file receiving unit is used to receive a firmware upgrade file corresponding to the firmware upgrade file name sent by the EtherCAT master station, and generate a plurality of firmware packages and FOE password instructions for the firmware upgrade file; An encryption header parsing unit, used to parse the encryption header of each of the firmware packages, and perform configuration matching detection on the EtherCAT slave station according to the upgraded firmware attribute requirements and the verification code obtained by the parsing, to determine each IO module to be upgraded that meets the upgraded firmware attribute requirements and matches the verification code obtained by the parsing among the IO modules of the EtherCAT slave station; The FOE parsing unit is used to parse the FOE password instruction, and perform site polling detection on each IO module to be upgraded according to the designated site number information obtained by the parsing, and determine each target IO module that meets the designated site number information among the IO modules to be upgraded; A distribution upgrade unit, used for sending each of the firmware packages to the corresponding target IO modules respectively, so as to perform firmware upgrade on each of the target IO modules based on the upgrade firmware information in the firmware package; The encrypted header of each firmware package is parsed, and the EtherCAT slave is configured to match the firmware attribute requirements and the verification code obtained by the parsing, and the IO modules to be upgraded that meet the firmware attribute requirements and match the verification code obtained by the parsing are determined in each IO module of the EtherCAT slave, including: Parsing the encrypted header of each firmware package to obtain the upgrade-specified hardware version, upgrade-specified module type and verification code; Polling to detect whether there is an IO module in the EtherCAT slave configuration that meets the upgrade specified hardware version and the upgrade specified module type and matches the parsed verification code, and determining each IO module that meets the requirements as each IO module to be upgraded; Parsing the FOE password instruction, and performing site polling detection on each IO module to be upgraded according to the designated site number information obtained by the parsing, and determining each target IO module in the IO modules to be upgraded that meets the designated site number information, including: Parsing the FOE password instruction; If the parsed designated site number information represents a unique site, the site numbers of the IO modules to be upgraded are detected by polling, and the IO modules corresponding to the site numbers recorded in the designated site number information are determined as target IO modules; If the parsed designated site number information represents a site module type, the module type of each IO module to be upgraded is detected by polling, and each IO module belonging to the site module type recorded in the designated site number information is determined as each target IO module.
5. An IO module firmware upgrade device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the IO module firmware upgrade method according to any one of claims 1 to 3.
6. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the IO module firmware upgrade method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Firmware upgrading method and device based on EtherCAT communication driver
CN114691178A
Firmware program updating method and device of slave station equipment, equipment and storage medium
CN115048129A
Cited By
Cooperative upgrading method based on EtherCAT bus and master station equipment
CN120371364A