An upgrade management method for a smart meter 4G module

By adding imageInfoTable information to the firmware package of the smart meter 4G module, upgrade management for multiple transmission paths is achieved, solving the problem of complex firmware update management and improving upgrade efficiency and scalability.

CN116249136BActive Publication Date: 2026-01-13JIANGSU LINYANG ENERGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211655775.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-22
Publication Date
2026-01-13
Estimated Expiration
2042-12-22

AI Technical Summary

Technical Problem

In the existing technology, firmware update management of 4G modules for smart meters is complex, especially in terms of version updates, firmware package distribution, and function expansion.

Method used

Add imageInfoTable information at the beginning of the upgrade firmware package. Upgrade by parsing the attributes in this information and calling the corresponding upgrade interface, including version identification, information integrity verification and attribute validity judgment. Supports multiple transmission methods such as UART/485, 4G-LTE network and DLMS protocol.

Benefits of technology

It simplifies the OTA upgrade management of 4G modules, supports multiple upgrade methods, facilitates function expansion and firmware package transmission, and improves management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116249136B_ABST
    Figure CN116249136B_ABST
Patent Text Reader

Abstract

The application discloses an upgrade management method for a smart meter 4G module, which adds imageInfoTable information at the starting position of an upgrade firmware package, and calls a corresponding upgrade interface according to the attributes defined in the information to perform upgrade. The application simplifies the management of OTA upgrade of the 4G module through different ways and different modes, and facilitates the expansion of the upgrade function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart meters, and more specifically, to a management method for various OTA upgrades of a 4G module of a smart meter. Background Technology

[0002] Currently, 4G-LTE technology has begun to be widely adopted and applied globally. The solution for data collection from smart meters through 4G-LTE networks is becoming increasingly mature. With the development of technology and the updating of customer needs, the ways and means of updating the firmware of 4G modules have also become more diversified. 4G modules deployed in the field will face the problem of version updates, which makes the distribution of firmware packages, the development and expansion of upgrade functions face complex management issues. Summary of the Invention

[0003] The purpose of this invention is to address the management issues related to the distribution, upgrading, and expansion of firmware packages by proposing an upgrade management method for 4G modules of smart meters.

[0004] The technical solution of this invention is:

[0005] This invention provides an upgrade management method for 4G modules of smart meters. The method adds imageInfoTable information at the beginning of the upgrade firmware package and calls the corresponding upgrade interface to perform the upgrade according to the attributes defined in the information.

[0006] Furthermore, it includes the following steps:

[0007] Extract the upgrade firmware package from the 4G module file system and read the imageInfoTable information;

[0008] Check whether the 4G module supports the version identifier marked with unique text, and record the results;

[0009] For the supported results, perform information integrity verification;

[0010] For imageInfoTable information that passes integrity verification, parse the attribute information and call the corresponding upgrade interface to upgrade and activate based on the attributes.

[0011] Furthermore, the information integrity verification specifically involves: storing imageInfoTableCrc in the imageInfoTable information at addresses 0x0000E to 0x0000F, calculating the CRC value in the imageInfoTable information from address 0x00010 to 0x001FF, comparing the calculated CRC value with imageInfoTableCrc, and recording an integrity anomaly if they do not match, otherwise continuing.

[0012] Furthermore, after parsing the attribute information, the validity of each attribute is determined. For illegal attributes, the firmware upgrade is terminated, and for valid attributes, firmware activation is initiated.

[0013] Furthermore, the upgrade firmware package is obtained as follows:

[0014] The PC transmits the upgrade firmware package to the electricity meter via the optical port, and the electricity meter transmits the upgrade firmware package to the 4G module via UART / 485. The electricity meter and the 4G module use the local communication HDLC protocol.

[0015] Alternatively, the main station will transmit the upgrade firmware package to the 4G module via the 4G-LTE network, and the main station and the 4G module will communicate using the standard IoT protocol.

[0016] Alternatively, the master station transmits the upgrade firmware package to the meter via the 4G module. The meter temporarily stores the package in its FLASH memory. Communication between the master station and the meter uses the DLMS protocol. After the upgrade firmware package is fully transmitted to the meter, the meter then transmits the upgrade firmware package to the 4G module via UART / 485.

[0017] Furthermore, the imageInfoTable information includes:

[0018] The system includes: Unique Text (version identifier), imageInfoTableCrc (information integrity check bit), UpgradeMode (firm upgrade mode), imageType (firm upgrade firmware type), Image Size (firm firmware size), imageSignature (firm firmware integrity check signature), AppVersion (app layer firmware version), KernelVersion (kernel version), and Reserved (reserved area).

[0019] Furthermore, the firmware upgrade mode UpgradeMode is a URL address, and the firmware is downloaded and reactivated via FTP or HTTP.

[0020] Furthermore, the upgrade firmware type imageType includes:

[0021] First category firmware: Full package upgrade firmware for APP; Second category firmware: Full package upgrade firmware for Kernel; Third category firmware: Full package upgrade firmware for both APP and Kernel; Fourth category firmware: Differential package upgrade firmware for APP; Fifth category firmware: Differential package upgrade firmware for Kernel; Sixth category firmware: Differential package upgrade firmware for both APP and Kernel; Seventh category firmware: Upgrade firmware with FTP download address; Eighth category firmware: Upgrade firmware with HTTP download address.

[0022] Furthermore, the upgrade activation is performed by calling the corresponding upgrade interface based on the attributes, specifically as follows:

[0023] Firmware activation involves identifying the firmware upgrade mode (UpgradeMode) in the properties, and further identifying the corresponding upgrade firmware type (imageType) under the specified mode. The upgrade interface is called based on the upgrade firmware type. After a successful call, the 4G module undergoes a soft reset and begins the activation and upgrade process. The upgrade result is recorded after the reset.

[0024] The beneficial effects of this invention are:

[0025] This invention simplifies the management of OTA upgrades of 4G modules through different methods and approaches, and facilitates the expansion of upgrade functions.

[0026] This invention adds imageInfoTable information containing special information to the beginning of the original firmware package. The upgrade firmware package can be saved to the 4G module file system through various transmission methods. Then, the corresponding upgrade activation method is realized by parsing the attributes contained in the imageInfoTable.

[0027] Other features and advantages of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0028] The above and other objects, features and advantages of the present invention will become more apparent from the more detailed description of exemplary embodiments of the invention in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the invention.

[0029] Figure 1 A schematic diagram of the information storage structure of imageInfoTable is shown.

[0030] Figure 2 A block diagram illustrating the download path for the upgraded firmware package of the present invention is shown.

[0031] Figure 3 A flowchart illustrating the firmware upgrade process of this invention is shown.

[0032] Figure 4 The firmware upgrade activation process of the present invention is illustrated. Detailed Implementation

[0033] Preferred embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0034] This invention provides an upgrade management method for 4G modules in smart meters. The method adds imageInfoTable information to the beginning of the upgrade firmware package and calls the corresponding upgrade interface based on the attributes defined in the information to perform the upgrade. The method includes the following steps:

[0035] Extract the upgrade firmware package from the 4G module file system and read the imageInfoTable information;

[0036] Check whether the 4G module supports the version identifier marked with unique text, and record the results;

[0037] For the supported results, perform information integrity verification;

[0038] For imageInfoTable information that passes integrity verification, parse the attribute information and call the corresponding upgrade interface to upgrade and activate based on the attributes.

[0039] Among them: imageInfoTable information is as follows Figure 1 As shown, the storage structure is explained below:

[0040] The imageInfoTable is 512 bytes in size and uses big-endian data format.

[0041] Unique Text: The imageInfoTable version identifier is used to identify the version of the upgrade file information table used by this upgrade file. The example is fixed as "xxxxxxxxFOTA01".

[0042] imageInfoTableCrc: ImageInfoTable information integrity check bit, the check value for the imageInfoTable area address 0x10~0x200, using the CRC-16 algorithm, polynomial 1021, initial value 0xFFFF, LSB First, and the result XOR value 0xFFFF.

[0043] UpgradeMode: Firmware upgrade mode. Full package upgrade is defined as 0x00, indicating that the data in the area from the starting address 0x200 to 0x200+ImageSize is the full firmware package; differential package upgrade is defined as 0x01, indicating that the data in the area from the starting address 0x200 to 0x200+ImageSize is the differential firmware package; upgrade firmware data as a URL address is defined as 0x03, indicating that the data in the area from the starting address 0x200 to 0x200+ImageSize is the download address of the upgrade firmware file, which can be downloaded and activated via FTP or HTTP.

[0044] imageType: Upgrade firmware type. The firmware type for APP layer upgrade is defined as 0x00, the firmware type for Kernel layer upgrade is defined as 0x01, and the firmware type for both APP and Kernel upgrade is defined as 0x02.

[0045] Image Size: The size from the file start address 0x200 to the effective firmware end, which is the actual firmware size transmitted when calling the upgrade interface provided by the 4G module.

[0046] imageSignature: The actual firmware integrity verification signature after address 0x200, used to identify whether the actual firmware is complete.

[0047] When AppVersion:imageType is 0x00 or 0x02, it represents the firmware version number of the app layer, and the remaining space is padded with 0s; otherwise, it is all 0xFF.

[0048] KernelVersion: If imageType is 0x01 or 0x02, fill in the target kernel version to be upgraded, and fill the remaining space with 0. If imageType is 0x00, it means that the APP upgrade firmware is suitable for this kernel version; otherwise, it is all 0xFF.

[0049] Reserved: The entire reserved area is 0xFF.

[0050] Based on the upgrade firmware type imageType defined in the imageInfoTable attribute, the following types of original firmware entities can be generated: Type 1 firmware: APP full package upgrade firmware; Type 2 firmware: Kernel full package upgrade firmware; Type 3 firmware: APP & Kernel full package upgrade firmware; Type 4 firmware: APP differential package upgrade firmware; Type 5 firmware: Kernel differential package upgrade firmware; Type 6 firmware: APP & Kernel differential package upgrade firmware; Type 7 firmware: upgrade firmware FTP download address firmware; Type 8 firmware: upgrade firmware HTTP download address firmware.

[0051] The generated imageInfoTable information is added to the firmware entity starting address 0x00 based on the attribute definitions within the imageInfoTable information, thus generating the upgrade firmware.

[0052] like Figure 1 The firmware upgrade can be transmitted in the following ways.

[0053] a. The PC transmits the upgrade firmware to the electricity meter via the optical port, and the electricity meter transmits the upgrade firmware to the 4G module via UART / 485. The local communication protocol between the electricity meter and the 4G module can be HDLC.

[0054] b. The master station will transmit the firmware to the 4G module through the 4G-LTE network. The interaction between the master station and the 4G module can be achieved through standard IoT protocols such as LWM2M and MQTT.

[0055] c. The master station transmits the upgrade firmware to the meter via the 4G module. The meter temporarily stores the firmware in its FLASH memory. At this time, the 4G module mainly serves as a transparent transmission tool for communication between the meter and the master station. Communication between the master station and the meter usually follows the DLMS protocol. After the upgrade firmware is fully transmitted to the meter, the meter then transmits the upgrade firmware to the 4G module via UART / 485.

[0056] like Figure 2 As shown, the firmware upgrade process is invoked after the upgrade firmware is saved in the 4G module file system.

[0057] d. Read firmware imageInfoTable information from the file system.

[0058] e. Check if the 4G module supports the version of the unique Text tag in the imageInfoTable information.

[0059] The f.imageInfoTable integrity check calculates the CRC of the imageInfoTable information and compares it with the imageInfoTableCrc to see if they match.

[0060] g. Read and parse the remaining attribute information in the imageInfoTable. Determine the validity of each attribute based on its definition. If an invalid attribute is found, terminate the firmware upgrade.

[0061] After verifying the validity of the h. attribute, the firmware is activated.

[0062] like Figure 3 As shown, after verifying that the firmware upgrade is correct, firmware activation is performed. At this point, the upgrade interface corresponding to the 4G module is called based on the upgradeMode and imageType information obtained from parsing the imageInfoTable. This interface is generally provided by the 4G module manufacturer. If upgradeMode is in URL mode, the validity of the firmware download address is checked, and the firmware is automatically downloaded from the corresponding server. After the download is complete, the firmware upgrade process is called to parse and process the newly downloaded firmware file.

[0063] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.

Claims

1. An upgrade management method for a 4G module of a smart meter, characterized in that, This method adds imageInfoTable information at the beginning of the upgrade firmware package and calls the corresponding upgrade interface to perform the upgrade based on the attributes defined in the information; The process includes the following steps: extracting the upgrade firmware package from the 4G module's file system and reading the imageInfoTable information; checking whether the 4G module supports the version marked with the unique text identifier and recording the results; for supported versions, performing information integrity verification; for imageInfoTable information that passes the integrity verification, parsing the attribute information and calling the corresponding upgrade interface based on the attributes to perform upgrade activation. The information integrity verification specifically involves: reading the imageInfoTableCrc stored in the imageInfoTable information at addresses 0x0000E~0x0000F, calculating the CRC value in the imageInfoTable information from address 0x00010~0x001FF, comparing the calculated CRC value with the imageInfoTableCrc; if they do not match, record it as an integrity anomaly; if they match, continue. The imageInfoTable information includes: Unique Text (version identifier), imageInfoTableCrc (information integrity check bit), UpgradeMode (firm upgrade mode), imageType (upgrade firmware type), ImageSize (firm firmware size), imageSignature (firm firmware integrity check signature), AppVersion (app layer firmware version number), KernelVersion (kernel version), and Reserved (reserved area).

2. The upgrade management method for a 4G module of a smart meter according to claim 1, characterized in that, After parsing the attribute information, the validity of each attribute is determined. For invalid attributes, the firmware upgrade is terminated, and for valid attributes, firmware activation is initiated.

3. The upgrade management method for a 4G module of a smart meter according to claim 1, characterized in that, The upgrade firmware package is obtained as follows: The PC transmits the upgrade firmware package to the electricity meter via the optical port, and the electricity meter transmits the upgrade firmware package to the 4G module via UART / 485. The electricity meter and the 4G module use the local communication HDLC protocol. Alternatively, the main station will transmit the upgrade firmware package to the 4G module via the 4G-LTE network, and the main station and the 4G module will communicate using the standard IoT protocol. Alternatively, the master station transmits the upgrade firmware package to the meter via the 4G module. The meter temporarily stores the package in its FLASH memory. Communication between the master station and the meter uses the DLMS protocol. After the upgrade firmware package is fully transmitted to the meter, the meter then transmits the upgrade firmware package to the 4G module via UART / 485.

4. The upgrade management method for a 4G module of a smart meter according to claim 1, characterized in that, The firmware upgrade mode, UpgradeMode, can be either a full package or a differential package.

5. The upgrade management method for a 4G module of a smart meter according to claim 1, characterized in that, The firmware upgrade mode, UpgradeMode, is a URL address used to download and reactivate the firmware via FTP or HTTP.

6. The upgrade management method for a 4G module of a smart meter according to claim 1, characterized in that, Upgrade firmware type imageType includes: First category firmware: Full package upgrade firmware for APP; Second category firmware: Full package upgrade firmware for Kernel; Third category firmware: Full package upgrade firmware for both APP and Kernel; Fourth category firmware: Differential package upgrade firmware for APP; Fifth category firmware: Differential package upgrade firmware for Kernel; Sixth category firmware: Differential package upgrade firmware for both APP and Kernel; Seventh category firmware: Upgrade firmware with FTP download address; Eighth category firmware: Upgrade firmware with HTTP download address.

7. The upgrade management method for a 4G module of a smart meter according to claim 1, characterized in that, The upgrade activation is performed by calling the corresponding upgrade interface based on the attributes, specifically as follows: Firmware activation involves identifying the firmware upgrade mode (UpgradeMode) in the properties, and further identifying the corresponding firmware type (imageType) under the upgrade mode. The upgrade interface is called according to the firmware type. After a successful call, the 4G module undergoes a soft reset and begins the activation and upgrade process. The upgrade result is recorded after the reset.

Citation Information

Patent Citations

  • OTA upgrade download method based on hierarchical interaction design

    CN109347931A

  • Upgrading method and embedded system

    CN109558160A

  • Functional module upgrading method and device based on dual-core intelligent electric meter

    CN112631633A