WO2017113080A1 - 一种从站固件更新的方法、***、主站及从站 - Google Patents

一种从站固件更新的方法、***、主站及从站 Download PDF

Info

Publication number
WO2017113080A1
WO2017113080A1 PCT/CN2015/099328 CN2015099328W WO2017113080A1 WO 2017113080 A1 WO2017113080 A1 WO 2017113080A1 CN 2015099328 W CN2015099328 W CN 2015099328W WO 2017113080 A1 WO2017113080 A1 WO 2017113080A1
Authority
WO
WIPO (PCT)
Prior art keywords
station
slave
slave station
firmware
data packet
Prior art date
Application number
PCT/CN2015/099328
Other languages
English (en)
French (fr)
Inventor
姚守强
唐恒悦
Original Assignee
深圳配天智能技术研究院有限公司
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 深圳配天智能技术研究院有限公司 filed Critical 深圳配天智能技术研究院有限公司
Priority to PCT/CN2015/099328 priority Critical patent/WO2017113080A1/zh
Priority to CN201580084468.6A priority patent/CN108293060B/zh
Publication of WO2017113080A1 publication Critical patent/WO2017113080A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, a system, a primary station, and a secondary station for updating a slave station firmware.
  • Modbus bus has the advantages of simple protocol, easy implementation, high cost performance, and is widely used in industrial automation.
  • the network established by the Modbus protocol is generally an industrial communication system, which is formed by a programmable logic controller and a computer connected by a public line or a local dedicated line.
  • the network has only one primary station, and all communications are initiated by the primary station.
  • the network can support up to 247 slaves. In some cases, if you need to improve the slave function, enhance the stability of the slave, or fix the vulnerability, you need to perform firmware upgrade from the station.
  • the slave station firmware update method is: the master station sends the firmware update data to each slave station, and each slave station receives the firmware update data and sends a successful reception response to the master station, and the slave station according to the received firmware. Update the data for a firmware upgrade.
  • the prior art adopts a method in which the primary station separately upgrades the firmware of each slave station, since the entire communication network can support up to 247 slave stations, when the number of slave stations is large, the master stations respectively Firmware upgrades for each slave are time consuming, slow to upgrade, and inefficient.
  • the embodiment of the invention provides a method, a system, a master station and a slave station for updating firmware of a slave station, which can effectively improve the efficiency of firmware update of multiple slave stations.
  • a first aspect of the embodiments of the present invention provides a method for updating a slave firmware, including:
  • the primary station acquires address information of each target slave station in the plurality of target slave stations, and firmware packets to be updated of the plurality of target slave stations, the plurality of target slave stations being slave stations that need to update the firmware data packet.
  • the primary station sends a setting frame to the target slave stations according to the address information of each target slave station, so that the target slave station sets a status bit of the target slave station according to the setting frame and goes to the
  • the slave station receives the acknowledgement information of the set frame, and the different status values of the status bits are used to indicate the receipt or deposit of the firmware data packet.
  • the firmware packet is broadcasted, so that each target slave station performs data update according to the firmware data packet, and updates the data.
  • the state value of the status bit is adjusted during the process.
  • the method further includes:
  • the primary station sends a query frame to each target slave station, and the query frame is used to instruct the target slave stations to feed back state values of the status bits of the target slave stations.
  • the primary station receives the status value sent by the target slave.
  • the primary station receives the status value returned by the at least one target slave station of the target slave stations, the second status bit information returned by the at least one target slave station corresponds to the at least one target slave station storage.
  • the primary station determines the receipt or deposit of the firmware data packet of the corresponding target slave station based on the stored status value.
  • the primary station determines to rebroadcast the firmware data packet based on the received or deposited condition.
  • the method further includes:
  • the primary station transmits a soft reset frame to each target secondary station to cause the target secondary station to perform a reset operation in accordance with the soft reset frame.
  • the broadcasting, by the primary station, the firmware data packet includes:
  • the primary station broadcasts the firmware data packet through a plurality of communication cycles.
  • a second aspect of the embodiments of the present invention provides a method for updating a slave firmware, including:
  • the slave receives the setup frame sent by the primary station.
  • the slave station sets a status bit of the target slave according to the setting frame, and sends acknowledgement information for receiving the set frame to the primary station, where different status values of the status bit are used to indicate the firmware packet Receive or deposit status.
  • the slave station receives a firmware data packet broadcast by the primary station.
  • the slave stations perform data update according to the firmware data packet, and adjust state values of the status bits during data update.
  • the target slave performs a reset operation when the slave reaches a preset state value.
  • the method further includes:
  • the slave station receives a query frame sent by the primary station.
  • the slave station feeds back a status value of the status bits of each target slave according to the query frame.
  • the target slave performs a reset operation including:
  • the slave receives a soft reset frame sent by the primary station.
  • the slave performs a reset operation in accordance with the soft reset frame.
  • the receiving, by the target slave station, the firmware data packet broadcast by the primary station includes:
  • the slave station receives the firmware data packet broadcast by the primary station in a multi-communication cycle.
  • a third aspect of the embodiments of the present invention provides a primary station, including:
  • An obtaining module configured to acquire address information of each target slave station in the plurality of target slave stations, and firmware information packets to be updated of the plurality of target slave stations, where the plurality of target slave stations need to update firmware data packets Slaves.
  • a first sending module configured to send a setting frame to each target slave station according to the address information of each target slave station acquired by the acquiring module, so that the target slave station sets the target slave station according to the setting frame Status bits, the different status values of the status bits are used to indicate the receipt or deposit of the firmware data packet.
  • a first receiving module configured to receive confirmation information that the target slave station has received the set frame.
  • a data transmission module configured to: after confirming that each target slave station initialization setting is successful according to the confirmation information, broadcasting the firmware data packet, so that each target slave station performs data update according to the firmware data packet, and The status value of the status bit is adjusted during data update.
  • a second sending module configured to send, to each target slave station, a query frame, where the query frame is used to instruct the target slave stations to feed back state values of the status bits of the target slave stations.
  • a second receiving module configured to receive the status value sent by the target slave station.
  • a storage module when the receiving module receives a status value returned by the at least one target slave station of the target slave stations, the second status bit information returned by the at least one target slave station and the at least one target The slave corresponds to the storage.
  • a determining module configured to determine, according to the state value stored by the storage module, a receiving or depositing condition of the firmware data packet of the corresponding target slave station.
  • the data transmission module is further configured to determine to re-broadcast the firmware data packet according to the situation of receiving or depositing determined by the determining module.
  • a third sending module configured to send a soft reset frame to each target slave station, so that the target slave station performs a reset operation according to the soft reset frame.
  • a fourth aspect of the embodiments of the present invention provides a slave station, including:
  • the third receiving module is configured to receive a setting frame sent by the primary station.
  • a setting module configured to set a status bit of the target slave according to the setting frame received by the third receiving module, where different status values of the status bit are used to indicate receiving or depositing the firmware data packet .
  • a fourth sending module configured to send the confirmation information to the primary station according to the setting frame received by the third receiving module.
  • a fourth receiving module configured to receive a firmware data packet broadcast by the primary station.
  • a data update module configured to perform data update according to the firmware data packet received by the fourth receiving module, and adjust a state value of the status bit during a data update process.
  • an execution module configured to perform a reset operation when the target slave reaches a preset state value.
  • the fifth receiving module is configured to receive a sending query frame sent by the primary station.
  • a fifth sending module configured to send a status value of the status bits of each target slave station to the primary station according to the query frame received by the fifth receiving module.
  • execution module includes:
  • a receiving unit configured to receive a soft reset frame sent by the primary station.
  • an execution unit configured to perform a reset operation according to the soft reset frame received by the receiving unit.
  • a fifth aspect of the present invention provides a system for slave station firmware update, comprising: a primary station and a plurality of secondary stations;
  • the primary station acquires address information of each of the plurality of secondary stations, and firmware packets of the plurality of secondary stations to be updated, the plurality of secondary stations being slave stations that need to update the firmware data packets.
  • the primary station transmits a setup frame to the slave stations based on the address information of the slave stations.
  • the slave station receives a setup frame sent by the primary station.
  • the slave station sets a status bit of the slave station according to the setting frame, and feeds back, to the slave station, acknowledgement information of the setting frame, where different status values of the status bit are used to indicate the firmware data packet. Receive or deposit status.
  • the primary station broadcasts the firmware data packet after confirming that the slave station initialization settings are successful according to the confirmation information.
  • the slave station receives the firmware data packet broadcast by the primary station and performs data update according to the firmware data packet, and adjusts the status value of the status bit during the data update process.
  • the primary station sends a query frame to each slave station, where the query frame is used to instruct the slave stations to feed back status values of the status bits of the slave stations.
  • the slave station receives a send query frame sent by the primary station.
  • the slave station feeds back a status value of status bits of each slave station according to the query frame.
  • the primary station receives the status value sent by the secondary station.
  • the primary station receives the status value returned by the at least one of the slave stations, storing the second status bit information returned by the at least one slave station and the at least one slave station.
  • the primary station determines the receipt or deposit of the firmware data packet corresponding to the secondary station based on the stored status value.
  • the primary station determines to rebroadcast the firmware data packet based on the received or deposited condition.
  • the primary station After the primary station broadcasts the firmware information, the primary station sends a soft reset frame to each secondary station.
  • the slave receives a soft reset frame sent by the primary station.
  • the slave performs a reset operation in accordance with the soft reset frame.
  • the broadcasting, by the primary station, the firmware data packet includes:
  • the primary station broadcasts the firmware data packet through a plurality of communication cycles.
  • the slave station receives the firmware data packet broadcast by the primary station in a multi-communication cycle.
  • the master station acquires address information of each target slave station in the plurality of target slave stations, and firmware packets to be updated of the plurality of target slave stations, wherein the plurality of target slave stations are slave stations that need to update the firmware data packet, After the primary station confirms that the target slave station initialization setting is successful according to the confirmation information, the primary station transmits the firmware data packet to each target slave station through the broadcast data transmission mode, so that each target slave station can receive the master station together.
  • the transmitted firmware packet multiple target slaves independently update the data according to the firmware packet, which enables multiple slave firmware to update quickly and efficiently.
  • FIG. 1 is a schematic diagram of a method for updating a slave station firmware according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of a method for updating a slave station firmware according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic diagram of a method for updating a slave station firmware according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic diagram of a primary station according to Embodiment 4 of the present invention.
  • Figure 5 is a schematic diagram of a slave station according to Embodiment 5 of the present invention.
  • FIG. 6 is a schematic diagram of a system for updating a slave station firmware according to Embodiment 6 of the present invention.
  • the embodiment of the invention provides a method for updating the slave firmware, a master station and a slave station, which can effectively improve the efficiency of firmware update of multiple slave stations.
  • the present invention provides a method for updating a slave firmware, including:
  • the primary station acquires address information of each target slave station in the plurality of target slave stations, and firmware packet to be updated of the plurality of target slave stations.
  • the primary station can obtain related information of multiple slave stations from the upper computer, and can also obtain related information of multiple slave stations from the extensible markup language xml file, where related information of the multiple slave stations is included. How many slaves are in the network coverage of the primary station, and how many of these secondary stations require firmware updates.
  • the primary station determines that the slave station that needs to perform the firmware update is the target slave station, and the related information of the slave station also includes the address information of the target slave station and the firmware data packet to be updated.
  • the firmware data packet may include the following items: a station address indicating a station address of a target slave station; a function code defining a function (which may be customized to 0x1C); a number of packets indicating how many data packets are shared; a packet sequence number indicating Current number of packages; packet size, indicating the size of the firmware packet; data, firmware information.
  • the data format included in the firmware data can be as follows:
  • the primary station sends a setup frame to each target secondary station according to address information of each target secondary station.
  • the primary station transmits a setting frame to each target slave station according to the address information of each target slave station, so that the target slave station receives the setting frame, sets the status bit of the target slave station according to the setting frame, and feeds back confirmation information of the setting frame to the slave station.
  • the different status values of the status bits are used to indicate the receipt or deposit of firmware packets.
  • the setting frame can include the following contents: station address, function code (can be customized to 0x20), error flag (16bit), write FLASH flag (1bit) and writable flag (1bit).
  • the data format of the set frame can be as follows:
  • the primary station sends a setting frame to each target slave station according to the address information of each target slave station, so that each target slave station reads the data information in the setting frame, and sets the target slave station according to the read data.
  • a first state value of the status bit may be used to indicate an initialization value of a status bit of the target slave, that is, a status value when the firmware packet has not been received, for example, the target slave may set the error flag Set to "Error", set the Flash flag to "Unwritten” and set the writable flag to "Writable”.
  • the primary station receives the confirmation information sent by each target slave station.
  • step 102 If within the preset time period, the confirmation message of the Nth target slave station is not received (N is used to distinguish each slave) If the station can be an identifier or a serial number, step 102 is performed; if the primary station confirms receipt of the confirmation information of each slave station within the preset time period, step 104 is performed.
  • the primary station confirms that each slave station initial setting is successful according to the confirmation information sent by each target slave station, and the primary station broadcasts the firmware data packet, so that each slave station receives the firmware data packet, and writes the data of the firmware data packet. Flash, complete the firmware update.
  • the primary station determines that each target slave station initialization setting is successful, and the primary station transmits the firmware data packet by means of broadcast communication, so that each slave station receives the The firmware data packet, and the data of the firmware data packet is written into the Flash to complete the firmware update process.
  • the status value of the slave status bit is adjusted, and the status value is used to indicate the firmware data packet. The case of receiving or writing to Flash.
  • the present invention provides a method for updating a slave firmware, including:
  • the slave station receives a setting frame sent by the primary station.
  • the slave station receives the setting frame sent by the master station, and the setting frame may include the following contents: station address bit, function code bit (can be customized to 0x20), error flag bit (16 bit), write FLASH flag bit (1 bit) and writable Flag bit (1bit).
  • the data format of the set frame can be as follows:
  • the slave station in this embodiment is the same as the target slave station in Embodiment 1, that is, the slave station whose firmware needs to be updated.
  • the slave sets a state value of a status bit of the target slave according to the setting frame.
  • the slave reads the data information in the set frame, and sets a first state value of the status bit of the target slave according to the read data, and the first state value can be used to indicate an initialization value of the status bit of the target slave. That is, the status value when the firmware packet has not been received, for example, the target slave can set the error flag bit to "error", indicating that the target slave has not received data; setting the Flash flag bit to "unwritten” indicates The target slave does not have a firmware packet written to Flash; the writable flag bit is set to "writable” to indicate that the target slave is a slave whose firmware needs to be updated.
  • the different status values of the status bits are used to indicate the receipt or deposit of firmware packets.
  • the slave station sends a confirmation message for receiving the setting frame to the primary station.
  • the slave If the slave completes the setting of the status value of the slave status bit according to the setup frame, that is, the initialization setting of the slave completion status value, the slave transmits to the primary station confirmation information indicating that the slave has completed the initialization setting.
  • the slave station receives the firmware data packet broadcast by the primary station.
  • the slave station receives the firmware data packet transmitted by the primary station in a broadcast form, and the firmware data packet may include the following items: a station address indicating a station address of the target slave station; a function code, which may be customized to be 0x1C; How many data packets are in total; the packet sequence number indicates the current number of packets; the packet size indicates the size of the firmware packet; data, firmware information.
  • the data format of the firmware data can be as follows:
  • the slave station can read the function code (0x1C) of the firmware data packet, and the function code is used to indicate that the data packet is a data packet transmitted in a broadcast manner, and the slave station receives the firmware data packet, or The station can read the station address in the data packet and confirm whether to accept the firmware data according to the station address.
  • the slave station performs data update according to the firmware data packet, and adjusts the status value of the status bit during the data update process.
  • the slave performs data update based on the firmware packet, and adjusts the first state value to a second state value during the data update, the second state value being used to indicate the progress of the slave station updating the firmware packet.
  • the specific process of adjusting the first state value to the second state value during the data update process includes:
  • the slave station receives the firmware data packet, and the slave station performs CRC check on the firmware data packet. If the slave station judges that the CRC check is correct, the corresponding error flag in the slave station status bit is from the "error" of the first state value. Adjusting to "correct" for the second status value indicates that the slave has received the firmware packet.
  • the slave saves the data in the firmware packet to the memory.
  • the slave determines that the error flag in each firmware packet is "correct”
  • the slave writes the data in the firmware packet to Flash and sets the corresponding Flash flag in the slave status bit from the first status value. "Unwritten” is adjusted to "Writed”, indicating that the slave has written the data in the firmware packet to Flash.
  • the slave station determines that the data in each firmware packet has been written into the flash, the slave performs a CRC check on the data written in the flash.
  • the slave station If the slave station corrects the CRC of the data written in the flash, the slave station adjusts the status value of the slave status bit to a third status value, which can be understood as setting the firmware update identifier to indicate The station's firmware update is complete.
  • the slave When the state value reaches the preset value, the slave performs a reset operation.
  • the slave When the slave reaches the preset third state value, the slave receives a reset command of the external input, and the slave performs a reset operation according to the reset command.
  • the data receiving state is recorded, and the accuracy of receiving data from the slave station is ensured.
  • an embodiment of the present invention provides a method for updating a slave firmware, including:
  • the primary station acquires address information of each target slave station in the plurality of target slave stations, and firmware packets to be updated of the plurality of target slave stations, and the plurality of target slave stations are slave stations that need to update the firmware data packet.
  • the primary station can obtain related information of multiple slave stations from the upper computer, and can also obtain related information of multiple slave stations from the extensible markup language xml file, where related information of the multiple slave stations is included. How many slaves are in the network coverage of the primary station, and how many of these secondary stations require firmware updates.
  • the primary station determines that the slave station that needs to perform the firmware update is the target slave station, and the related information of the slave station also includes the address information of the target slave station and the firmware data packet to be updated.
  • the firmware data packet may include the following items: a station address indicating a station address of a target slave station; a function code, which may be customized to be 0x1C; a number of packets indicating how many data packets are shared; a packet sequence number indicating the current number of packets Package; packet size, indicating the size of the firmware packet; data, firmware information.
  • the data format included in the firmware data can be as follows:
  • the firmware data packet obtained by the slave station is an unpacketized data packet, and the slave station performs the operation of subcontracting, which can also be understood as the obtained firmware data packet is the data packet after the packetization has been performed, where Not limited.
  • the size of the firmware data packet 1 frame per 128 bytes, 1 block per 2kbyte, 1 block contains 16 frames, Flash needs to be programmed by block, and one firmware data packet is multiple blocks.
  • the primary station sends a setup frame to each target secondary station according to address information of each target secondary station.
  • the slave station receives the setting frame sent by the master station, and the setting frame may include the following contents: station address, function code (can be customized to 0x20), error flag (16bit), write FLASH flag (1bit) and writable Flag (1bit).
  • the data format of the set frame can be as follows:
  • the slave station receives the setting frame sent by the primary station, and sets a state value of the status bit of the slave station according to the setting frame.
  • the slave station can read the function code (0x1C) of the firmware data packet, and the function code is used to indicate that the data packet is a data packet transmitted in a broadcast manner, and the slave station receives the firmware data packet, or The station can read the station address in the data packet and confirm whether to receive the firmware data according to the station address.
  • the different status values of the status bits are used to indicate the receipt or deposit of firmware packets.
  • the slave reads the data information in the set frame, and sets a first state value of the status bit of the target slave according to the read data, and the first state value can be used to indicate the initialization value of the status bit of the slave, ie
  • the status value when the firmware packet is not received for example, the slave can set the error flag bit to "Error", indicating that the target slave has not received data; setting the Flash flag to "Unwritten” indicates that the target is from The station does not have a firmware packet written to Flash; the writable flag bit is set to "writable”, indicating that the target slave is a slave whose firmware needs to be updated.
  • the different status values of the status bits of the slave are used to indicate the receipt or deposit of firmware packets.
  • the slave station whose status bit is "writable” in this embodiment is referred to as a target slave station.
  • the slave station sends the first confirmation information of the receiving setup frame to the primary station,
  • the slave station If the slave completes the setting of the status value of the slave status bit according to the setup frame, that is, the initialization setting of the slave completion status value, the slave station transmits the first acknowledgement information to the primary station.
  • the firmware packet is broadcasted.
  • each slave station can receive the firmware data packet transmitted by the primary station, and the primary station confirms the status of each slave station in the initial station according to the confirmation information, which needs to be explained.
  • the status of each target slave is stored in the memory of the master station.
  • the primary station If the acknowledgment information of the Nth slave station is not received within the preset time period (N is used to distinguish each slave station, the identifier may also be a sequence number), the primary station repeatedly transmits the set frame, for example, the primary station weight The setting frame is sent 3 times to ensure that the slave station can receive the setting frame sent by the primary station. If the primary station still does not receive the confirmation information sent by the target secondary station, the primary station sets the state of the target secondary station to "Not responding".
  • step 306 is executed.
  • the slave station receives the firmware data packet broadcast by the primary station.
  • the slave station after this step is the target slave station, and the target slave station can read the function code (0x1C) of the firmware data packet, which is used to indicate that the data packet is a broadcasted data packet.
  • the target slave can receive the firmware packet.
  • Each target slave station performs data update according to the firmware data packet, and adjusts the status value of the status bit during the data update process.
  • the slave performs data update based on the firmware packet, and adjusts the first state value to a second state value during the data update, the second state value being used to indicate the progress of the slave station updating the firmware packet.
  • the specific process of adjusting the first state value to the second state value during the data update process includes:
  • the slave station receives the firmware data packet, and the slave station performs CRC check on the firmware data packet. If the slave station judges that the CRC check is correct, the corresponding error flag in the slave station status bit is from the "error" of the first state value. Adjusting to "correct" for the second status value indicates that the slave has received the firmware packet.
  • the slave saves the data in the firmware packet to the memory.
  • the slave determines that the error flag in each firmware packet is "correct”
  • the slave writes the data in the firmware packet to Flash and sets the corresponding Flash flag in the slave status bit from the first status value. "Unwritten” is adjusted to "Writed”, indicating that the slave has written the data in the firmware packet to Flash.
  • the CRC is verified for the data written in the Flash. If the CRC is correct, an update flag is set to indicate that the firmware data update of the slave is completed.
  • each firmware data packet is composed of multiple blocks, and the corresponding status of the slave station represents the transmission status of one block.
  • the slave station After the slave station receives a block, it writes the data of one block into the Flash and then receives another block.
  • step 307 is a repeated process until the slave station writes to the flash after all data transmission is completed.
  • the data in the CRC is checked. If the CRC is correct, the update flag is set to indicate that the firmware data update of the slave is complete.
  • the primary station sends a query frame to each slave station.
  • the primary station can broadcast the firmware data packet in the communication cycle, and broadcast one block of 16 frames of data at a time in each communication cycle, and wait for the preset duration. Since the primary station sends the broadcast firmware packet, there is no The slave station will send a response. At this time, the master station needs to perform inquiry confirmation so that the slave station can confirm that the firmware data packet broadcasted in this communication cycle is correctly transmitted, so the master station sends a query frame to the target slave station to enable the slave station to perform the slave station. response. In the process in which the primary station broadcasts a data packet to each target, the primary station transmits a query frame to each target secondary station. The query frame is used to instruct each target slave to feed back the status value of the status bits of each target slave.
  • the slave station receives the sending query frame sent by the primary station.
  • the query frame includes the station address and the function code.
  • the function code can be customized to 0x21.
  • the format of the query frame is as follows:
  • the slave station feeds back a status value of the status bit of the target slave according to the query frame.
  • the frame format of the feedback is the same as the frame format for setting the slave status bit.
  • the data format of the feedback is:
  • the primary station receives the status value returned by the at least one target slave station of each target slave station, storing, by the at least one target slave station, the status value corresponding to the at least one target slave station;
  • the primary station stores the slave status of each slave in the memory according to the status value returned by the slave, and determines whether to re-broadcast the firmware packet according to the status value.
  • Slave status also includes: transmission errors, writing Flash errors, and so on.
  • the primary station corresponds to the status value of the error flag of the status bit of the target slave station.
  • the primary station corresponds to the status value of the error flag of the status bit of the target slave station.
  • the primary station determines, according to the stored state value, the reception or deposit of the firmware packet of the corresponding target slave.
  • the primary station determines whether to re-broadcast the corresponding firmware data packet according to the reception or deposit status.
  • the slave station determines that the error flag in each firmware packet is "correct”
  • the slave will The data in the firmware packet is written to Flash, and the corresponding Flash flag in the slave status bit is adjusted from "unwritten” to "written” in the first status value, indicating that the slave has written the data in the firmware packet.
  • the Flash flag in the slave status bit is adjusted from "unwritten” to "written” in the first status value, indicating that the slave has written the data in the firmware packet.
  • the Flash Into the Flash.
  • the primary station does not receive the second status information that the status value of the error flag fed back by the target slave is "correct”
  • the primary station broadcasts the corresponding data frame for retransmission, and waits for the preset duration to ensure that the secondary station can receive
  • the master station sets the status of the slave station corresponding to the target slave station in the primary station to "transmission error”.
  • the master station stores the status status status of the slave as "Flash Error". ".
  • the primary station determines that the corresponding status bits of each target secondary station are correspondingly stored and all firmware data packet transmissions are completed, the primary station sends a soft reset frame to each target secondary station.
  • the primary station determines that the corresponding status bits of each slave station are correspondingly stored and the data transmission of all the firmware data packets is completed, it indicates that the firmware data packet transmitted by the primary station to the broadcast of each slave station has been completed, and the primary station is directed to each target.
  • the slave sends a soft reset frame.
  • the target slave receives the soft reset frame sent by the primary station.
  • the format of the soft reset frame is as follows:
  • the slave station sends a second confirmation message to the primary station.
  • the data format of the second acknowledgment message sent by the slave station to the primary station is the same as the format of the soft reset frame.
  • the data format of the confirmation message is as follows:
  • the target slave performs a reset operation according to the soft reset frame.
  • the slave performs a reset operation according to the soft reset frame, and retrieves the written data from the flash area according to the firmware update flag, adjusts the written data to the actual running area, and finally completes the firmware upgrade for all the slaves simultaneously. task.
  • the primary station sends a query frame to query the status of the received data, and the primary station determines whether to re-broadcast the corresponding firmware data packet according to the receiving or storing condition, so as to ensure that the slave station can accurately receive the firmware data packet.
  • a primary station 1 is provided in the embodiment of the present invention, including:
  • the obtaining module 401 is configured to obtain address information of each target slave station in the plurality of target slave stations, and firmware information packets to be updated of the plurality of target slave stations, where the plurality of target slave stations are slave stations that need to update the firmware data packet.
  • the first sending module 402 is configured to send, according to the address information of each target slave station acquired by the obtaining module 401, a setting frame to each target slave station, so that the target slave station sets the status bit of the target slave station according to the setting frame, and the status bits are different.
  • the status value is used to indicate the receipt or deposit of firmware packets.
  • the first receiving module 403 is configured to receive the acknowledgement information of the received setup frame sent by the target slave station.
  • the data transmission module 404 is configured to: after confirming that each target slave station is successfully set according to the confirmation information received by the first receiving module 403, broadcast the firmware data packet, so that each target slave station performs data update according to the firmware data packet, and updates the data. Adjust the status value of the status bit during the process.
  • the primary station 1 further includes:
  • the second sending module 405 is configured to send a query frame to each target slave station, where the query frame is used to indicate that each target slave station feeds back a status value of a status bit of each target slave station.
  • the second receiving module 406 is configured to receive a status value sent by the target slave station.
  • the storage module 407 when the second receiving module 406 receives the status value returned by the at least one target slave station of each target slave station, storing the second status bit information returned by the at least one target slave station and the at least one target slave station .
  • the determining module 408 is configured to determine, according to the state value stored by the storage module 407, the receiving or depositing status of the firmware packet of the corresponding target slave.
  • the data transmission module 404 is further configured to re-broadcast the firmware data packet according to the receiving or depositing condition determined by the determining module 408.
  • the third sending module 409 is configured to send a soft reset frame to each target slave station, so that the target slave station performs a reset operation according to the soft reset frame.
  • an embodiment of the present invention provides a slave station 2 including:
  • the third receiving module 501 is configured to receive a setting frame sent by the primary station.
  • the setting module 502 is configured to set a status bit of the target slave according to the setting frame received by the third receiving module 501, where different status values of the status bits are used to indicate the receiving or depositing of the firmware data packet.
  • the fourth sending module 503 is configured to send the confirmation information to the primary station according to the setting frame received by the third receiving module 501.
  • the fourth receiving module 504 is configured to receive a firmware data packet broadcast by the primary station.
  • the data update module 505 is configured to perform data update according to the firmware data packet received by the fourth receiving module 504, and adjust the status value of the status bit during the data update process.
  • the executing module 506 is configured to perform a reset operation when the target slave reaches the preset state value.
  • the fifth receiving module 507 is configured to receive a sending query frame sent by the primary station.
  • the fifth sending module 508 is configured to send, according to the query frame received by the fifth receiving module 507, the status value of the status bits of each target slave station to the primary station.
  • execution module 506 further includes:
  • the receiving unit 5061 is configured to receive a soft reset frame sent by the primary station.
  • the executing unit 5062 is configured to perform a reset operation according to the soft reset frame received by the receiving unit 5061.
  • the present invention provides a system for firmware update from a station 2, comprising: a primary station 1 and a plurality of secondary stations 2.
  • the primary station 1 acquires address information of each of the plurality of slave stations 2, and the firmware data packets of the plurality of slave stations 2 to be updated, the plurality of slave stations 2 being slave stations that need to update firmware data packets 2.
  • the primary station 1 transmits a setting frame to the respective secondary stations 2 based on the address information of each of the secondary stations 2.
  • the slave station 2 receives the set frame transmitted by the master station 1.
  • the slave station 2 sets the status bit of the slave station 2 according to the setting frame and feeds back the confirmation information of the setting frame to the slave station 2, the different status values of the status bits are used to indicate the firmware The receipt or deposit of a packet.
  • the primary station 1 broadcasts the firmware data packet after confirming that the initialization of each slave station 2 is successful according to the confirmation information.
  • the slave station 2 receives the firmware data packet broadcast by the primary station 1 and performs data update according to the firmware data packet, and adjusts the status value of the status bit during the data update process.
  • the primary station 1 sends a query frame to each slave station 2, and the query frame is used to instruct the slave stations 2 to feed back status status of each slave station 2. value.
  • the slave station 2 receives the send query frame sent by the primary station 1.
  • the slave station 2 feeds back the status value of the status bits of each slave station 2 according to the query frame.
  • the primary station 1 receives the status value transmitted by the secondary station 2.
  • the primary station 1 receives the status value returned by the at least one of the slave stations 2, the second status bit information returned by the at least one slave station 2 and the at least one slave station 2 Corresponding storage.
  • the primary station 1 determines the reception or deposit of the firmware data packet corresponding to the secondary station 2 based on the stored status value.
  • the primary station 1 determines to rebroadcast the firmware data packet based on the received or deposited condition.
  • the primary station 1 After the primary station 1 broadcasts the firmware information, the primary station 1 transmits a soft reset frame to each secondary station 2.
  • the slave station 2 receives the soft reset frame transmitted by the primary station 1.
  • the slave station 2 performs a reset operation in accordance with the soft reset frame.
  • the primary station 1 broadcasts the firmware data packet through a plurality of communication cycles.
  • the slave station 2 receives the firmware data packet broadcast by the primary station 1 in multiple communication cycles.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

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

Abstract

一种从站固件更新的方法,用于有效提高多个从站固件更新的效率。所述方法包括:主站获取多个目标从站中各目标从站的地址信息,以及多个目标从站的待更新的固件数据包(101);主站根据各目标从站的地址信息向各目标从站发送设置帧(102);主站接收各目标从站发送的确认信息(103);主站根据各目标从站发送的确认信息确认各目标从站初始化设置成功后,主站广播固件数据包,以使各目标从站接收该固件数据包,并将该固件数据包的数据写入flash,完成固件更新(104)。同时还公开了一种从站固件更新的***、主站及从站。

Description

一种从站固件更新的方法、***、主站及从站 技术领域
本发明涉及通信领域,尤其涉及一种从站固件更新的方法、***、主站及从站。
背景技术
目前,现场总线已经成为工业控制领域技术发展的热点之一,Modbus总线具有协议简单、实施容易、性价比高等优点,在工业自动化领域应用较广。由Modbus协议建立的网络一般是一个工业通信***,该工业通信***由可编程逻辑控制器和计算机通过公用线路或局部专用线路连接而成,该网络只有一个主站,所有通信由该主站发起,且网络中最多可以支持247个从站。在某些情况下,如需要完善从站功能,增强从站稳定性,或修补漏洞等,需要从站进行固件升级。
现有技术中,从站固件更新的方法为,主站将固件更新数据分别发送至各从站,各从站接收到固件更新数据向主站发送成功接收的应答,从站根据接收到的固件更新数据进行固件升级。
现有技术的缺陷:现有技术采用主站分别升级每个从站固件的方式来进行,由于整个通信网络最多可以支持247个从站,当从站的数目多的情况下,主站分别对每个从站进行固件升级,非常耗时,升级速度慢,效率低下。
发明内容
本发明实施例提供了一种从站固件更新的方法、***、主站及从站,能够有效提升多个从站固件更新的效率。
本发明实施例的第一方面提供了一种从站固件更新的方法,包括:
主站获取多个目标从站中各目标从站的地址信息,以及所述多个目标从站的待更新的固件数据包,所述多个目标从站为需要更新固件数据包的从站。
所述主站根据所述各目标从站的地址信息向所述各目标从站发送设置帧,以使所述目标从站根据所述设置帧设置所述目标从站的状态位并向所述从站反馈接收所述设置帧的确认信息,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况。
所述主站根据所述确认信息确认所述各目标从站初始化设置成功后,广播所述固件数据包,以使所述各目标从站根据所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
进一步的,所述方法还包括:
所述主站向各目标从站发送查询帧,所述查询帧用于指示所述各目标从站反馈所述各目标从站的状态位的状态值。
所述主站接收所述目标从站发送的所述状态值。
当所述主站接收到所述各目标从站中的至少一个目标从站返回的状态值时,将所述至少一个目标从站返回的第二状态位信息与所述至少一个目标从站对应存储。
所述主站根据存储的所述状态值确定对应目标从站的所述固件数据包的接收或存入情况。
所述主站根据所述接收或存入的情况确定重新广播所述固件数据包。
进一步的,所述主站广播所述固件信息之后,所述方法还包括:
所述主站向各目标从站发送软复位帧,以使所述目标从站根据所述软复位帧执行复位操作。
进一步的,所述主站广播所述固件数据包包括:
所述主站通过多个通信周期广播所述固件数据包。
本发明实施例的第二方面提供了一种从站固件更新的方法,包括:
从站接收所主站发送的设置帧。
所述从站根据所述设置帧设置所述目标从站的状态位并向所述主站发送接收所述设置帧的确认信息,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况。
所述从站接收所述主站广播的固件数据包。
所述各从站根据所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
当所述从站达到预置状态值时,所述目标从站执行复位操作。
进一步的,所述目标从站接收所述主站广播的固件数据包时,所述方法还包括:
所述从站接收所述主站发送的查询帧。
所述从站根据所述查询帧反馈所述各目标从站的状态位的状态值。
进一步的,所述目标从站执行复位操作包括:
所述从站接收所述主站发送的软复位帧。
所述从站根据所述软复位帧执行复位操作。
进一步的,所述目标从站接收所述主站广播的固件数据包包括:
所述从站接收所述主站多通信周期广播的所述固件数据包。
本发明实施例的第三方面提供了一种主站,包括:
获取模块,用于获取多个目标从站中各目标从站的地址信息,以及所述多个目标从站的待更新的固件数据包,所述多个目标从站为需要更新固件数据包的从站。
第一发送模块,用于根据所述获取模块获取的各目标从站的地址信息向所述各目标从站发送设置帧,以使所述目标从站根据所述设置帧设置所述目标从站的状态位,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况。
第一接收模块,用于接收所述目标从站发送的已接收所述设置帧的确认信息。
数据传输模块,用于根据所述确认信息确认所述各目标从站初始化设置成功后,广播所述固件数据包,以使所述各目标从站根据所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
进一步的,还包括:
第二发送模块,用于向各目标从站发送查询帧,所述查询帧用于指示所述各目标从站反馈所述各目标从站的状态位的状态值。
第二接收模块,用于接收所述目标从站发送的所述状态值。
存储模块,当所述接收模块接收到所述各目标从站中的至少一个目标从站返回的状态值时,将所述至少一个目标从站返回的第二状态位信息与所述至少一个目标从站对应存储。
确定模块,用于根据所述存储模块存储的所述状态值确定对应目标从站的所述固件数据包的接收或存入情况。
所述数据传输模块,还用于根据所述确定模块确定的接收或存入的情况确定重新广播所述固件数据包。
进一步的,还包括:
第三发送模块,用于向各目标从站发送软复位帧,以使所述目标从站根据所述软复位帧执行复位操作。
本发明实施例的第四方面提供了一种从站,包括:
第三接收模块,用于接收所主站发送的设置帧。
设置模块,用于根据所述第三接收模块接收的所述设置帧设置所述目标从站的状态位,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况。
第四发送模块,用于根据所述第三接收模块接收的所述设置帧向所述主站发送确认信息。
第四接收模块,用于接收所述主站广播的固件数据包。
数据更新模块,用于根据所述第四接收模块接收的所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
执行模块,用于当所述目标从站达到预置状态值时,执行复位操作。
进一步的,还包括:
第五接收模块,用于接收所述主站发的送查询帧。
第五发送模块,用于根据所述第五接收模块接收的所述查询帧向所述主站发送所述各目标从站的状态位的状态值。
进一步的,所述执行模块包括:
接收单元,用于接收所述主站发送的软复位帧。
执行单元,用于根据所述接收单元接收的所述软复位帧执行复位操作。
本发明的第五方面提供了一种从站固件更新的***,包括:主站和多个从站;
主站获取多个从站中各从站的地址信息,以及所述多个从站的待更新的固件数据包,所述多个从站为需要更新固件数据包的从站。
所述主站根据所述各从站的地址信息向所述各从站发送设置帧。
所述从站接收主站发送的设置帧。
所述从站根据所述设置帧设置所述从站的状态位并向所述从站反馈接收所述设置帧的确认信息,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况。
所述主站根据所述确认信息确认所述各从站初始化设置成功后,广播所述固件数据包。
所述从站接收所述主站广播的固件数据包并根据所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
进一步的,广播所述固件数据包时,所述主站向各从站发送查询帧,所述查询帧用于指示所述各从站反馈所述各从站的状态位的状态值。
所述从站接收所述主站发的送查询帧。
所述从站根据所述查询帧反馈所述各从站的状态位的状态值。
所述主站接收所述从站发送的所述状态值。
当所述主站接收到所述各从站中的至少一个从站返回的状态值时,将所述至少一个从站返回的第二状态位信息与所述至少一个从站对应存储。
所述主站根据存储的所述状态值确定对应从站的所述固件数据包的接收或存入情况。
所述主站根据所述接收或存入的情况确定重新广播所述固件数据包。
进一步的,所述主站广播所述固件信息之后,所述主站向各从站发送软复位帧。
所述从站接收所述主站发送的软复位帧。
所述从站根据所述软复位帧执行复位操作。
进一步的,所述主站广播所述固件数据包包括:
所述主站通过多个通信周期广播所述固件数据包。
所述从站接收所述主站多通信周期广播的所述固件数据包。
从以上技术方案可以看出,本发明实施例具有以下优点:
主站获取多个目标从站中各目标从站的地址信息,以及所述多个目标从站的待更新的固件数据包,其中,多个目标从站为需要更新固件数据包的从站,主站根据确认信息确认所述各目标从站初始化设置成功后,主站通过广播的数据传输方式向各目标从站传输固件数据包,以使各目标从站可以一起接收主站 传输的固件数据包,多个目标从站根据固件数据包独立进行数据更新,能够使多个从站固件更新速度快,效率高。
附图说明
图1为本发明实施例1的一种从站固件更新的方法的示意图;
图2为本发明实施例2的一种从站固件更新的方法的示意图;
图3为本发明实施例3的一种从站固件更新的方法的示意图;
图4为本发明实施例4的一种主站的示意图;
图5为本发明实施例5的一种从站的示意图;
图6为本发明实施例6的一种从站固件更新的***的示意图。
具体实施方式
本发明实施例提供了一种从站固件更新的方法、主站及从站,能够有效提升多个从站固件更新的效率。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。下面分实施例对本发明进行具体描述。
实施例1
请参阅图1所示,本发明提供了一种从站固件更新的方法,包括:
101、主站获取多个目标从站中各目标从站的地址信息,以及多个目标从站的待更新的固件数据包。
可以理解的是,主站可以从上位机获取多个从站的相关信息,也可以从可扩展标记语言xml文件中获取多个从站的相关信息,该多个从站的相关信息包括在该主站的网络覆盖范围下共有多少个从站,这些从站中有多少需要进行固件更新的从站。主站确定需要进行固件更新的从站为目标从站,该从站的相关信息还包括目标从站的地址信息,以及待更新的固件数据包。
该固件数据包可以包括以下几项内容:站地址,表示目标从站的站地址;功能码,定义功能(可以自定义为0x1C);包个数,表示共有多少个数据包;包序号,表示当前第几个包;包大小,表示固件数据包的大小;数据,固件信息。
其中,该固件数据包括的数据格式可以为如下所示:
站地址 功能码 包个数 包序号 包大小 数据 数据
102、主站根据各目标从站的地址信息向各目标从站发送设置帧。
主站根据各目标从站的地址信息向各目标从站发送设置帧,以使目标从站接收到该设置帧根据设置帧设置目标从站的状态位并向从站反馈接收设置帧的确认信息。
状态位的不同状态值用于指示固件数据包的接收或存入情况。
可以理解的是,该设置帧可以包括如下内容:站地址、功能码(可以自定义为0x20),错误标识(16bit),写FLASH标志(1bit)和可写标志(1bit)。
其中,该设置帧的数据格式可以为如下所示:
站地址 功能码 错误标志1 错误标志2 Flash标志 可写标志
可以理解的是,主站根据各目标从站的地址信息向各目标从站发送设置帧,以使各目标从站读取该设置帧中的数据信息,并根据读取的数据设置目标从站的状态位的第一状态值,该第一状态值可以用来表示目标从站的状态位的初始化值,即还未接收固件数据包时的状态值,例如,目标从站可以将错误标志位设置为“错误”,将Flash标志位设置为“未写”,将可写标志位设置为“可写”。
103、主站接收各目标从站发送的确认信息。
若在预置时间段内,未收到第N目标从站的确认信息(N用于区分各从 站,可以为标识也可以为序号),则执行步骤102;若在预置时间段内,主站确认收到各从站的确认信息,执行步骤104。
104、主站根据各目标从站发送的确认信息确认各从站初始化设置成功后,主站广播固件数据包,以使各从站接收该固件数据包,并将该固件数据包的数据写入Flash,完成固件更新。
若主站在预置时间段内接收到各从站发送的确认信息,则主站确定各目标从站初始化设置成功,主站通过广播的通信方式传输固件数据包,以使各从站接收该固件数据包,并将该固件数据包的数据写入Flash,完成固件更新的过程,在接收该固件数据包的过程中,调整从站状态位的状态值,该状态值用于表示固件数据包接收或写入Flash的情况。
实施例2
请参阅图2所示,本发明提供了一种从站固件更新的方法,包括:
201、从站接收主站发送的设置帧。
从站接收主站发送的设置帧,该设置帧可以包括如下内容:站地址位、功能码位(可以自定义为0x20),错误标识位(16bit),写FLASH标志位(1bit)和可写标志位(1bit)。
其中,该设置帧的数据格式可以为如下所示:
站地址 功能码 错误标志1 错误标志2 Flash标志 可写标志
需要说明的是,本实施例中的从站与实施例1中的目标从站相同,即为固件需要更新的从站。
202、从站根据设置帧设置目标从站的状态位的状态值。
从站读取该设置帧中的数据信息,并根据读取的数据设置目标从站的状态位的第一状态值,该第一状态值可以用来表示目标从站的状态位的初始化值,即还未接收固件数据包时的状态值,例如,目标从站可以将错误标志位设置为“错误”,表明该目标从站还未接收数据;将Flash标志位设置为“未写”,表明该目标从站未有固件数据包写入Flash;将可写标志位设置为“可写”,表明该目标从站为固件需要更新的从站。状态位的不同状态值用于指示固件数据包的接收或存入情况。
203、从站向主站发送接收设置帧的确认信息。
若从站根据设置帧完成设置从站状态位的状态值,即从站完成状态值的初始化设置,该从站向主站发送用于指示该从站完成初始化设置的确认信息。
204、从站接收主站广播的固件数据包。
从站接收主站以广播形式传输的固件数据包,该固件数据包可以包括以下几项内容:站地址,表示目标从站的站地址;功能码,可以自定义为0x1C;包个数,表示共有多少个数据包;包序号,表示当前第几个包;包大小,表示固件数据包的大小;数据,固件信息。
其中,该固件数据的数据格式可以为如下所示:
站地址 功能码 包个数 包序号 包大小 数据 数据
可以理解的是,从站可以读取固件数据包的功能码(0x1C),该功能码用于指示该数据包为以广播的方式传输的数据包,从站即接收该固件数据包,或者从站可以读取该数据包中的站地址,根据站地址确认是否接受该固件数据包括。
205、从站根据固件数据包进行数据更新,并在数据更新过程中调整状态位的状态值。
从站根据固件数据包进行数据更新,在数据更新的过程中将第一状态值调整到第二状态值,该第二状态值用于指示从站更新固件数据包的进行情况。
其中,从站在数据更新的过程中将第一状态值调整到第二状态值的具体过程包括:
从站接收到固件数据包,从站对固件数据包进行CRC校验,若从站判断CRC校验正确,则从站将从站状态位中对应的错误标志从第一状态值的“错误”调整为第二状态值的“正确”,表明从站已接收到该固件数据包。
从站将固件数据包中的数据存到内存中。
若从站判定每一个固件数据包中的错误标志均为“正确”,则从站将固件数据包中的数据写入Flash,并将从站状态位中对应的Flash标志从第一状态值的“未写”调整为“已写”,表明该从站已经将固件数据包中数据写入Flash中。
若从站判定各个固件数据包中的数据均已写入Flash中,从站对Flash中已写入的数据进行CRC校验。
若从站对已写入Flash中的数据CRC校验正确,则从站将从站状态位的状态值调整为第三状态值,该第三状态值可以理解为设置固件更新标识,以表明从站的固件更新完成。
206、当状态值达到预置值时,从站执行复位操作。
当从站达到预置的第三状态值时,该从站接收外部输入的复位指令,从站根据复位指令执行复位操作。
本发明实施例中,通过在数据更新过程中调整状态位的状态值,记录数据接收状态,保证了从站接收数据的准确性。
实施例3
请参阅图3所示,本发明实施例提供一种从站固件更新的方法,包括:
301、主站获取多个目标从站中各目标从站的地址信息,以及多个目标从站的待更新的固件数据包,多个目标从站为需要更新固件数据包的从站。
可以理解的是,主站可以从上位机获取多个从站的相关信息,也可以从可扩展标记语言xml文件中获取多个从站的相关信息,该多个从站的相关信息包括在该主站的网络覆盖范围下共有多少个从站,这些从站中有多少需要进行固件更新的从站。主站确定需要进行固件更新的从站为目标从站,该从站的相关信息还包括目标从站的地址信息,以及待更新的固件数据包。
该固件数据包可以包括以下几项内容:站地址,表示目标从站的站地址;功能码,可以自定义为0x1C;包个数,表示共有多少个数据包;包序号,表示当前第几个包;包大小,表示固件数据包的大小;数据,固件信息。
其中,该固件数据包括的数据格式可以为如下所示:
站地址 功能码 包个数 包序号 包大小 数据 数据
需要说明的是,该从站获取的固件数据包为未分包的数据包,从站进行分包的操作,也可以理解为获取的固件数据包为已进行分包之后的数据包,此处不限定。对于该固件数据包的大小说明:每128byte为1个帧,每2kbyte为1各块,1个块包含16个帧,Flash需要按块烧写,一个固件数据包为多个块。
302、主站根据各目标从站的地址信息向各目标从站发送设置帧。
从站接收主站发送的设置帧,该设置帧可以包括如下内容:站地址、功能码(可以自定义为0x20),错误标识(16bit),写FLASH标志(1bit)和可写 标志(1bit)。
其中,该设置帧的数据格式可以为如下所示:
站地址 功能码 错误标志1 错误标志2 Flash标志 可写标志
303、从站接收主站发送的设置帧,并根据设置帧设置从站的状态位的状态值。
可以理解的是,从站可以读取固件数据包的功能码(0x1C),该功能码用于指示该数据包为以广播的方式传输的数据包,从站即接收该固件数据包,或者从站可以读取该数据包中的站地址,根据站地址确认是否接收该固件数据包括。
状态位的不同状态值用于指示固件数据包的接收或存入情况。
从站读取该设置帧中的数据信息,并根据读取的数据设置目标从站的状态位的第一状态值,该第一状态值可以用来表示从站的状态位的初始化值,即未接收固件数据包时的状态值,例如,从站可以将错误标志位设置为“错误”,表明该目标从站还未接收数据;将Flash标志位设置为“未写”,表明该目标从站未有固件数据包写入Flash;将可写标志位设置为“可写”,表明该目标从站为固件需要更新的从站。该从站的状态位的不同状态值用于指示固件数据包的接收或存入情况。在本实施例中将状态位“可写”的从站称为目标从站。
304、从站向主站发送接收设置帧的第一确认信息,
若从站根据设置帧完成设置从站状态位的状态值,即从站完成状态值的初始化设置,从站向主站发送第一确认信息。
305、当主站根据确认信息确认各目标从站初始化设置成功后,广播固件数据包。
由于主站是通过广播的形式传输固件数据包,每一个从站均能接收到主站传输的固件数据包,主站根据确认信息确认初始化主站中每个从站的状态,需要说明的是,主站内存中存储对应的各目标从站的状态。
若在预置时间段内,未收到第N从站的确认信息(N用于区分各从站,可以为标识也可以为序号),则主站重复发送该设置帧,例如,主站重发该设置帧3次,以保证从站可以接收到所述主站发送的设置帧,若主站仍然未收到该目标从站发送的确认信息,主站将该目标从站的状态设置为“无响应”。
若在预置时间段内,主站确认完成了各从站的状态的设置,则主站确认各目标从站初始化设置成功,当主站确认各目标从站初始化设置成功后,执行步骤306。
306、从站接收主站广播的固件数据包。
可以理解的是,此步骤之后的从站为目标从站,目标从站可以读取固件数据包的功能码(0x1C),该功能码用于指示该数据包为以广播的方式传输的数据包,目标从站即可以接收该固件数据包。
307、各目标从站根据固件数据包进行数据更新,并在数据更新过程中调整状态位的状态值。
从站根据固件数据包进行数据更新,在数据更新的过程中将第一状态值调整到第二状态值,该第二状态值用于指示从站更新固件数据包的进行情况。
其中,从站在数据更新的过程中将第一状态值调整到第二状态值的具体过程包括:
从站接收到固件数据包,从站对固件数据包进行CRC校验,若从站判断CRC校验正确,则从站将从站状态位中对应的错误标志从第一状态值的“错误”调整为第二状态值的“正确”,表明从站已接收到该固件数据包。
从站将固件数据包中的数据存到内存中。
若从站判定每一个固件数据包中的错误标志均为“正确”,则从站将固件数据包中的数据写入Flash,并将从站状态位中对应的Flash标志从第一状态值的“未写”调整为“已写”,表明该从站已经将固件数据包中数据写入Flash中。
对写入Flash中的数据进行CRC校验,若CRC校验正确,设置更新标志,以表明从站的固件数据更新完成。
需要说明的是,每个固件数据包由多个块组成,从站对应状态对应的表征一个块的传输状况。从站接收到一个块传完后,将一个块的数据写进Flash然后再接收另一个块,可以理解的是步骤307是一个重复的过程,直到所有数据传输完毕后,从站对写入Flash中的数据进行CRC校验,若CRC校验正确,设置更新标志,以表明从站的固件数据更新完成。
308、主站向各从站发送查询帧。
可以理解的是,主站可以分通信周期广播固件数据包,每一个通信周期一次性广播一个块16个帧的数据,并等待预置时长,由于主站发送广播的固件数据包时,是没有从站会发出响应的,这时主站需要进行查询确认以便使从站能够确认本次通信周期广播的固件数据包传输正确,所以主站会向目标从站发送查询帧,以使从站进行响应。主站向各目标广播数据包的过程中,主站各目标从站发送查询帧。该查询帧用于指示各目标从站反馈各目标从站的状态位的状态值。
309、从站接收主站发的送查询帧。
该查询帧包括站地址和功能码,功能码可以自定义为0x21,查询帧的格式如下所示:
站地址 功能码
310、从站根据查询帧反馈该目标从站的状态位的状态值。
反馈的帧格式与设置从站状态位的帧格式相同。反馈的数据格式为:
站地址 功能码 错误标志1 错误标志2 Flash标志 可写标志
311、当主站接收到各目标从站中的至少一个目标从站返回的状态值时,将至少一个目标从站返回的状态值与至少一个目标从站对应存储;
可以理解的是,主站根据从站返回的状态值在内存中会对应存储各从站的从站状态,根据状态值确定是否重新广播固件数据包。
从站状态还包括:传输错误,写Flash错误等。
站地址 功能码 错误标志1 错误标志2 Flash标志 可写标志
例如,当主站接收到第N个目标从站反馈的第二状态信息中对应的错误标识的状态值为“正确”,则主站将该目标从站的状态位的错误标志的状态值对应存储为“正确”,表明该目标从站已接收到第N个固件数据包且接收到的固件数据包正确。
312、主站根据存储的状态值确定对应目标从站的固件数据包的接收或存入情况。
主站根据接收或存入情况确定是否重新广播对应的固件数据包。
例如:从站判定每一个固件数据包中的错误标志均为“正确”,则从站将 固件数据包中的数据写入Flash,并将从站状态位中对应的Flash标志从第一状态值的“未写”调整为“已写”,表明该从站已经将固件数据包中数据写入Flash中。
若主站未接收到该目标从站反馈的错误标志的状态值为“正确”的第二状态信息,则主站广播重发对应的数据帧,并等待预置时长,以保证从站可以接收到并接收正确的数据帧,若重试3次仍接收错误,主站设置主站中该目标从站对应的从站的状态为“传输错误”。
同理,若主站在预置时长内未接收到该目标从站反馈的对应的Flash标志为“已写”的状态值,则主站将该从站的状态位的状态存储为“Flash错误”。
313、当主站确定各目标从站的对应的状态位均被对应存储且所有固件数据包传输完成,主站向各目标从站发送软复位帧。
当主站确定各从站的对应的状态位均被对应存储且所有固件数据包的数据传输完成,表明主站需要向各从站的广播传输的固件数据包已传输完成,主站向各目标从站发送软复位帧。
314、目标从站接收主站发送的软复位帧。
软复位帧的格式如下:
站地址 功能码
315、从站向主站发送收到第二确认信息。
从站向主站发送的第二确认信息的数据格式与软复位帧的格式相同。
确认信息的数据格式如下:
站地址 功能码
316、目标从站根据软复位帧执行复位操作。
从站根据软复位帧执行复位操作是,根据固件更新标志从Flash区调取已写入的数据,将该已写入的数据调整到实际运行的区域,最终完成对所有从站同时固件升级的任务。
本发明实施例中,通过主站发送查询帧对从接收的数据状态进行查询,主站根据接收或存入情况确定是否重新广播对应的固件数据包,以保证从站能够准确接收到固件数据包。
实施例4
上面对本发明实施例中的用户切换方法进行了描述,下面对本发明实施例中的一种主站进行描述,请参阅图4,本发明实施例中提供一种主站1包括:
获取模块401,用于获取多个目标从站中各目标从站的地址信息,以及多个目标从站的待更新的固件数据包,多个目标从站为需要更新固件数据包的从站。
第一发送模块402,用于根据获取模块401获取的各目标从站的地址信息向各目标从站发送设置帧,以使目标从站根据设置帧设置目标从站的状态位,状态位的不同状态值用于指示固件数据包的接收或存入情况。
第一接收模块403,用于接收目标从站发送的已接收设置帧的确认信息。
数据传输模块404,用于根据第一接收模块403接收的确认信息确认各目标从站初始化设置成功后,广播固件数据包,以使各目标从站根据固件数据包进行数据更新,并在数据更新过程中调整状态位的状态值。
进一步的,主站1还包括:
第二发送模块405,用于向各目标从站发送查询帧,查询帧用于指示各目标从站反馈各目标从站的状态位的状态值。
第二接收模块406,用于接收目标从站发送的状态值。
存储模块407,当第二接收模块406接收到各目标从站中的至少一个目标从站返回的状态值时,将至少一个目标从站返回的第二状态位信息与至少一个目标从站对应存储。
确定模块408,用于根据存储模块407存储的状态值确定对应目标从站的固件数据包的接收或存入情况。
数据传输模块404,还用于根据所述确定模块408确定的所述接收或存入情况重新广播所述固件数据包。
第三发送模块409,用于向各目标从站发送软复位帧,以使目标从站根据软复位帧执行复位操作。
实施例5
请参阅图5所示,本发明实施例提供一种从站2包括:
第三接收模块501,用于接收所主站发送的设置帧。
设置模块502,用于根据第三接收模块501接收的设置帧设置目标从站的状态位,状态位的不同状态值用于指示固件数据包的接收或存入情况。
第四发送模块503,用于根据第三接收模块501接收的设置帧向主站发送确认信息。
第四接收模块504,用于接收主站广播的固件数据包。
数据更新模块505,用于根据第四接收模块504接收的固件数据包进行数据更新,并在数据更新过程中调整状态位的状态值。
执行模块506,用于当目标从站达到预置状态值时,执行复位操作。
第五接收模块507,用于接收主站发的送查询帧。
第五发送模块508,用于根据第五接收模块507接收的查询帧向主站发送各目标从站的状态位的状态值。
进一步的,执行模块506还包括:
接收单元5061,用于接收主站发送的软复位帧。
执行单元5062,用于根据接收单元5061接收的软复位帧执行复位操作。
实施例6
请参阅图6所示,本发明提供了一种从站2固件更新的***,包括:包括主站1和多个从站2。
主站1获取多个从站2中各从站2的地址信息,以及所述多个从站2的待更新的固件数据包,所述多个从站2为需要更新固件数据包的从站2。
所述主站1根据所述各从站2的地址信息向所述各从站2发送设置帧。
所述从站2接收主站1发送的设置帧。
所述从站2根据所述设置帧设置所述从站2的状态位并向所述从站2反馈接收所述设置帧的确认信息,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况。
所述主站1根据所述确认信息确认所述各从站2初始化设置成功后,广播所述固件数据包。
所述从站2接收所述主站1广播的固件数据包并根据所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
进一步的,广播所述固件数据包时,所述主站1向各从站2发送查询帧,所述查询帧用于指示所述各从站2反馈所述各从站2的状态位的状态值。
所述从站2接收所述主站1发的送查询帧。
所述从站2根据所述查询帧反馈所述各从站2的状态位的状态值。
所述主站1接收所述从站2发送的所述状态值。
当所述主站1接收到所述各从站2中的至少一个从站2返回的状态值时,将所述至少一个从站2返回的第二状态位信息与所述至少一个从站2对应存储。
所述主站1根据存储的所述状态值确定对应从站2的所述固件数据包的接收或存入情况。
所述主站1根据所述接收或存入的情况确定重新广播所述固件数据包。
进一步的,所述主站1广播所述固件信息之后,所述主站1向各从站2发送软复位帧。
所述从站2接收所述主站1发送的软复位帧。
所述从站2根据所述软复位帧执行复位操作。
进一步的,所述主站1通过多个通信周期广播所述固件数据包。
所述从站2接收所述主站1多通信周期广播的所述固件数据包。
所述***的具体工作步骤可以参阅实施例1至实施例3对应的具体描述,此处不赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (18)

  1. 一种从站固件更新的方法,其特征在于,包括:
    主站获取多个目标从站中各目标从站的地址信息,以及所述多个目标从站的待更新的固件数据包,所述多个目标从站为需要更新固件数据包的从站;
    所述主站根据所述各目标从站的地址信息向所述各目标从站发送设置帧,以使所述目标从站根据所述设置帧设置所述目标从站的状态位并向所述从站反馈接收所述设置帧的确认信息,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况;
    所述主站根据所述确认信息确认所述各目标从站初始化设置成功后,广播所述固件数据包,以使所述各目标从站根据所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
  2. 根据权利要求1所述的方法,其特征在于,广播所述固件数据包时,所述方法还包括:
    所述主站向各目标从站发送查询帧,所述查询帧用于指示所述各目标从站反馈所述各目标从站的状态位的状态值;
    所述主站接收所述目标从站发送的所述状态值;
    当所述主站接收到所述各目标从站中的至少一个目标从站返回的状态值时,将所述至少一个目标从站返回的第二状态位信息与所述至少一个目标从站对应存储;
    所述主站根据存储的所述状态值确定对应目标从站的所述固件数据包的接收或存入情况;
    所述主站根据所述接收或存入的情况确定重新广播所述固件数据包。
  3. 根据权利要求1或2所述的方法,其特征在于,所述主站广播所述固件信息之后,所述方法还包括:
    所述主站向各目标从站发送软复位帧,以使所述目标从站根据所述软复位帧执行复位操作。
  4. 根据权利要求1或2所述的方法,其特征在于,所述主站广播所述固件数据包包括:
    所述主站通过多个通信周期广播所述固件数据包。
  5. 一种从站固件更新的方法,其特征在于,包括:
    从站接收主站发送的设置帧;
    所述从站根据所述设置帧设置所述从站的状态位并向所述主站发送接收所述设置帧的确认信息,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况;
    所述从站接收所述主站广播的固件数据包;
    所述各从站根据所述固件数据包进行数据更新,并在数据更新过程中调整所述从站状态位的状态值;
    当所述从站达到预置状态值时,所述从站执行复位操作。
  6. 根据权利要求5所述的方法,其特征在于,所述从站接收所述主站广播的固件数据包时,所述方法还包括:
    所述从站接收所述主站发的送查询帧;
    所述从站根据所述查询帧反馈所述各从站的状态位的状态值。
  7. 根据权利要求5或6所述的方法,其特征在于,所述从站执行复位操作包括:
    所述从站接收所述主站发送的软复位帧;
    所述从站根据所述软复位帧执行复位操作。
  8. 根据权利要求5或6所述的方法,其特征在于,所述从站接收所述主站广播的固件数据包包括:
    所述从站接收所述主站多通信周期广播的所述固件数据包。
  9. 一种主站,其特征在于,包括:
    获取模块,用于获取多个目标从站中各目标从站的地址信息,以及所述多个目标从站的待更新的固件数据包,所述多个目标从站为需要更新固件数据包的从站;
    第一发送模块,用于根据所述获取模块获取的各目标从站的地址信息向所述各目标从站发送设置帧,以使所述目标从站根据所述设置帧设置所述目标从站的状态位,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况;
    第一接收模块,用于接收所述目标从站发送的已接收所述设置帧的确认信 息;
    数据传输模块,用于根据所述确认信息确认所述各目标从站初始化设置成功后,广播所述固件数据包,以使所述各目标从站根据所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
  10. 根据权利要求9所述的主站,其特征在于,还包括:
    第二发送模块,用于向各目标从站发送查询帧,所述查询帧用于指示所述各目标从站反馈所述各目标从站的状态位的状态值;
    第二接收模块,用于接收所述目标从站发送的所述状态值;
    存储模块,当所述接收模块接收到所述各目标从站中的至少一个目标从站返回的状态值时,将所述至少一个目标从站返回的第二状态位信息与所述至少一个目标从站对应存储;
    确定模块,用于根据所述存储模块存储的所述状态值确定对应目标从站的所述固件数据包的接收或存入情况;
    所述数据传输模块,还用于根据所述确定模块确定的所述接收或存入情况确定重新广播所述固件数据包。
  11. 根据权利要求9或10所述的主站,其特征在于,还包括:
    第三发送模块,用于向各目标从站发送软复位帧,以使所述目标从站根据所述软复位帧执行复位操作。
  12. 一种从站,其特征在于,包括:
    第三接收模块,用于接收所主站发送的设置帧;
    设置模块,用于根据所述第三接收模块接收的所述设置帧设置所述目标从站的状态位,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况;
    第四发送模块,用于根据所述第三接收模块接收的所述设置帧向所述主站发送确认信息;
    第四接收模块,用于接收所述主站广播的固件数据包;
    数据更新模块,用于根据所述第四接收模块接收的所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值;
    执行模块,用于当所述目标从站达到预置状态值时,执行复位操作。
  13. 根据权利要求12所述的从站,其特征在于,还包括:
    第五接收模块,用于接收所述主站发送的查询帧;
    第五发送模块,用于根据所述第五接收模块接收的所述查询帧向所述主站发送所述各目标从站的状态位的状态值。
  14. 根据权利要求12或13所述的从站,其特征在于,所述执行模块包括:
    接收单元,用于接收所述主站发送的软复位帧;
    执行单元,用于根据所述第五接收单元接收的所述软复位帧执行复位操作。
  15. 一种从站固件更新的***,其特征在于,所述***包括主站和多个从站;
    主站获取多个从站中各从站的地址信息,以及所述多个从站的待更新的固件数据包,所述多个从站为需要更新固件数据包的从站;
    所述主站根据所述各从站的地址信息向所述各从站发送设置帧;
    所述从站接收主站发送的设置帧;
    所述从站根据所述设置帧设置所述从站的状态位并向所述从站反馈接收所述设置帧的确认信息,所述状态位的不同状态值用于指示所述固件数据包的接收或存入情况;
    所述主站根据所述确认信息确认所述各从站初始化设置成功后,广播所述固件数据包;
    所述从站接收所述主站广播的固件数据包并根据所述固件数据包进行数据更新,并在数据更新过程中调整所述状态位的状态值。
  16. 根据权利要求15所述的***,其特征在于,
    广播所述固件数据包时,所述主站向各从站发送查询帧,所述查询帧用于指示所述各从站反馈所述各从站的状态位的状态值;
    所述从站接收所述主站发的送查询帧;
    所述从站根据所述查询帧反馈所述各从站的状态位的状态值;
    所述主站接收所述从站发送的所述状态值;
    当所述主站接收到所述各从站中的至少一个从站返回的状态值时,将所述至少一个从站返回的第二状态位信息与所述至少一个从站对应存储;
    所述主站根据存储的所述状态值确定对应从站的所述固件数据包的接收或存入情况;
    所述主站根据所述接收或存入的情况确定重新广播所述固件数据包。
  17. 根据权利要求15或16所述的***,其特征在于,所述主站广播所述固件信息之后,
    所述主站向各从站发送软复位帧;
    所述从站接收所述主站发送的软复位帧;
    所述从站根据所述软复位帧执行复位操作。
  18. 根据权利要求15或16所述的***,其特征在于,所述主站广播所述固件数据包包括:
    所述主站通过多个通信周期广播所述固件数据包;
    所述从站接收所述主站多通信周期广播的所述固件数据包。
PCT/CN2015/099328 2015-12-29 2015-12-29 一种从站固件更新的方法、***、主站及从站 WO2017113080A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/099328 WO2017113080A1 (zh) 2015-12-29 2015-12-29 一种从站固件更新的方法、***、主站及从站
CN201580084468.6A CN108293060B (zh) 2015-12-29 2015-12-29 一种从站固件更新的方法、***、主站及从站

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/099328 WO2017113080A1 (zh) 2015-12-29 2015-12-29 一种从站固件更新的方法、***、主站及从站

Publications (1)

Publication Number Publication Date
WO2017113080A1 true WO2017113080A1 (zh) 2017-07-06

Family

ID=59224004

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/099328 WO2017113080A1 (zh) 2015-12-29 2015-12-29 一种从站固件更新的方法、***、主站及从站

Country Status (2)

Country Link
CN (1) CN108293060B (zh)
WO (1) WO2017113080A1 (zh)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI703836B (zh) * 2019-11-26 2020-09-01 台達電子工業股份有限公司 基於EtherCAT協定的資料交握方法
CN111639876A (zh) * 2020-06-07 2020-09-08 杨益 一种主站连接与计算***
CN111817939A (zh) * 2020-07-22 2020-10-23 浙江中控技术股份有限公司 基于工业以太网协议的主站冗余实现***及方法
CN112565041A (zh) * 2020-12-18 2021-03-26 杭州和利时自动化有限公司 一种ff现场总线***的硬件信息配置方法、装置及介质
CN112929251A (zh) * 2021-02-07 2021-06-08 深圳市显控科技股份有限公司 基于can的从站数据刷新方法、装置及***
CN113039546A (zh) * 2019-02-26 2021-06-25 深圳配天智能技术研究院有限公司 主从设备通信***及方法
CN114244753A (zh) * 2021-11-29 2022-03-25 上海繁易信息科技股份有限公司 基于rs485总线的多个上位机与控制器快速通讯结构及快速通讯方法
CN114268539A (zh) * 2021-12-22 2022-04-01 中国长江三峡集团有限公司 自动进行Powerlink主站配置下发并监视的前置处理方法及***
CN116028387A (zh) * 2023-01-31 2023-04-28 惠州市海葵信息技术有限公司 数据处理方法、从站、主站以及存储介质
CN116980290A (zh) * 2023-09-22 2023-10-31 北京智芯微电子科技有限公司 红外通讯升级方法、装置和电子设备
CN117784699A (zh) * 2024-02-28 2024-03-29 深圳市瑞天激光有限公司 一种通讯方法、装置及***

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941179B (zh) * 2019-12-09 2023-03-31 杭州和利时自动化有限公司 一种无扰下装方法、装置、设备及可读存储介质
CN112035135A (zh) * 2020-08-07 2020-12-04 珠海格力电器股份有限公司 从站设备的固件程序更新方法、设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546784A (zh) * 2011-12-29 2012-07-04 深圳市迈进科技有限公司 一种基于can总线进行批量升级设备固件的方法
JP2012252552A (ja) * 2011-06-03 2012-12-20 Fujitsu Ltd 配信方法及び配信システム
CN104980956A (zh) * 2015-06-29 2015-10-14 迈锐数据(北京)有限公司 远程批量更新节点固件的方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010198332A (ja) * 2009-02-25 2010-09-09 Canon Inc ファームウェア更新装置、ファームウェア更新システム、ファームウェア更新方法、およびファームウェア更新プログラム
WO2012159369A1 (zh) * 2011-08-05 2012-11-29 华为技术有限公司 门户应用组件信息的传递方法及从站和主站
CN102945181A (zh) * 2012-12-03 2013-02-27 钜泉光电科技(上海)股份有限公司 基于电力线来进行设备软件更新的方法
CN103414547B (zh) * 2013-07-22 2017-10-10 大唐移动通信设备有限公司 一种主站控制多从站的方法、主站以及***
CN105049309B (zh) * 2015-07-29 2018-03-09 上海新时达电气股份有限公司 基于powerlink实时以太网的伺服驱动器同步方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012252552A (ja) * 2011-06-03 2012-12-20 Fujitsu Ltd 配信方法及び配信システム
CN102546784A (zh) * 2011-12-29 2012-07-04 深圳市迈进科技有限公司 一种基于can总线进行批量升级设备固件的方法
CN104980956A (zh) * 2015-06-29 2015-10-14 迈锐数据(北京)有限公司 远程批量更新节点固件的方法

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113039546A (zh) * 2019-02-26 2021-06-25 深圳配天智能技术研究院有限公司 主从设备通信***及方法
TWI703836B (zh) * 2019-11-26 2020-09-01 台達電子工業股份有限公司 基於EtherCAT協定的資料交握方法
CN111639876A (zh) * 2020-06-07 2020-09-08 杨益 一种主站连接与计算***
CN111817939A (zh) * 2020-07-22 2020-10-23 浙江中控技术股份有限公司 基于工业以太网协议的主站冗余实现***及方法
CN112565041A (zh) * 2020-12-18 2021-03-26 杭州和利时自动化有限公司 一种ff现场总线***的硬件信息配置方法、装置及介质
CN112929251B (zh) * 2021-02-07 2022-09-09 深圳市显控科技股份有限公司 基于can的从站数据刷新方法、装置及***
CN112929251A (zh) * 2021-02-07 2021-06-08 深圳市显控科技股份有限公司 基于can的从站数据刷新方法、装置及***
CN114244753A (zh) * 2021-11-29 2022-03-25 上海繁易信息科技股份有限公司 基于rs485总线的多个上位机与控制器快速通讯结构及快速通讯方法
CN114244753B (zh) * 2021-11-29 2023-09-29 上海繁易信息科技股份有限公司 基于rs485总线的多个上位机与控制器快速通讯方法
CN114268539A (zh) * 2021-12-22 2022-04-01 中国长江三峡集团有限公司 自动进行Powerlink主站配置下发并监视的前置处理方法及***
CN114268539B (zh) * 2021-12-22 2023-09-12 中国长江三峡集团有限公司 自动进行Powerlink主站配置下发并监视的前置处理方法及***
CN116028387A (zh) * 2023-01-31 2023-04-28 惠州市海葵信息技术有限公司 数据处理方法、从站、主站以及存储介质
CN116980290A (zh) * 2023-09-22 2023-10-31 北京智芯微电子科技有限公司 红外通讯升级方法、装置和电子设备
CN116980290B (zh) * 2023-09-22 2024-01-26 北京智芯微电子科技有限公司 红外通讯升级方法、装置和电子设备
CN117784699A (zh) * 2024-02-28 2024-03-29 深圳市瑞天激光有限公司 一种通讯方法、装置及***
CN117784699B (zh) * 2024-02-28 2024-05-28 深圳市瑞天激光有限公司 一种通讯方法、装置及***

Also Published As

Publication number Publication date
CN108293060A (zh) 2018-07-17
CN108293060B (zh) 2021-06-08

Similar Documents

Publication Publication Date Title
WO2017113080A1 (zh) 一种从站固件更新的方法、***、主站及从站
WO2018202177A1 (zh) Zigbee设备的固件升级方法和装置
US11321070B2 (en) Online upgrade method and apparatus for Bluetooth cluster
CN102546784B (zh) 一种基于can总线进行批量升级设备固件的方法
KR101383691B1 (ko) 무선 메쉬 네트워크에서의 협력적 무선 펌웨어 업데이트 장치 및 방법
CN110636483A (zh) 一种配网方法及***
CN103685487A (zh) 无线通信网络中的子节点升级方法
CN110855496B (zh) 一种基于sig mesh的ota升级方法
US11991599B2 (en) Configuring a multicast or broadcast wireless network
CN106961426B (zh) 智能设备的通讯方法及装置
US20200359442A1 (en) Network distribution and pairing method, control terminal, device and server
CN103391215A (zh) 一种基于链状网的远程软件下载与更新方法、装置及***
CN112367259B (zh) 物联网数据报文分发方法及装置
WO2019037458A1 (zh) 通信方法和装置
WO2016173128A1 (zh) 一种软件版本的下载方法及装置、存储介质
CN113721966A (zh) 节点升级方法、装置、存储介质及电子装置
WO2012051906A1 (zh) 机顶盒无线升级方法及其控制终端
CN110635957A (zh) 用于物联设备配网的方法和装置、移动终端
JP2016218660A (ja) センサ情報伝送装置、センサ、センサ情報伝送システム、センサ情報伝送方法およびセンサ情報伝送プログラム
CN104077152A (zh) 一种嵌入式***批量升级的方法及装置
CN104079371A (zh) 一种数据通信方法、设备及***
WO2021223247A1 (zh) 一种设备升级方法、智能设备及计算机可读存储介质
EP2571321B1 (en) Method and device for controlling channel transmission
US20190020730A1 (en) Method of transferring software files in a short range wireless network
CN104754550A (zh) 一种Diameter消息传递方法、装置及***

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15911711

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15911711

Country of ref document: EP

Kind code of ref document: A1