Firmware upgrading method, embedded sim card and internet of things device

By designing the internal architecture of the embedded SIM card, firmware upgrades were achieved without replacing the card, reducing costs and device downtime, and solving the problem of high upgrade costs for embedded SIM cards in existing technologies.

CN119071155BActive Publication Date: 2026-01-06CHINA MOBILE COMM LTD RES INST +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310622805.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2026-01-06
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

Upgrading the firmware of existing embedded SIM cards requires replacing the SIM card, resulting in high upgrade costs and difficulties in device maintenance.

Method used

Design an embedded SIM card internal architecture, including a firmware control module and a firmware upgrade function module. It receives, verifies and stores upgrade firmware data, and uses the upgrade firmware data to work after restarting. It supports switching between primary and backup firmware areas and realizes firmware upgrades without replacing the card.

Benefits of technology

It reduces the firmware upgrade cost of embedded SIM cards, ensures that the normal use of the device is not affected during the firmware upgrade process, and disconnects the network only when the card is switched and restarted, thus reducing the device's offline time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071155B_ABST
    Figure CN119071155B_ABST
Patent Text Reader

Abstract

The application discloses a firmware upgrading method, an embedded SIM card and an Internet of Things device, and relates to the technical field of communication, to solve the problem of high firmware upgrading cost of the existing embedded SIM card. The embedded SIM card comprises a firmware control module, a firmware upgrading function module and a firmware data area; the method comprises the following steps: receiving upgrading firmware data through the firmware upgrading function module, checking the upgrading firmware data, storing the upgrading firmware data that passes the check into the firmware data area, and returning a firmware updating completion message to the firmware control module; receiving the firmware updating completion message through the firmware control module, and restarting the embedded SIM card in response to the firmware updating completion message, so that the embedded SIM card works with the upgrading firmware data in the firmware data area. According to the embodiment of the application, the internal architecture of the SIM card supporting firmware updating is designed, the firmware control module and the firmware upgrading function module are matched to complete firmware upgrading, and therefore, the firmware upgrading cost can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a firmware upgrade method, an embedded SIM card, and an Internet of Things (IoT) device. Background Technology

[0002] In recent years, the Internet of Things (IoT) has developed rapidly, and more and more IoT devices are equipped with Subscriber Identity Modules (SIMs) for network authentication and access. Many IoT devices operate in harsh environments, so they are often deployed using embedded SIM cards (eSIMs). Embedded SIM cards offer higher physical performance and smaller size, making them more adaptable to IoT devices. However, embedded SIM cards also have some limitations; once soldered into a device, they are difficult to replace or upgrade.

[0003] Currently, embedded SIM cards in IoT devices do not support firmware upgrades. When it is necessary to upgrade the firmware of the embedded SIM card in an IoT device, the usual method is to replace it with a new SIM card, that is, to desolder the original embedded SIM card and replace it with a new embedded SIM card, or to directly replace the IoT device. This results in high replacement costs and is not conducive to device maintenance. Summary of the Invention

[0004] This application provides a firmware upgrade method, an embedded SIM card, and an IoT device to solve the problem that existing embedded SIM card firmware upgrades require replacing the SIM card, resulting in high upgrade costs.

[0005] In a first aspect, embodiments of this application also provide a firmware upgrade method, executed by an embedded SIM card, the embedded SIM card including a firmware control module, a firmware upgrade function module, and a firmware data area, the method comprising:

[0006] The firmware upgrade function module receives upgrade firmware data, verifies the upgrade firmware data, stores the verified upgrade firmware data in the firmware data area, and returns a firmware update complete message to the firmware control module.

[0007] The firmware control module receives the firmware update completion message and, in response to the firmware update completion message, restarts the embedded SIM card so that the embedded SIM card can work using the upgraded firmware data in the firmware data area.

[0008] Optionally, before receiving upgrade firmware data through the firmware upgrade function module, the method further includes:

[0009] The firmware upgrade data is received through the firmware control module.

[0010] The firmware control module calls the firmware application programming interface (API) to transmit the upgrade firmware data to the firmware upgrade function module.

[0011] Optionally, the embedded SIM card includes two firmware areas, the firmware upgrade function module includes a first firmware upgrade function module and a second firmware upgrade function module, and the firmware data area includes a first firmware data area and a second firmware data area. The first firmware upgrade function module and the first firmware data area are located in the first firmware area, and the second firmware upgrade function module and the second firmware data area are located in the second firmware area. The first firmware area is one of the two firmware areas, and the second firmware area is the other firmware area besides the first firmware area.

[0012] The process of receiving upgrade firmware data through the firmware upgrade function module, verifying the upgrade firmware data, storing the verified upgrade firmware data in the firmware data area of ​​the embedded SIM card, and returning a firmware update completion message to the firmware control module includes:

[0013] When the embedded SIM card is working using the firmware data in the first firmware area, the second firmware upgrade function module receives the upgrade firmware data, verifies the upgrade firmware data, stores the verified upgrade firmware data in the second firmware data area, and returns a firmware update complete message to the firmware control module.

[0014] The step of receiving the firmware update completion message through the firmware control module and, in response to the firmware update completion message, restarting the embedded SIM card so that the embedded SIM card can work using the upgraded firmware data in the firmware data area includes:

[0015] The firmware control module receives the firmware update completion message, and in response to the firmware update completion message, modifies the starting address of the working firmware area to the second firmware area, and restarts the embedded SIM card so that the embedded SIM card can work using the upgraded firmware data in the second firmware area.

[0016] Optionally, after restarting the embedded SIM card, the method further includes:

[0017] Upon receiving a firmware version rollback instruction through the firmware control module, the firmware control module modifies the starting address of the working firmware area to the first firmware area and restarts the embedded SIM card again, so that the embedded SIM card can work using the firmware data in the first firmware area.

[0018] Optionally, before receiving the upgrade firmware data through the firmware control module, the method further includes:

[0019] The firmware control module receives firmware information query requests sent by the server.

[0020] Obtain the firmware version information of the embedded SIM card from the firmware upgrade function module;

[0021] The firmware control module sends the firmware version information to the server, wherein the firmware version information is used by the server to determine whether the embedded SIM card needs to upgrade its firmware version.

[0022] Receiving the upgraded firmware data through the firmware control module includes:

[0023] The firmware control module receives the upgrade firmware data sent by the server.

[0024] Secondly, embodiments of this application provide an embedded SIM card, including a firmware control module, a firmware upgrade function module, and a firmware data area;

[0025] The firmware control module is used to receive upgrade firmware data and call the firmware API to transmit the upgrade firmware data to the firmware upgrade function module.

[0026] The firmware upgrade function module is used to receive the upgrade firmware data, verify the upgrade firmware data, store the verified upgrade firmware data in the firmware data area, and return a firmware update complete message to the firmware control module.

[0027] The firmware control module is also used to restart the embedded SIM card upon receiving the firmware update completion message, so that the embedded SIM card can work using the upgraded firmware data in the firmware data area.

[0028] Optionally, the embedded SIM card further includes a user data area and an on-chip operating system (COS) area, with the firmware control module located in the COS area.

[0029] Thirdly, embodiments of this application also provide an Internet of Things (IoT) device, wherein the embedded SIM card described in the second aspect is deployed on the IoT device.

[0030] Fourthly, embodiments of this application also provide another Internet of Things device, including: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the firmware upgrade method as described in the first aspect.

[0031] Fifthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the firmware upgrade method as described in the first aspect.

[0032] In this embodiment, the embedded SIM card includes a firmware control module, a firmware upgrade function module, and a firmware data area. The firmware upgrade function module receives upgrade firmware data, verifies the upgrade firmware data, stores the verified upgrade firmware data in the firmware data area, and returns a firmware update completion message to the firmware control module. The firmware control module receives the firmware update completion message and, in response, restarts the embedded SIM card so that it can use the upgrade firmware data in the firmware data area. This embodiment, by designing an internal architecture for the SIM card that supports firmware updates, enables firmware upgrades to be completed through the cooperation of the firmware control module and the firmware upgrade function module. The upgraded firmware data is stored in the firmware data area, and after a short restart, the upgraded firmware can be used, thus greatly reducing the firmware upgrade cost of the embedded SIM card. Attached Figure Description

[0033] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a flowchart of the firmware upgrade method provided in the embodiments of this application;

[0035] Figure 2 This is an internal architecture diagram of the embedded SIM card provided in the embodiments of this application;

[0036] Figure 3 This is a flowchart illustrating the firmware upgrade process for an embedded SIM card provided in this application embodiment.

[0037] Figure 4 This is a structural diagram of the Internet of Things (IoT) device provided in the embodiments of this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0039] See Figure 1 , Figure 1 This is a flowchart of a firmware upgrade method provided in an embodiment of this application, executed by an embedded SIM card. The embedded SIM card includes a firmware control module, a firmware upgrade function module, and a firmware data area, as shown below. Figure 1 As shown, the method includes the following steps:

[0040] Step 101: Receive upgrade firmware data through the firmware upgrade function module, verify the upgrade firmware data, store the verified upgrade firmware data in the firmware data area, and return a firmware update complete message to the firmware control module.

[0041] In this embodiment of the application, to implement the firmware upgrade function after the embedded SIM card is issued, the internal architecture of the embedded SIM card has been completely redesigned, specifically as follows: Figure 2 As shown, the embedded SIM card in this embodiment includes a firmware control module 201, a firmware upgrade function module, and a firmware data area.

[0042] The firmware control module 201 is responsible for receiving and parsing firmware upgrade instructions, such as receiving firmware upgrade instructions issued by the service server. It is also responsible for cooperating with the firmware upgrade function module to complete firmware maintenance and management, including initiating and maintaining the secure link, i.e., the firmware upgrade package download channel, initiating and exiting the firmware upgrade session, and receiving firmware upgrade files.

[0043] The firmware upgrade function module provides functions such as firmware code data download and verification, recovery in case of firmware download interruption, firmware version rollback, and firmware version / information query, and works with the firmware control module 201 to complete firmware upgrade and maintenance tasks.

[0044] The firmware data area is the area where firmware code data is stored.

[0045] When the embedded SIM card triggers the firmware update process, if the firmware control module 201 receives a firmware upgrade instruction from the server, parses it, and responds to the server, the server begins to send upgrade firmware data, i.e., firmware upgrade package, to the embedded SIM card, and the embedded SIM card receives the upgrade firmware data through the firmware upgrade function module; or, the embedded SIM card may also download the upgrade firmware data from the card reader through the firmware upgrade function module.

[0046] Optionally, before step 101, the method further includes:

[0047] The firmware control module 201 receives upgrade firmware data.

[0048] The firmware control module 201 calls the firmware API to transmit the upgraded firmware data to the firmware upgrade function module.

[0049] In one specific implementation, the firmware upgrade function module can receive the upgrade firmware data transmitted by the firmware control module 201 through the firmware API.

[0050] Specifically, the embedded SIM card can receive upgrade firmware data from the server via the firmware control module 201, or download upgrade firmware data from the card reader via the firmware control module 201. After receiving the upgrade firmware data, the firmware control module 201 can call the firmware API 204 to transmit the upgrade firmware data to the firmware upgrade function module, thereby the firmware upgrade function module receives the upgrade firmware data.

[0051] In this way, the firmware upgrade function module only needs to interact with the firmware control module 201 and receive firmware upgrade data when firmware upgrade is required, which can protect the security of the firmware area to a certain extent.

[0052] After receiving the complete upgrade firmware data, the firmware upgrade function module decrypts the data packet, i.e., the upgrade firmware data, and performs integrity and correctness verification to confirm whether the upgrade firmware data is complete and correct. After completing the integrity and correctness verification, i.e. confirming that the upgrade firmware data is complete and correct, the upgrade firmware data can be saved to the firmware data area, and a firmware update completion message is returned to the firmware control module 201, i.e., notifying the firmware control module 201 that the firmware update is complete.

[0053] Step 102: Receive the firmware update complete message through the firmware control module, and in response to the firmware update complete message, restart the embedded SIM card so that the embedded SIM card can work using the upgraded firmware data in the firmware data area.

[0054] After receiving the firmware update completion message, the firmware control module 201 can restart the embedded SIM card through an active command (Refresh) to complete the firmware update. After restarting, the embedded SIM card will use the upgraded firmware data.

[0055] When the embedded SIM card updates its firmware based on the upgrade firmware data issued by the server, the embedded SIM card can also return the firmware update result to the server through the firmware control module 201 after restarting, so as to inform the server that the firmware update is complete.

[0056] Optionally, the embedded SIM card includes two firmware areas, the firmware upgrade function module includes a first firmware upgrade function module and a second firmware upgrade function module, and the firmware data area includes a first firmware data area and a second firmware data area. The first firmware upgrade function module and the first firmware data area are located in the first firmware area, and the second firmware upgrade function module and the second firmware data area are located in the second firmware area. The first firmware area is one of the two firmware areas, and the second firmware area is the other firmware area besides the first firmware area.

[0057] Step 101 includes:

[0058] When the embedded SIM card is working using the firmware data in the first firmware area, the second firmware upgrade function module receives the upgrade firmware data, verifies the upgrade firmware data, stores the verified upgrade firmware data in the second firmware data area, and returns a firmware update complete message to the firmware control module.

[0059] Step 102 includes:

[0060] The firmware control module receives the firmware update completion message, and in response to the firmware update completion message, modifies the starting address of the working firmware area to the second firmware area, and restarts the embedded SIM card so that the embedded SIM card can work using the upgraded firmware data in the second firmware area.

[0061] In existing technologies, IoT devices need to disconnect from the network when changing SIM cards, resulting in a prolonged period of unusability. However, in many IoT scenarios, devices can only be offline for a short period at most.

[0062] Therefore, in one embodiment, considering that the process of downloading and upgrading firmware data is relatively long, in order to avoid affecting the normal use of the embedded SIM card during the download and upgrading firmware data process, the embedded SIM card is designed to include two firmware areas, such as firmware area A and firmware area B, one of which serves as the main firmware area and the other as the backup firmware area, for the purpose of saving and switching between the old and new chip firmware.

[0063] Specifically, such as Figure 2 As shown, the embedded SIM card includes two firmware areas, namely a first firmware area 205 and a second firmware area 206, also referred to as firmware area A and firmware area B. The first firmware area 205 contains a first firmware upgrade function module 2021 and a first firmware data area 2031. The second firmware area 206 contains a second firmware upgrade function module 2022 and a second firmware data area 2032. The firmware upgrade function module includes the first firmware upgrade function module 2021 and the second firmware upgrade function module 2022, and the firmware data area includes the first firmware data area 2031 and the second firmware data area 2032.

[0064] In this way, when the embedded SIM card is initially in operation, the firmware data in one of the firmware areas, such as the first firmware area 205 (firmware area A), is used normally. When the embedded SIM card triggers a firmware update process, the firmware control module 201 is responsible for receiving the new firmware data, i.e., the upgrade firmware data, and transmitting it to the second firmware upgrade function module 2022 in the second firmware area 206 (firmware area B) via the firmware API 204. After the second firmware upgrade function module 2022 completes the integrity and correctness verification of the new firmware data, it notifies the firmware control module 201. The firmware control module 201 then modifies the starting address of the working firmware area to the second firmware area 206 (firmware area B) and restarts the embedded SIM card via the active command Refresh. After the embedded SIM card restarts, the firmware data in the second firmware area 206 (firmware area B) begins to work, completing the firmware area switch.

[0065] Similarly, when the embedded SIM card operates using firmware data in the second firmware area 206 (i.e., firmware area B), when the embedded SIM card triggers a firmware update process, the firmware control module 201 is responsible for receiving the new firmware data, i.e., the upgrade firmware data, and transmitting it to the first firmware upgrade function module 2021 in the first firmware area 205 (i.e., firmware area A) via firmware API 204. After verifying the integrity and correctness of the new firmware data, the first firmware upgrade function module 2021 notifies the firmware control module 201. The firmware control module 201 then modifies the starting address of the working firmware area to the first firmware area 205 (i.e., firmware area A) and restarts the embedded SIM card via the active command Refresh. After the embedded SIM card restarts, the firmware data in the first firmware area 205 (i.e., firmware area A) begins to work, completing the firmware area switch.

[0066] Thus, through this implementation method, the embedded SIM card does not affect the normal use of other functions during the download of new firmware data, and the chip firmware can be upgraded while ensuring the original applications and user data; and during the firmware upgrade process, the network will only be disconnected when the card is switched and restarted, and the firmware data download process, which takes a relatively long time, does not affect the function of the embedded SIM card.

[0067] Optionally, after restarting the embedded SIM card, the method further includes:

[0068] Upon receiving a firmware version rollback instruction through the firmware control module, the firmware control module modifies the starting address of the working firmware area to the first firmware area and restarts the embedded SIM card again, so that the embedded SIM card can work using the firmware data in the first firmware area.

[0069] In one implementation, the embedded SIM card can be rolled back to its original firmware version to meet the user's need to switch back to the original firmware version.

[0070] Specifically, after upgrading the firmware version of the embedded SIM card, the latest version of the firmware data is stored in the second firmware data area of ​​the second firmware area, while the first firmware data area of ​​the first firmware area stores the firmware data of the previous version. When a firmware version rollback command is received through the firmware control module, for example, when the firmware control module receives a firmware version rollback command issued by the server, the starting address of the working firmware area can be modified back to the first firmware area through the firmware control module, and the embedded SIM card can be restarted. In this way, after restarting, the embedded SIM card uses the firmware data in the first firmware area to work, that is, it rolls back to the original version of firmware data.

[0071] Optionally, before receiving the upgrade firmware data through the firmware control module, the method further includes:

[0072] The firmware control module receives firmware information query requests sent by the server.

[0073] Obtain the firmware version information of the embedded SIM card from the firmware upgrade function module;

[0074] The firmware control module sends the firmware version information to the server, wherein the firmware version information is used by the server to determine whether the embedded SIM card needs to upgrade its firmware version.

[0075] Receiving the upgraded firmware data through the firmware control module includes:

[0076] The firmware control module receives the upgrade firmware data sent by the server.

[0077] In one implementation, chip firmware data can be downloaded over the air.

[0078] Specifically, the server first establishes a communication connection with the embedded SIM card and sends a firmware information query request to it. When the embedded SIM card receives the firmware information query request through the firmware control module, it reads the currently used firmware version information from the firmware upgrade function module and returns the firmware version information to the server through the firmware control module. The server can perform firmware version adaptation based on the firmware version information currently used by the embedded SIM card, that is, confirm whether the firmware version currently used by the embedded SIM card is the latest firmware version, or whether a higher version of firmware exists. If the firmware version currently used by the embedded SIM card is not the latest firmware version, it can be determined that the embedded SIM card needs to upgrade its firmware version, and thus send the new version of firmware data, i.e., upgrade firmware data, to the embedded SIM card. The embedded SIM card then receives the upgrade firmware data sent by the server through the firmware control module and continues the subsequent verification and firmware update process.

[0079] In this way, the firmware version can be updated in a timely manner based on interaction with the server.

[0080] The download process of the firmware data package for the embedded SIM card is not explicitly limited in this embodiment. The following describes the process in conjunction with... Figure 3 The following example illustrates the firmware upgrade process for an embedded SIM card by downloading chip firmware over the air. The interaction process is as follows:

[0081] The business platform, i.e., the server, establishes a Bearer Independent Protocol (BIP) connection with the embedded SIM card and obtains the card's on-site data. Specifically, the server sends a SIM card status query request to the embedded SIM card, and the embedded SIM card returns chip firmware version information.

[0082] The server performs firmware version adaptation based on the chip firmware version returned by the embedded SIM card, and confirms whether there is a firmware version that needs to be updated.

[0083] When the server determines that the embedded SIM card needs to update its firmware version, it sends a chip firmware initialization request to the embedded SIM card, and the embedded SIM card returns an initialization response result.

[0084] The server encrypts the new chip firmware data and adds Media Access Control (MAC) information, then sends it to the embedded SIM card via Over-the-Air (OTA) technology.

[0085] The firmware control module in the COS area of ​​the embedded SIM card receives the new chip firmware data, calls the firmware API interface, and transmits the data to the firmware upgrade function module.

[0086] After receiving the complete data, the firmware upgrade function module decrypts the data packet and performs integrity verification. After the verification is successful, the new chip firmware data is saved in the firmware data area, and the firmware update status is returned to the firmware control module.

[0087] After receiving a successful firmware update status, the firmware control module restarts the embedded SIM card via a Refresh active command to complete the chip firmware switch.

[0088] The embedded SIM card returns the firmware update result to the server.

[0089] The firmware upgrade method of this application embodiment receives upgrade firmware data through the firmware upgrade function module of the embedded SIM card, verifies the upgrade firmware data, stores the verified upgrade firmware data in the firmware data area of ​​the embedded SIM card, and returns a firmware update completion message to the firmware control module of the embedded SIM card. The firmware control module receives the firmware update completion message and, in response to the message, restarts the embedded SIM card. In this way, the firmware upgrade is completed through the cooperation of the firmware control module and the firmware upgrade function module, and the upgraded firmware data is stored in the firmware data area. After a short restart, the upgraded firmware can be used, which can greatly reduce the firmware upgrade cost of the embedded SIM card.

[0090] See Figure 2 , Figure 2 This is an internal architecture diagram of the embedded SIM card provided in the embodiments of this application, such as... Figure 2 As shown, the embedded SIM card includes a firmware control module 201, a firmware upgrade function module, and a firmware data area;

[0091] The firmware control module 201 is used to receive upgrade firmware data and call the firmware API 204 to transmit the upgrade firmware data to the firmware upgrade function module.

[0092] The firmware upgrade function module is used to receive the upgrade firmware data, verify the upgrade firmware data, store the verified upgrade firmware data in the firmware data area, and return a firmware update completion message to the firmware control module 201.

[0093] The firmware control module 201 is further configured to restart the embedded SIM card upon receiving the firmware update completion message, so that the embedded SIM card can work using the upgraded firmware data in the firmware data area.

[0094] In this embodiment of the application, to implement the firmware upgrade function after the embedded SIM card is issued, the internal architecture of the embedded SIM card has been completely redesigned, specifically as follows: Figure 2 As shown, it includes a firmware control module 201, a firmware upgrade function module, and a firmware data area.

[0095] The firmware control module 201 is responsible for receiving and parsing firmware upgrade instructions, such as receiving firmware upgrade instructions issued by the service server. It is also responsible for cooperating with the firmware upgrade function module to complete firmware maintenance and management, including initiating and maintaining the secure link, i.e., the firmware upgrade package download channel, initiating and exiting the firmware upgrade session, and receiving firmware upgrade files.

[0096] The firmware upgrade function module provides functions such as firmware code data download and verification, recovery in case of firmware download interruption, firmware version rollback, and firmware version / information query, and works with the firmware control module 201 to complete firmware upgrade and maintenance tasks.

[0097] The firmware data area is the area where firmware code data is stored.

[0098] When the embedded SIM card triggers the firmware update process, if the firmware control module 201 receives a firmware upgrade instruction from the server, parses it, and responds to the server, the server begins to send upgrade firmware data, i.e., firmware upgrade package, to the embedded SIM card, and the embedded SIM card receives the upgrade firmware data through the firmware control module 201; or, the embedded SIM card can also download the upgrade firmware data from the card reader through the firmware control module 201.

[0099] After receiving the upgrade firmware data, the firmware control module 201 can call the firmware API 204 to transmit the upgrade firmware data to the firmware upgrade function module.

[0100] After receiving the complete upgrade firmware data, the firmware upgrade function module decrypts the data packet, i.e., the upgrade firmware data, and performs integrity and correctness verification to confirm whether the upgrade firmware data is complete and correct. After completing the integrity and correctness verification and confirming that the upgrade firmware data is complete and correct, the upgrade firmware data is saved to the firmware data area, and a firmware update completion message is returned to the firmware control module 201, i.e., the firmware control module 201 is notified that the firmware update is complete.

[0101] After receiving the firmware update completion message, the firmware control module 201 can restart the embedded SIM card through an active command (Refresh) to complete the firmware update. After restarting, the embedded SIM card will use the upgraded firmware data.

[0102] When the embedded SIM card updates its firmware based on the upgrade firmware data sent by the server, the embedded SIM card can also return the firmware update result to the server after restarting, so as to inform the server that the firmware update is complete.

[0103] It should be noted that the firmware upgrade function module, the firmware data area, and the firmware API 204 can all be located in the firmware area.

[0104] Optionally, the embedded SIM card includes two firmware areas, the firmware upgrade function module includes a first firmware upgrade function module 2021 and a second firmware upgrade function module 2022, and the firmware data area includes a first firmware data area 2031 and a second firmware data area 2032. The first firmware upgrade function module 2021 and the first firmware data area 2031 are disposed in the first firmware area 205, and the second firmware upgrade function module 2022 and the second firmware data area 2032 are disposed in the second firmware area 206. The first firmware area is one of the two firmware areas, and the second firmware area is the other firmware area besides the first firmware area.

[0105] When the embedded SIM card operates using the firmware data in the first firmware area 205, the firmware control module 201 is used to call the firmware API to transmit the upgraded firmware data to the second firmware upgrade function module 2022.

[0106] The second firmware upgrade function module 2022 is used to receive the upgrade firmware data, verify the upgrade firmware data, store the verified upgrade firmware data in the second firmware data area 2032, and return a firmware update completion message to the firmware control module 201.

[0107] The firmware control module 201 is further configured to, upon receiving the firmware update completion message, modify the starting address of the working firmware area to the second firmware area 206 and restart the embedded SIM card, so that the embedded SIM card can work using the upgraded firmware data in the second firmware area.

[0108] In existing technologies, IoT devices need to disconnect from the network when changing SIM cards, resulting in a prolonged period of unusability. However, in many IoT scenarios, devices can only be offline for a short period at most.

[0109] Therefore, in one embodiment, considering that the process of downloading and upgrading firmware data is relatively long, in order to avoid affecting the normal use of the embedded SIM card during the download and upgrading firmware data process, the embedded SIM card is designed to include two firmware areas, one as the main firmware area and the other as the backup firmware area, for the purpose of saving and switching between the old and new chip firmware.

[0110] Specifically, such as Figure 2As shown, the embedded SIM card includes two firmware areas, namely a first firmware area 205 and a second firmware area 206, also referred to as firmware area A and firmware area B. The first firmware area 205 contains a first firmware upgrade function module 2021 and a first firmware data area 2031. The second firmware area 206 contains a second firmware upgrade function module 2022 and a second firmware data area 2032. The firmware upgrade function module includes the first firmware upgrade function module 2021 and the second firmware upgrade function module 2022, and the firmware data area includes the first firmware data area 2031 and the second firmware data area 2032.

[0111] In this way, when the embedded SIM card is initially in operation, the firmware data in one of the firmware areas, such as the first firmware area 205 (firmware area A), is used normally. When the embedded SIM card triggers a firmware update process, the firmware control module 201 is responsible for receiving the new firmware data, i.e., the upgrade firmware data, and transmitting it to the second firmware upgrade function module 2022 in the second firmware area 206 (firmware area B) via the firmware API 204. After the second firmware upgrade function module 2022 completes the integrity and correctness verification of the new firmware data, it notifies the firmware control module 201. The firmware control module 201 then modifies the starting address of the working firmware area to the second firmware area 206 (firmware area B) and restarts the embedded SIM card via the active command Refresh. After the embedded SIM card restarts, the firmware data in the second firmware area 206 (firmware area B) begins to work, completing the firmware area switch.

[0112] Similarly, when the embedded SIM card operates using firmware data in the second firmware area 206 (i.e., firmware area B), when the embedded SIM card triggers a firmware update process, the firmware control module 201 is responsible for receiving the new firmware data, i.e., the upgrade firmware data, and transmitting it to the first firmware upgrade function module 2021 in the first firmware area 205 (i.e., firmware area A) via firmware API 204. After verifying the integrity and correctness of the new firmware data, the first firmware upgrade function module 2021 notifies the firmware control module 201. The firmware control module 201 then modifies the starting address of the working firmware area to the first firmware area 205 (i.e., firmware area A) and restarts the embedded SIM card via the active command Refresh. After the embedded SIM card restarts, the firmware data in the first firmware area 205 (i.e., firmware area A) begins to work, completing the firmware area switch.

[0113] Thus, through this implementation method, the embedded SIM card does not affect the normal use of other functions during the download of new firmware data, and the chip firmware can be upgraded while ensuring the original applications and user data; and during the firmware upgrade process, the network will only be disconnected when the card is switched and restarted, and the firmware data download process, which takes a relatively long time, does not affect the function of the embedded SIM card.

[0114] Optionally, the embedded SIM card further includes a user data area 207 and an on-chip operating system (COS) area 208, with the firmware control module 201 located in the COS area 208.

[0115] In one implementation, such as Figure 2 As shown, the embedded SIM card may also include a user data area 207 and an on-chip operating system (COS) area 208. The user data area 207 is used to store the file system, applications, and application data; this area must not be affected during firmware upgrades. The COS area 208 is used to store the COS code data of the embedded SIM card, and the firmware control module 201 is located in the COS area 208. The COS area 208 may also include a 7816 interface, a Hardware Abstraction Layer (HAL), etc. Furthermore, the hardware layer refers to the hardware module units of the embedded SIM card.

[0116] In this way, by deploying the user data area, COS area, and firmware area independently, the firmware area can be completely isolated from the COS area and data area, and firmware updates will not affect data in other areas. After the embedded SIM card completes the firmware update, the original files, data, and applications remain unchanged. That is, the embedded SIM card can perform chip firmware upgrades while ensuring the original applications and user data.

[0117] The embedded SIM card of this application embodiment includes a firmware control module, a firmware upgrade function module, and a firmware data area. The firmware control module receives upgrade firmware data and calls the firmware application programming interface (API) to transmit the upgrade firmware data to the firmware upgrade function module. The firmware upgrade function module receives the upgrade firmware data, verifies the upgrade firmware data, stores the verified upgrade firmware data in the firmware data area, and returns a firmware update completion message to the firmware control module. The firmware control module also restarts the embedded SIM card upon receiving the firmware update completion message, enabling the embedded SIM card to use the upgrade firmware data in the firmware data area. This application embodiment, by designing an internal architecture for the SIM card that supports firmware updates, enables firmware upgrades to be completed through the cooperation of the firmware control module and the firmware upgrade function module. The upgraded firmware data is stored in the firmware data area, and after a brief restart, the upgraded firmware can be used, thus greatly reducing the firmware upgrade cost of the embedded SIM card.

[0118] The embedded SIM card provided in this embodiment adopts a novel design with a main firmware area and a backup firmware area, enabling the saving and switching between old and new chip firmware, and realizing the chip firmware upgrade function after the embedded SIM card is issued. The firmware area of ​​the embedded SIM card provides a firmware API to the COS area, which is used by the COS area to receive upgrade firmware data and transmit it to the firmware area. The firmware area of ​​the embedded SIM card is completely isolated from the COS area and the user data area, so that firmware updates do not affect data in other areas. The process of downloading new chip firmware data does not affect the normal use of other functions of the embedded SIM card. After the firmware area update is completed, the original files, data and applications remain unchanged. During the firmware upgrade process, the embedded SIM card will only disconnect from the network when switching firmware and restarting, and the download process, which takes a long time, does not affect the function of the embedded SIM card.

[0119] This application embodiment also provides an Internet of Things (IoT) device, wherein the IoT device is deployed with... Figure 2 The embedded SIM card described in any of the embodiments shown.

[0120] The IoT device can implement all the processes implemented by the embedded SIM card in the aforementioned embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0121] This application embodiment also provides an Internet of Things (IoT) device, wherein the IoT device is deployed with... Figure 2 The embedded SIM card provided in the illustrated embodiment. Since the principle by which the IoT device solves the problem is similar to the firmware upgrade method in this application embodiment, the implementation of this IoT device can refer to the implementation of the method; repeated details will not be elaborated further. Figure 4 As shown, the IoT device in this embodiment includes:

[0122] Processor 400 is used to read the program from memory 420 and execute the following procedures:

[0123] The firmware upgrade function module of the embedded SIM card receives upgrade firmware data, verifies the upgrade firmware data, stores the verified upgrade firmware data in the firmware data area of ​​the embedded SIM card, and returns a firmware update completion message to the firmware control module of the embedded SIM card.

[0124] The firmware control module receives the firmware update completion message and, in response to the firmware update completion message, restarts the embedded SIM card so that the embedded SIM card can work using the upgraded firmware data in the firmware data area.

[0125] Transceiver 410 is used to receive and send data under the control of processor 400.

[0126] Among them, Figure 4 In this context, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 400) and memory (memory 420). The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 410 may be multiple elements, including transmitters and transceivers, providing a unit for communicating with various other devices over a transmission medium. The processor 400 is responsible for managing the bus architecture and general processing, and the memory 420 may store data used by the processor 400 during operation.

[0127] Optionally, the processor 400 is also configured to read the program from the memory 420 and execute the following processes:

[0128] The firmware upgrade data is received through the firmware control module.

[0129] The firmware control module calls the firmware API to transmit the upgraded firmware data to the firmware upgrade function module.

[0130] Optionally, the embedded SIM card includes two firmware areas, the firmware upgrade function module includes a first firmware upgrade function module and a second firmware upgrade function module, and the firmware data area includes a first firmware data area and a second firmware data area. The first firmware upgrade function module and the first firmware data area are located in the first firmware area, and the second firmware upgrade function module and the second firmware data area are located in the second firmware area. The first firmware area is one of the two firmware areas, and the second firmware area is the other firmware area besides the first firmware area.

[0131] Processor 400 is also used to read programs from memory 420 and perform the following steps:

[0132] When the embedded SIM card is working using the firmware data in the first firmware area, the firmware upgrade data is transmitted to the second firmware upgrade function module by calling the firmware API through the firmware control module.

[0133] The second firmware upgrade function module receives the upgrade firmware data, verifies the upgrade firmware data, stores the verified upgrade firmware data in the second firmware data area, and returns a firmware update complete message to the firmware control module.

[0134] The firmware control module receives the firmware update completion message, and in response to the firmware update completion message, modifies the starting address of the working firmware area to the second firmware area, and restarts the embedded SIM card so that the embedded SIM card can work using the upgraded firmware data in the second firmware area.

[0135] Optionally, the processor 400 is also used to read the program from the memory 420 and perform the following steps:

[0136] Upon receiving a firmware version rollback command via transceiver 410, the firmware control module modifies the starting address of the working firmware area to the first firmware area and restarts the embedded SIM card to enable the embedded SIM card to work using the firmware data in the first firmware area.

[0137] Optionally, the processor 400 is also used to read the program from the memory 420 and perform the following steps:

[0138] The transceiver 410 receives firmware information query requests sent by the server.

[0139] Obtain the firmware version information of the embedded SIM card from the firmware upgrade function module;

[0140] The firmware version information is sent to the server via transceiver 410, wherein the firmware version information is used by the server to determine whether the embedded SIM card needs to upgrade its firmware version.

[0141] The transceiver 410 receives the upgrade firmware data sent by the server.

[0142] The IoT device provided in this application embodiment can perform... Figure 1 The method embodiments shown are similar in principle and technical effect, and will not be described again here.

[0143] Furthermore, the computer-readable storage medium of this application embodiment is used to store a computer program, which can be executed by a processor. Figure 1 The steps in the method embodiment shown.

[0144] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0145] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can be physically included separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0146] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the transmission and reception methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0147] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A firmware upgrade method, executed by an embedded SIM card, characterized in that, The embedded SIM card comprises a firmware control module, a firmware upgrade function module and a firmware data area, and the method comprises the following steps: The firmware upgrade function module receives the upgrade firmware data, checks the upgrade firmware data, stores the upgrade firmware data that passes the check in the firmware data area, and returns a firmware update completion message to the firmware control module; The firmware control module receives the firmware update completion message, and in response to the firmware update completion message, restarts the embedded SIM card so that the embedded SIM card works using the upgrade firmware data in the firmware data area; Before the step of receiving the upgrade firmware data by the firmware upgrade function module, the method further comprises the following steps: The firmware control module receives the upgrade firmware data; The firmware control module calls a firmware application program interface (API) to transmit the upgrade firmware data to the firmware upgrade function module; The firmware upgrade function module, the firmware data area and the firmware application program interface (API) are arranged in a firmware area; The embedded SIM card comprises a user data area and an on-chip operating system (COS) area, and the firmware control module is arranged in the COS area.

2. The method of claim 1, wherein, The embedded SIM card comprises two firmware areas, the firmware upgrade function module comprises a first firmware upgrade function module and a second firmware upgrade function module, the firmware data area comprises a first firmware data area and a second firmware data area, the first firmware upgrade function module and the first firmware data area are arranged in a first firmware area, the second firmware upgrade function module and the second firmware data area are arranged in a second firmware area, the first firmware area is one of the two firmware areas, and the second firmware area is the other firmware area of the two firmware areas; The firmware upgrade function module receives the upgrade firmware data, checks the upgrade firmware data, stores the upgrade firmware data that passes the check in the firmware data area, and returns a firmware update completion message to the firmware control module, which comprises the following steps: When the embedded SIM card works using firmware data in the first firmware area, the second firmware upgrade function module receives the upgrade firmware data, checks the upgrade firmware data, stores the upgrade firmware data that passes the check in the second firmware data area, and returns a firmware update completion message to the firmware control module; The firmware control module receives the firmware update completion message, and in response to the firmware update completion message, restarts the embedded SIM card so that the embedded SIM card works using the upgrade firmware data in the firmware data area, which comprises the following steps: The firmware control module receives the firmware update completion message, in response to the firmware update completion message, modifies the start address of the working firmware area to the second firmware area, and restarts the embedded SIM card so that the embedded SIM card works using the upgrade firmware data in the second firmware area.

3. The method of claim 2, wherein, After the embedded SIM card is restarted, the method further comprises: In the case that a firmware version rollback instruction is received by the firmware control module, the firmware control module modifies the starting address of the working firmware area to the first firmware area, and restarts the embedded SIM card again, so that the embedded SIM card works using the firmware data in the first firmware area.

4. The method according to any one of claims 1 to 3, characterized in that, Before the firmware control module receives the upgrade firmware data, the method further comprises: The firmware control module receives a firmware information query request sent by a server; The firmware control module obtains firmware version information of the embedded SIM card from the firmware upgrade function module; The firmware control module sends the firmware version information to the server, wherein the firmware version information is used by the server to determine whether the embedded SIM card needs to upgrade the firmware version; The firmware control module receives the upgrade firmware data, comprising: The firmware control module receives the upgrade firmware data sent by the server.

5. An embedded SIM card, characterized by The firmware control module, the firmware upgrade function module and the firmware data area; The firmware control module is configured to receive upgrade firmware data, and invoke a firmware API to transmit the upgrade firmware data to the firmware upgrade function module; The firmware upgrade function module is configured to receive the upgrade firmware data, and check the upgrade firmware data, store the upgrade firmware data that passes the check in the firmware data area, and return a firmware update completion message to the firmware control module; The firmware control module is further configured to restart the embedded SIM card in the case that the firmware update completion message is received, so that the embedded SIM card works using the upgrade firmware data in the firmware data area; The firmware upgrade function module, the firmware data area and the firmware API are arranged in a firmware area; The embedded SIM card comprises a user data area and an on-chip operating system (COS) area, and the firmware control module is arranged in the COS area.

6. An Internet of Things device, characterized by The Internet of Things device is deployed with the embedded SIM card of claim 5.

7. An Internet of Things device comprising: The transceiver, the memory, the processor and the computer program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the firmware upgrade method of any one of claims 1 to 4.

8. A computer readable storage medium for storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps in the firmware upgrade method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Automatic upgrading and rollback method and device for Internet-of-things equipment

    CN111625249A

  • Method and equipment for dynamically switching Native and JavaCard

    CN113692576A

  • Operation system updating method and device, universal integrated circuit card and storage medium

    CN116088885A