Sensor, related method and network
By comparing the identifier in the updated data frame with the predetermined sensor identifier in the sensor, the software is only updated when compatible, solving the problem of sensor failure caused by software updates and hardware incompatibility, ensuring the normal operation of the sensor and the certification of measurement results. .
Patent Information
- Application Number
- CN202410239772.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-08
- Filing Date
- 2024-03-04
- Publication Date
- 2024-09-10
AI Technical Summary
In a mesh network, when a sensor's software is updated, if the current version of the software is incompatible with the hardware, the sensor may not work properly, causing the measurement results to be unqualified or the sensor to be defective.
By receiving an updated data frame containing headers and data, comparing the identifier in the data frame with the predetermined sensor identifier, updating the software if it is compatible, and resetting the sensor after the update; if it is not compatible, sending an unupdated data frame to Avoid incompatible software updates.
Ensure that the sensor's hardware is updated only when it is compatible with the updated software to avoid sensor malfunctions or defects and ensure proper functioning of the sensor and certification of measurement results.
Smart Images

Figure CN118632205A
Abstract
Description
Technical Field
[0001] The invention relates to a sensor.
[0002] More particularly, the present invention relates to updating software stored in a memory of a sensor. Background Art
[0003] Typically, a network may include multiple sensors that communicate wirelessly with a gateway to transmit measurements.
[0004] Sensors can have different hardware versions.
[0005] The first sensor may have first hardware and include a memory storing a first version of software implementing the first hardware.
[0006] The first hardware is only compatible with the first version of the software.
[0007] The software may be firmware.
[0008] In a mesh network, during an update of software, a gateway transmits an update request to multiple sensors including the current version of the software.
[0009] Upon receiving the request, each sensor updates the current version of the software stored in its memory.
[0010] If the current version of the software is not compatible with the first hardware, the first sensor may not work properly, such that measurements sent by the first sensor are not certified or the first sensor may be defective.
[0011] The present invention therefore aims to prevent the updating of software stored in the memory of a sensor having hardware that is incompatible with the updated software. Summary of the invention
[0012] According to an aspect, a method for updating software stored in a first memory of a sensor is proposed.
[0013] The method includes:
[0014] - receiving a first data frame requesting to update a current version of software stored in the first memory, the first data frame comprising a header and data for updating the current version of software, the header comprising a first identifier and a second identifier,
[0015] - comparing said first identifier with a predetermined sensor identifier stored in a second memory of said sensor, and
[0016] - When the first identifier includes the predetermined sensor identifier, updating the current version of software according to the data of the first data frame.
[0017] The current software version stored in the sensor is updated only if the updated software version is compatible with the hardware of the sensor identified by a predetermined sensor identifier to avoid malfunction or defect of the sensor.
[0018] Preferably, the step of updating the current version of the software includes:
[0019] - replacing the current version of the software with the data in said first memory,
[0020] - resetting the sensor when the current version of the software is replaced by the data in the first memory, and
[0021] - when the sensor is reset, transmitting a second data frame including the second identifier.
[0022] Advantageously, when said first identifier does not comprise said predetermined sensor identifier, the method comprises transmitting a third data frame representing a non-updated software.
[0023] According to another aspect, a sensor is provided.
[0024] The sensor comprises:
[0025] - a first memory configured to: store software,
[0026] - a communication means configured to: receive a first data frame requesting to update a current version of software stored in the first memory, the first data frame comprising a header and data for updating the current version of software, the header comprising a first identifier and a second identifier,
[0027] - a second memory configured to: store a predetermined sensor identifier,
[0028] - a comparison means configured to compare said first identifier with said predetermined sensor identifier, and
[0029] - a processing component configured to: when the first identifier includes the predetermined sensor identifier, update the current version of software according to the data of the first data frame.
[0030] Advantageously, the processing means is configured to:
[0031] - replacing the current version of software stored in said first memory with the data in said first memory,
[0032] - resetting the sensor when the current version of the software is replaced by the data in the first memory, and
[0033] - when the sensor is reset, sending ( / transmitting) a second data frame including the second identifier.
[0034] Preferably, the processing component is configured to: when the first identifier does not include the predetermined sensor identifier, transmit a third data frame indicating that the software is not updated.
[0035] According to another aspect, a network is presented.
[0036] The network includes:
[0037] - Gateway,
[0038] - at least one sensor as described above, said communication means being configured to communicate wirelessly with said gateway,
[0039] The gateway is configured to send the first data frame.
[0040] Advantageously, the gateway is further configured to receive at least the second data frame transmitted by the processing component of the sensor.
[0041] Preferably, the network further comprises a network supervisor, and the network supervisor is configured to monitor the update of the software according to a data frame transmitted by the processing component of the sensor.
[0042] Advantageously, the network is a mesh network. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Other advantages and features of the invention will emerge from an examination of the detailed description of embodiments which are by no means limiting and of the accompanying drawings, in which:
[0044] - Figure 1schematically illustrates an example of a network according to the present invention; and
[0045] - Figures 2 to 5 An example of an example of implementing a network according to the present invention is shown. DETAILED DESCRIPTION
[0046] Referring to the example of network 1 Figure 1 , the network 1 includes a gateway 2 , a network supervisor 3 connected to the gateway 2 , a first sensor 4 and a second sensor 5 .
[0047] Network 1 is a star mesh.
[0048] In a variant, the network 1 comprises more than two sensors.
[0049] The gateway 2 comprises an emission means 6 and a receiving means 7 .
[0050] Each of the first sensor 4 and the second sensor 5 includes a first memory 8 , 9 , a second memory 10 , 11 , a communication component 12 , 13 , a comparison component 14 , 15 , and a processing component 16 , 17 .
[0051] The first sensor 4 and the second sensor 5 are implemented by the processing components 16 , 17 from software (eg firmware).
[0052] The first memory 8 of the first sensor 4 stores software of the first version SOFT-10, and the first memory 9 of the second sensor 5 stores software of the second version SOFT-20.
[0053] The software of the first version SOFT-10 is the current version of the software implemented by the first sensor 4 , and the software of the second version SOFT-20 is the current version of the software implemented by the second sensor 5 .
[0054] The second memory 10 of the first sensor 4 stores the first predetermined sensor identifier ID1 , and the second memory 11 of the second sensor 5 stores the second predetermined sensor identifier ID2 .
[0055] The first predetermined sensor identifier ID1 and the second predetermined sensor identifier ID2 are assigned to the sensors 4 , 5 during manufacture of the sensors 4 , 5 .
[0056] The first predetermined sensor identifier ID1 and the second predetermined sensor identifier ID2 indicate versions of hardware of the first sensor 4 and the second sensor 5 .
[0057] The second memory 10, 11 may be a non-volatile memory.
[0058] The hardware version of the first sensor 4 identified by the first predetermined sensor identifier ID1 is implemented by software of the first version SOFT-10, and the hardware version of the second sensor 5 identified by the second predetermined sensor identifier ID2 is implemented by software of the second version SOFT-20.
[0059] The communication components 12 , 13 of the first sensor 4 and the second sensor 5 communicate with the transmitting component 6 and the receiving component 7 of the gateway 2 .
[0060] Each of the first sensor 4 and the second sensor 5 further comprises a measuring component 18 , 19 .
[0061] The measuring means 18 , 19 of the first sensor 4 and the second sensor 5 each comprise, for example, a measuring interface which measures the temperature outside said sensor 4 , 5 and / or measures the vibrations of the machine on which the sensor 4 , 5 is fixed.
[0062] Each processing means 16 , 17 of the first sensor 4 and the second sensor 5 comprises, for example, a processing unit implementing the first memory 8 , 9 , the second memory 10 , 11 , the communication means 12 , 13 , the comparison means 14 , 15 and the measurement means 18 , 19 .
[0063] The first sensor 4 , the second sensor 5 and the gateway 2 may perform wireless communication using, for example, a mesh protocol or a Bluetooth protocol.
[0064] In a variant, the first memory 8 , 9 and the second memory 10 , 11 of each sensor 4 , 5 may be one memory.
[0065] Figures 2 to 5 An example of an example of implementing a network 1 for updating software stored in a first memory 8 of a first sensor 4 and in a first memory 9 of a second sensor 5 is shown.
[0066] In the first step 20( Figure 2 ), the transmitting component 6 of the gateway 2 sends a first data frame S6 requesting a software update, such as Figure 3 shown.
[0067] Figure 4 An example of a first data frame S6 is schematically shown.
[0068] The first data frame S6 includes a header H6 and data D6. The header H6 includes a first identifier and a second identifier. The data D6 is used for updating software.
[0069] The first identifier indicates a version of hardware that is compatible with the update of the software, and the second identifier indicates a version of the software.
[0070] It is assumed that the update of the software is compatible with the hardware version identified by the first predetermined sensor identifier ID1, so that the first identifier of the first data frame S6 is ID1.
[0071] Assume that the software update version is identified by the second identifier SOFT-11.
[0072] In step 21( Figure 2 ), when the communication component 12 of the first sensor 4 receives the first data frame S6, the comparison component 14 of the first sensor 4 compares the first predetermined sensor identifier ID1 stored in the first memory 8 of the first sensor 4 with the first identifier ID1 of the first data frame S6.
[0073] Since the first predetermined sensor identifier ID1 of the first sensor 4 is the same as the first identifier ID1 of the first data frame S6, in step 22, the processing component 16 of the first sensor 4 updates the current version of the software stored in the second memory 10 of the first sensor 4 according to the data D6 of the first data frame S6.
[0074] The processing unit 16 replaces the software of the current version SOFT-10 with the data of the data frame S6 in the first memory 8, so that the software of the version SOFT-11 is stored in the first memory 8 of the first sensor 4 ( Figure 5 ).
[0075] When the software of the current version SOFT-10 stored in the first memory 8 is replaced by the data D6 of the first data frame S6 in the first memory 8, the processing component 16 resets the first sensor 4 to set up the software update.
[0076] When the first sensor 4 is reset, the communication component 12 of the first sensor 4 transmits a second data frame S4 including the second identifier SOFT-11 of the first data frame S6.
[0077] Similarly, in step 21 ( Figure 2), when the communication component 13 of the second sensor 5 receives the first data frame S6, the comparison component 15 of the second sensor 5 compares the first predetermined sensor identifier ID2 stored in the first memory 9 of the second sensor 5 with the first identifier ID1 of the first data frame S6.
[0078] Since the second predetermined sensor identifier ID2 of the second sensor 5 is different from the first identifier ID1 of the first data frame S6 , the processing component 17 of the second sensor 5 does not update the current version of the software stored in the second memory 11 of the second sensor 5 .
[0079] In step 23, the communication component 13 of the second sensor 5 transmits a third data frame S5, which indicates that the software stored in the first memory 9 of the second sensor 5 is not updated (non-update) ( Figure 5 ).
[0080] The second data frame S4 and the third data frame S5 may be transmitted by the gateway 2 to the network supervisor 3 .
[0081] The network supervisor 3 collects the second data frame S4 and the third data frame S5 transmitted by the plurality of sensors 4 and 5 to monitor the update of the software of the plurality of sensors 4 and 5 of the network 1 .
[0082] The network supervisor 3 may include a human-machine interface (eg, a display interface ( / display interface) (not shown)) to inform users of the network 1 of the updated status of each sensor 4, 5 of the network 1.
[0083] The proposed method for updating software stored in sensors 4 , 5 prevents updating of sensors 4 , 5 with software versions (eg firmware versions) that are incompatible with said sensors 4 , 5 , in order to avoid malfunctions or defects of said sensors.
[0084] In another example, the first identifier of the header H6 of the first data frame S6 includes an identifier range representing multiple versions of hardware compatible with the update of the software, so that when the first data frame S6 is received, the current version of the software of the sensor having a predetermined sensor identifier included in the identifier range of the first identifier of the header H6 is updated.
[0085] For example, it is assumed that the first identifier of the header H6 includes a first predetermined sensor identifier ID1 and a second predetermined sensor identifier ID2.
[0086] In step 22, since the first predetermined sensor identifier ID1 of the first sensor 4 and the second predetermined sensor identifier ID2 of the second sensor 5 are included in the first identifier of the first data frame S6, in step 22, the processing component 16 of the first sensor 4 updates the current version of the software stored in the second memory 10 of the first sensor 4 according to the data D6 of the first data frame S6, and the processing component 17 of the second sensor 5 updates the current version of the software stored in the second memory 11 of the second sensor 5 according to the data D6 of the first data frame S6.
[0087] The proposed method for updating software also allows updating different versions of hardware implemented in sensors by sending only one first data frame S6 to a plurality of sensors, so that only the current version of software of sensors having hardware compatible with the updated software is updated.
Claims
1. A method for updating software stored in a first memory (8, 9) of a sensor (4, 5), comprising: - receiving a first data frame (S6) requesting to update a current version of software stored in said first memory (8, 9), said first data frame (S6) comprising a header (H6) and data (D6) for updating the current version of software, said header comprising a first identifier (ID1) and a second identifier (SOFT-11), - comparing said first identifier (ID1) with a predetermined sensor identifier (ID1, ID2) stored in a second memory (10, 11) of said sensor, and - when the first identifier (ID1) includes the predetermined sensor identifier (ID1), updating the current version of software according to the data (D6) of the first data frame (S6).
2. The method according to claim 1, characterized in that The steps to update the current version of the software are: - replacing the current version of the software with the data (D6) in said first memory (8), - resetting the sensor (4) when the current version of the software is replaced by the data (D6) in the first memory (8, 9), and - When the sensor (4) is reset, sending a second data frame (S4) comprising the second identifier (SOFT-11).
3. The method according to claim 1 or 2, characterized in that: When the first identifier (ID1) does not include the predetermined sensor identifier (ID2), the method includes transmitting a third data frame (S5) indicating that the software is not updated.
4. A sensor (4, 5), comprising: - a first memory (8, 9), configured to: store software, - a communication means (12, 13) configured to: receive a first data frame (S6) requesting to update a current version of software stored in the first memory (8, 9), the first data frame (S6) comprising a header (H6) and data (D6) for updating the current version of software, the header comprising a first identifier (ID1) and a second identifier (SOFT-11), - a second memory (10, 11) configured to: store a predetermined sensor identifier (ID1, ID2), - a comparison means (14, 15) configured to compare said first identifier (ID1) with said predetermined sensor identifier (ID1, ID2), and - a processing component (16, 17) configured to update a current version of software according to data (D6) of the first data frame (S6) when the first identifier (ID1) includes the predetermined sensor identifier (ID1).
5. The sensor according to claim 4, characterized in that The processing components (16, 17) are configured to: - replacing the current version of the software stored in said first memory (8, 9) with the data (D6) in said first memory (8, 9), - resetting said sensors (4, 5) when the current version of the software is replaced by the data (D6) in said first memory (8, 9), and - When the sensor (4) is reset, sending a second data frame (S5) comprising the second identifier (SOFT-11).
6. The sensor according to claim 4 or 5, characterized in that: The processing component (16, 17) is configured to send a third data frame (S5) indicating that the software is not updated when the first identifier (ID1) does not include the predetermined sensor identifier (ID2).
7. A network (1), comprising: - Gateway (2), - at least one sensor (4, 5) according to any one of claims 4 to 6, the communication means (12, 13) being configured to communicate wirelessly with the gateway (2), The gateway (2) is configured to send the first data frame (S6).
8. A network according to claim 7 as appended to claim 5 or 6, characterised in that The gateway (2) is also configured to at least receive the second data frame (S4) sent by the processing component (16, 17) of the sensor (4, 5).
9. The network according to claim 8, characterized in that It also comprises a network supervisor (3), which is configured to monitor the update of the software according to the data frames (S4, S5) sent by the processing components (16, 17) of the sensors (4, 5).
10. The network according to any one of claims 7 to 9, characterized in that The network (1) is a mesh network.
