Firmware upgrading method, embedded SIM (Subscriber Identity Module) card and Internet of Things equipment

By designing firmware control modules and upgrade function modules in embedded SIM cards, an impactless firmware upgrade is achieved, which solves the problem that embedded SIM cards in IoT devices do not support firmware upgrades, reduces the upgrade cost and ensures the equipment's Working normally.

CN119071155AActive Publication Date: 2024-12-03CHINA MOBILE COMM LTD RES INST +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310622805.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-12-03
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

Embedded SIM cards in IoT devices do not support firmware upgrades, resulting in higher costs when replacing SIM cards or devices to upgrade firmware and affecting device maintenance.

Method used

Design a firmware upgrade method, and receive and verify the upgraded firmware data through the firmware control module and firmware upgrade function module in the embedded SIM card, store it in the firmware data area, and use the upgraded firmware after a brief restart. , supports switching between two firmware areas for impactless upgrades.

Benefits of technology

It reduces the cost of firmware upgrade of embedded SIM cards, avoids the device being offline for a long time, ensures the normal use of the device functions during the upgrade process, and supports rollback of firmware versions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071155A_ABST
    Figure CN119071155A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware upgrading method, an embedded SIM (Subscriber Identity Module) card and Internet of Things equipment, relates to the technical field of communication, and aims to solve the problem that the firmware upgrading cost of the existing embedded SIM card is relatively high. 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 upgrade firmware data through a firmware upgrade function module, verifying the upgrade firmware data, storing the upgrade firmware data passing the verification to a firmware data area, and returning a firmware update completion message to a firmware control module; and receiving a firmware update completion message through a firmware control module, and restarting the embedded SIM card in response to the firmware update completion message, so that the embedded SIM card works by using the upgraded firmware data in the firmware data area. According to the embodiment of the invention, the internal architecture of the SIM card supporting firmware updating is designed, and firmware upgrading is completed through cooperation of the firmware control module and the firmware upgrading function module, so that the firmware upgrading cost can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present 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 device. Background Art

[0002] In recent years, the Internet of Things has developed rapidly, and more and more IoT devices are deployed with Subscriber Identity Module (SIM) to facilitate network authentication of connected devices. And many IoT devices are often deployed in the form of embedded SIM cards (eSIM) due to the harsh working environment. Embedded SIM cards have higher physical performance and smaller size, and are more adaptable to IoT devices. However, embedded SIM cards also have some limitations. Once they are welded into the device, they are difficult to replace and upgrade.

[0003] At present, the embedded SIM card in the IoT device does not support firmware upgrade. When the firmware of the embedded SIM card in the IoT device needs to be upgraded, a new SIM card is usually replaced, that is, the original embedded SIM card is soldered off and replaced with a new embedded SIM card, or the IoT device is directly replaced, which brings high replacement costs and is not conducive to equipment maintenance. Summary of the invention

[0004] The embodiments of the present application provide a firmware upgrade method, an embedded SIM card, and an Internet of Things device to solve the problem that the existing embedded SIM card firmware upgrade requires the replacement of the SIM card, resulting in a high upgrade cost.

[0005] In a first aspect, an embodiment of the present application further provides a firmware upgrade method, which is executed by an embedded SIM card, wherein the embedded SIM card includes a firmware control module, a firmware upgrade function module, and a firmware data area, and the method includes:

[0006] Receiving the upgraded firmware data through the firmware upgrade function module, verifying the upgraded firmware data, storing the verified upgraded firmware data in the firmware data area, and returning a firmware update completion message to the firmware control module;

[0007] The firmware update completion message is received through the firmware control module, and in response to the firmware update completion message, the embedded SIM card is restarted so that the embedded SIM card works using the upgraded firmware data in the firmware data area.

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

[0009] Receiving the upgraded firmware data through the firmware control module;

[0010] Calling a firmware application programming interface (Application Programming Interface, API) through the firmware control module to transmit the upgraded 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, 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 arranged in the first firmware area, the second firmware upgrade function module and the second firmware data area are arranged 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 of ​​the two firmware areas except the first firmware area;

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

[0013] In the case where the embedded SIM card uses the firmware data in the first firmware area to work, the upgraded firmware data is received through the second firmware upgrade function module, and the upgraded firmware data is verified, the upgraded firmware data that passes the verification is stored in the second firmware data area, and a firmware update completion message is returned to the firmware control module;

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

[0015] The firmware update completion message is received through the firmware control module, and in response to the firmware update completion message, the starting address of the working firmware area is modified to the second firmware area, and the embedded SIM card is restarted so that the embedded SIM card uses the upgraded firmware data in the second firmware area to work.

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

[0017] When a firmware version rollback instruction is received 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 works 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] Receiving a firmware information query request sent by a server through the firmware control module;

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

[0021] Sending the firmware version information to the server through the firmware control module, wherein the firmware version information is used by the server to determine whether the embedded SIM card needs to upgrade the firmware version;

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

[0023] The firmware upgrade data sent by the server is received through the firmware control module.

[0024] In a second aspect, an embodiment of the present application provides 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 the upgraded firmware data and call the firmware API to transmit the upgraded 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 upgraded firmware data that passes the verification in the firmware data area, and return a firmware update completion message to the firmware control module;

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

[0028] Optionally, the embedded SIM card further includes a user data area and a chip operating system (Chip Operating System, COS) area, and the firmware control module is arranged in the COS area.

[0029] In a third aspect, an embodiment of the present application further provides an Internet of Things device, on which the embedded SIM card described in the second aspect is deployed.

[0030] In a fourth aspect, an embodiment of the present application also provides 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 when the processor executes the computer program, the steps in the firmware upgrade method described in the first aspect are implemented.

[0031] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the firmware upgrade method described in the first aspect are implemented.

[0032] In an embodiment of the present application, 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 the upgraded firmware data, verifies the upgraded firmware data, stores the verified upgraded firmware data in the firmware data area, and returns a firmware update completion message to the firmware control module; the firmware update completion message is received by the firmware control module, and in response to the firmware update completion message, the embedded SIM card is restarted so that the embedded SIM card uses the upgraded firmware data in the firmware data area to work. The embodiment of the present application designs an internal architecture of the SIM card that supports firmware updates, and can complete the firmware upgrade through the cooperation of the firmware control module and the firmware upgrade function module, store the upgraded firmware data in the firmware data area, and use the upgraded firmware after a short restart, which can greatly reduce the firmware upgrade cost of the embedded SIM card. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0034] Figure 1 is a flowchart of a firmware upgrade method provided in an embodiment of the present application;

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

[0036] Figure 3 This is a business flow chart of firmware upgrade of an embedded SIM card provided in an embodiment of the present application;

[0037] Figure 4 It is a structural diagram of the Internet of Things device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0039] See also Figure 1 , Figure 1 : is a flowchart of a firmware upgrade method provided in an embodiment of the present application, which is 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. Figure 1 As shown, the method comprises the following steps:

[0040] Step 101: receiving upgraded firmware data through the firmware upgrade function module, verifying the upgraded firmware data, storing the verified upgraded firmware data in the firmware data area, and returning a firmware update completion message to the firmware control module.

[0041] In the embodiment of the present application, in order to realize the firmware upgrade function of the embedded SIM card after it is issued, the internal architecture of the embedded SIM card is newly designed. Figure 2 As shown, the embedded SIM card in the embodiment of the present application includes a firmware control module 201, a firmware upgrade function module and a firmware data area.

[0042] Among them, the firmware control module 201 is responsible for receiving and parsing firmware upgrade instructions, for example, receiving firmware upgrade instructions issued by the business server, and is also responsible for cooperating with the firmware upgrade function module to complete firmware maintenance management, including initiating and maintaining a secure link, i.e., a firmware upgrade package download channel, initiating and exiting a firmware upgrade session, receiving firmware upgrade files, etc.

[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, firmware version / information query, etc., and cooperates with the firmware control module 201 to complete the firmware upgrade maintenance task.

[0044] The firmware data area is an area for storing firmware code data.

[0045] When the embedded SIM card triggers the firmware update process, if the firmware control module 201 receives the firmware upgrade instruction sent by the server, it parses it and responds to the server, the server starts to send upgraded firmware data, that is, a firmware upgrade package to the embedded SIM card, and the embedded SIM card receives the upgraded firmware data through the firmware upgrade function module; or, the embedded SIM card can also download the upgraded 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 the firmware upgrade data.

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

[0049] That is, in a specific implementation manner, 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 the upgraded firmware data sent by the server through the firmware control module 201, or download the upgraded firmware data from the card reader through the firmware control module 201. After receiving the upgraded firmware data, the firmware control module 201 can call the firmware API 204 to transmit the upgraded firmware data to the firmware upgrade function module, so that the firmware upgrade function module receives the upgraded firmware data.

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

[0052] After the firmware upgrade function module receives the complete upgrade firmware data, it decrypts the data packet, i.e., the upgrade firmware data, and performs integrity and correctness checks to confirm whether the upgrade firmware data is complete and correct. After completing the integrity and correctness checks, 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 completed.

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

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

[0055] When the embedded SIM card updates the firmware based on the upgraded firmware data sent by the server, the embedded SIM card may also return the firmware update result to the server through the firmware control module 201 after restarting to inform the server that the firmware update is completed.

[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, 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 arranged in the first firmware area, the second firmware upgrade function module and the second firmware data area are arranged 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 of ​​the two firmware areas except the first firmware area;

[0057] The step 101 includes:

[0058] In the case where the embedded SIM card uses the firmware data in the first firmware area to work, the upgraded firmware data is received through the second firmware upgrade function module, and the upgraded firmware data is verified, the upgraded firmware data that passes the verification is stored in the second firmware data area, and a firmware update completion message is returned to the firmware control module;

[0059] The step 102 includes:

[0060] The firmware update completion message is received through the firmware control module, and in response to the firmware update completion message, the starting address of the working firmware area is modified to the second firmware area, and the embedded SIM card is restarted so that the embedded SIM card uses the upgraded firmware data in the second firmware area to work.

[0061] In the prior art, IoT devices need to be disconnected from the Internet when replacing SIM cards, resulting in a long period of inability to be used normally. However, in many IoT scenarios, devices can only be offline for a short period of time at most.

[0062] Therefore, in one implementation, considering that the process of downloading the upgrade firmware data is long, in order to avoid affecting the normal use of the embedded SIM card during the process of downloading the upgrade firmware data, the embedded SIM card is designed to include two firmware areas, such as firmware area A and firmware area B, one of which is used as the main firmware area and the other is used as the backup firmware area, for realizing the storage and switching of the new and old chip firmware.

[0063] Specifically, Figure 2 As shown, the embedded SIM card includes two firmware areas, namely, a first firmware area 205 and a second firmware area 206, which can also be called firmware area A and firmware area B. The first firmware area 205 is provided with a first firmware upgrade function module 2021 and a first firmware data area 2031, and the second firmware area 206 is provided with a second firmware upgrade function module 2022 and a second firmware data area 2032. 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.

[0064] In this way, when the embedded SIM card is working in the initial state, the firmware data in one of the firmware areas, such as the first firmware area 205, i.e., firmware area A, is used normally. When the embedded SIM card triggers the firmware update process, the firmware control module 201 is responsible for receiving the new firmware data, i.e., the upgraded firmware data, and transmitting it to the second firmware upgrade function module 2022 in the second firmware area 206, i.e., firmware area B, through the firmware API 204. After the second firmware upgrade function module 2022 completes the integrity and correctness check of the new firmware data, it notifies the firmware control module 201. The firmware control module 201 modifies the starting address of the working firmware area to the second firmware area 206, i.e., firmware area B, and then restarts the embedded SIM card through the active command Refresh. After the embedded SIM card is restarted, the firmware data in the second firmware area 206, i.e., firmware area B, starts to work, and the firmware area switching is completed.

[0065] Similarly, when the embedded SIM card uses the firmware data in the second firmware area 206, i.e., firmware area B, to work, when the embedded SIM card triggers the firmware update process, the firmware control module 201 is responsible for receiving the new firmware data, i.e., the upgraded firmware data, and transmitting it to the first firmware upgrade function module 2021 in the first firmware area 205, i.e., firmware area A, through the firmware API 204. After the first firmware upgrade function module 2021 completes the integrity and correctness check of the new firmware data, it notifies the firmware control module 201, and the firmware control module 201 modifies the starting address of the working firmware area to the first firmware area 205, i.e., firmware area A, and then restarts the embedded SIM card through the active command Refresh. After the embedded SIM card restarts, the firmware data in the first firmware area 205, i.e., firmware area A, starts to work, and the firmware area switch is completed.

[0066] In this way, through this implementation, the embedded SIM card does not affect the normal use of other functions during the process of downloading new firmware data, and the chip firmware can be upgraded while ensuring the original application 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 that 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] When a firmware version rollback instruction is received 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 works using the firmware data in the first firmware area.

[0069] That is, in one implementation, a firmware version rollback operation on the embedded SIM card can be supported 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 in the second firmware area, and the first firmware data area in the first firmware area stores the previous version of the firmware data. When a firmware version rollback instruction is received through the firmware control module, for example, a firmware version rollback instruction sent by a server is received through the firmware control module, the start 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 is restarted, so that after the restart, the embedded SIM card uses the firmware data in the first firmware area to work, that is, rolls back to the original version of the firmware data to work.

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

[0072] Receiving a firmware information query request sent by a server through the firmware control module;

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

[0074] Sending the firmware version information to the server through the firmware control module, wherein the firmware version information is used by the server to determine whether the embedded SIM card needs to upgrade the firmware version;

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

[0076] The firmware upgrade data sent by the server is received through the firmware control module.

[0077] In one implementation, the chip firmware data may 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 the embedded SIM card. When the embedded SIM card receives the firmware information query request through the firmware control module, the server 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 there is a higher version of firmware. 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, so that a new version of firmware data, that is, upgraded firmware data, is sent to the embedded SIM card. The embedded SIM card receives the upgraded firmware data sent by the server through the firmware control module, and continues the subsequent verification and firmware update process.

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

[0080] In the embodiment of the present application, the download process of the firmware data packet of the embedded SIM card is not clearly defined. Figure 3 The example of the business process of downloading chip firmware over the air is used to illustrate the firmware upgrade process of the embedded SIM card. The interaction process is as follows:

[0081] The service platform, i.e., the server, establishes a Bearer Independent Protocol (BIP) connection with the embedded SIM card and obtains card field data, i.e., 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 according to the chip firmware version returned by the embedded SIM card to confirm whether there is a firmware version that needs to be updated;

[0083] When determining that the embedded SIM card needs to update the firmware version, the server 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, and sends it to the embedded SIM card through Over-the-Air Technology (OTA);

[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 check. After the check passes, 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 the firmware update status successfully, the firmware control module restarts the embedded SIM card through the Refresh active command to complete the chip firmware switching;

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

[0089] The firmware upgrade method of the embodiment of the present application receives the 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; receives the firmware update completion message through the firmware control module, and restarts the embedded SIM card in response to the firmware update completion message. In this way, the firmware upgrade is completed through the cooperation of the firmware control module and the firmware upgrade function module, the upgrade firmware data is stored in the firmware data area, and the upgraded firmware can be used after a short restart, which can greatly reduce the firmware upgrade cost of the embedded SIM card.

[0090] See also Figure 2 , Figure 2 : is an internal architecture diagram of an embedded SIM card provided in an embodiment of the present 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 the upgraded firmware data and call the firmware API 204 to transmit the upgraded firmware data to the firmware upgrade function module;

[0092] The firmware upgrade function module is used to receive the upgraded firmware data, verify the upgraded firmware data, store the verified upgraded 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 works by using the upgraded firmware data in the firmware data area.

[0094] In the embodiment of the present application, in order to realize the firmware upgrade function of the embedded SIM card after it is issued, the internal architecture of the embedded SIM card is newly designed. Figure 2 As shown, it includes a firmware control module 201, a firmware upgrade function module and a firmware data area.

[0095] Among them, the firmware control module 201 is responsible for receiving and parsing firmware upgrade instructions, for example, receiving firmware upgrade instructions issued by the business server, and is also responsible for cooperating with the firmware upgrade function module to complete firmware maintenance management, including initiating and maintaining a secure link, i.e., a firmware upgrade package download channel, initiating and exiting a firmware upgrade session, receiving firmware upgrade files, etc.

[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, firmware version / information query, etc., and cooperates with the firmware control module 201 to complete the firmware upgrade maintenance task.

[0097] The firmware data area is an area for storing firmware code data.

[0098] When the embedded SIM card triggers the firmware update process, if the firmware control module 201 receives the firmware upgrade instruction sent by the server, it parses it and responds to the server, the server starts to send upgraded firmware data, that is, a firmware upgrade package to the embedded SIM card, and the embedded SIM card receives the upgraded firmware data through the firmware control module 201; alternatively, the embedded SIM card can also download the upgraded firmware data from the card reader through the firmware control module 201.

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

[0100] After the firmware upgrade function module receives the complete upgrade firmware data, it decrypts the data packet, i.e., the upgrade firmware data, and performs integrity and correctness checks to confirm whether the upgrade firmware data is complete and correct. After completing the integrity and correctness checks and confirming that the upgrade firmware data is complete and correct, it saves the upgrade firmware data to the firmware data area and returns a firmware update completion message to the firmware control module 201, i.e., notifies the firmware control module 201 that the firmware update is completed.

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

[0102] In the case where the embedded SIM card updates the firmware based on the upgraded firmware data sent by the server, the embedded SIM card may also return a firmware update result to the server after restarting to inform the server that the firmware update is completed.

[0103] It should be noted that the firmware upgrade function module, the firmware data area and the firmware API 204 can all be set 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, 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 set in the first firmware area 205, the second firmware upgrade function module 2022 and the second firmware data area 2032 are set 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 of ​​the two firmware areas except the first firmware area;

[0105] In the case where the embedded SIM card works 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 modify the starting address of the working firmware area to the second firmware area 206 upon receiving the firmware update completion message, and restart the embedded SIM card so that the embedded SIM card works using the upgraded firmware data in the second firmware area.

[0108] In the prior art, IoT devices need to be disconnected from the Internet when replacing SIM cards, resulting in a long period of inability to be used normally. However, in many IoT scenarios, devices can only be offline for a short period of time at most.

[0109] Therefore, in one implementation, considering that the process of downloading the upgrade firmware data is long, in order to avoid affecting the normal use of the embedded SIM card during the process of downloading the upgrade firmware data, the embedded SIM card is designed to include two firmware areas, one of which is used as a main firmware area and the other is used as a backup firmware area to realize the storage and switching of the new and old chip firmware.

[0110] Specifically, Figure 2As shown, the embedded SIM card includes two firmware areas, namely, a first firmware area 205 and a second firmware area 206, which can also be called firmware area A and firmware area B. The first firmware area 205 is provided with a first firmware upgrade function module 2021 and a first firmware data area 2031, and the second firmware area 206 is provided with a second firmware upgrade function module 2022 and a second firmware data area 2032. 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.

[0111] In this way, when the embedded SIM card is working in the initial state, the firmware data in one of the firmware areas, such as the first firmware area 205, i.e., firmware area A, is used normally. When the embedded SIM card triggers the firmware update process, the firmware control module 201 is responsible for receiving the new firmware data, i.e., the upgraded firmware data, and transmitting it to the second firmware upgrade function module 2022 in the second firmware area 206, i.e., firmware area B, through the firmware API 204. After the second firmware upgrade function module 2022 completes the integrity and correctness check of the new firmware data, it notifies the firmware control module 201. The firmware control module 201 modifies the starting address of the working firmware area to the second firmware area 206, i.e., firmware area B, and then restarts the embedded SIM card through the active command Refresh. After the embedded SIM card is restarted, the firmware data in the second firmware area 206, i.e., firmware area B, starts to work, and the firmware area switching is completed.

[0112] Similarly, when the embedded SIM card uses the firmware data in the second firmware area 206, i.e., firmware area B, to work, when the embedded SIM card triggers the firmware update process, the firmware control module 201 is responsible for receiving the new firmware data, i.e., the upgraded firmware data, and transmitting it to the first firmware upgrade function module 2021 in the first firmware area 205, i.e., firmware area A, through the firmware API 204. After the first firmware upgrade function module 2021 completes the integrity and correctness check of the new firmware data, it notifies the firmware control module 201, and the firmware control module 201 modifies the starting address of the working firmware area to the first firmware area 205, i.e., firmware area A, and then restarts the embedded SIM card through the active command Refresh. After the embedded SIM card restarts, the firmware data in the first firmware area 205, i.e., firmware area A, starts to work, and the firmware area switch is completed.

[0113] In this way, through this implementation, the embedded SIM card does not affect the normal use of other functions during the process of downloading new firmware data, and the chip firmware can be upgraded while ensuring the original application 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 that 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 , and the firmware control module 201 is arranged in the COS area 208 .

[0115] In one embodiment, if Figure 2 As shown, the embedded SIM card may also be designed with a user data area 207 and an on-chip operating system COS area 208, wherein the user data area 207 is an area for storing the file system, applications and application data, and is prohibited from affecting this area during the firmware upgrade process; the COS area 208 is an area for storing COS code data of the embedded SIM card, and the firmware control module 201 is set in the COS area 208, and the COS area 208 may also include a 7816 interface, a hardware abstraction layer (HAL), etc. In addition, the hardware layer is the hardware module unit of the embedded SIM card.

[0116] In this way, by independently deploying the user data area, COS area and firmware area, the firmware area can be completely isolated from the COS area and the data area, and the firmware area update does not affect the 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 upgrade the chip firmware while ensuring the original applications and user data.

[0117] The embedded SIM card of the embodiment of the present application includes a firmware control module, a firmware upgrade function module and a firmware data area; the firmware control module is used to receive the upgrade firmware data, and call the firmware application program interface API to transmit the upgrade firmware data to the firmware upgrade function module; the firmware upgrade function module is used to receive the upgrade firmware data, verify the upgrade firmware data, store the upgraded firmware data that passes the verification in the firmware data area, and return a firmware update completion message to the firmware control module; the firmware control module is also used to restart the embedded SIM card when receiving the firmware update completion message, so that the embedded SIM card uses the upgraded firmware data in the firmware data area to work. The embodiment of the present application can complete the firmware upgrade through the cooperation of the firmware control module and the firmware upgrade function module by designing the internal architecture of the SIM card that supports firmware update, store the upgraded firmware data in the firmware data area, and use the upgraded firmware after a short restart, which can greatly reduce the firmware upgrade cost of the embedded SIM card.

[0118] The embedded SIM card provided in the embodiment of the present application adopts a new design of a main firmware area and a backup firmware area, which can realize the storage and switching of new and old chip firmware, and realize 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 for the COS area to transmit the upgraded firmware data to the firmware area after receiving it; the firmware area of ​​the embedded SIM card is completely isolated from the COS area and the user data area, so that the update of the firmware area does not affect the data in other areas; the embedded SIM card does not affect the normal use of other functions of the embedded SIM card during the process of downloading new chip firmware data; after the embedded SIM card completes the firmware area update, the original files, data and applications remain unchanged; during the firmware upgrade process of the embedded SIM card, the network will be disconnected only when the firmware is switched and restarted, and the download process that takes a relatively long time does not affect the function of the embedded SIM card.

[0119] The present application also provides an Internet of Things device, on which a Figure 2 The embedded SIM card described in any implementation manner in the illustrated embodiments.

[0120] The Internet of Things device can implement each process implemented by the embedded SIM card in the aforementioned embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0121] The present application also provides an Internet of Things device, on which a Figure 2 The embedded SIM card provided in the embodiment shown. Since the principle of solving the problem of the IoT device is similar to the firmware upgrade method in the embodiment of the present application, the implementation of the IoT device can refer to the implementation of the method, and the repeated parts will not be repeated. Figure 4 As shown, the Internet of Things device of the embodiment of the present application includes:

[0122] The processor 400 is used to read the program in the memory 420 and execute the following process:

[0123] Receiving the upgraded firmware data through the firmware upgrade function module of the embedded SIM card, verifying the upgraded firmware data, storing the verified upgraded firmware data in the firmware data area of ​​the embedded SIM card, and returning a firmware update completion message to the firmware control module of the embedded SIM card;

[0124] The firmware update completion message is received through the firmware control module, and in response to the firmware update completion message, the embedded SIM card is restarted so that the embedded SIM card works using the upgraded firmware data in the firmware data area.

[0125] The transceiver 410 is configured to receive and send data under the control of the processor 400 .

[0126] Among them, Figure 4 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 400 and memory represented by memory 420. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 410 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on 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 when performing operations.

[0127] Optionally, the processor 400 is further configured to read a program in the memory 420 and execute the following process:

[0128] Receiving the upgraded firmware data 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, 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 arranged in the first firmware area, the second firmware upgrade function module and the second firmware data area are arranged 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 of ​​the two firmware areas except the first firmware area;

[0131] The processor 400 is further configured to read the program in the memory 420 and execute the following steps:

[0132] In the case where the embedded SIM card works using the firmware data in the first firmware area, calling a firmware API through the firmware control module to transmit the upgraded firmware data to the second firmware upgrade function module;

[0133] receiving the upgraded firmware data through the second firmware upgrade function module, verifying the upgraded firmware data, storing the verified upgraded firmware data in the second firmware data area, and returning a firmware update completion message to the firmware control module;

[0134] The firmware update completion message is received through the firmware control module, and in response to the firmware update completion message, the starting address of the working firmware area is modified to the second firmware area, and the embedded SIM card is restarted so that the embedded SIM card uses the upgraded firmware data in the second firmware area to work.

[0135] Optionally, the processor 400 is further configured to read a program in the memory 420 and execute the following steps:

[0136] When a firmware version rollback instruction is received through the transceiver 410, the start address of the working firmware area is modified to the first firmware area through the firmware control module, and the embedded SIM card is restarted again so that the embedded SIM card works using the firmware data in the first firmware area.

[0137] Optionally, the processor 400 is further configured to read a program in the memory 420 and execute the following steps:

[0138] Receiving a firmware information query request sent by the server through the transceiver 410;

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

[0140] Sending the firmware version information to the server through the transceiver 410, wherein the firmware version information is used by the server to determine whether the embedded SIM card needs to upgrade the firmware version;

[0141] The upgrade firmware data sent by the server is received through the transceiver 410.

[0142] The IoT device provided in the embodiment of the present application can execute Figure 1 The implementation principle and technical effect of the method embodiment shown are similar, and this embodiment will not be repeated here.

[0143] In addition, the computer-readable storage medium of the embodiment of the present application is used to store a computer program, and the computer program can be executed by a processor to implement Figure 1 The various steps in the method embodiment are shown.

[0144] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0145] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0146] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving methods described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0147] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A firmware upgrade method, executed by an embedded SIM card, characterized in that: The embedded SIM card includes a firmware control module, a firmware upgrade function module and a firmware data area, and the method includes: Receiving the upgraded firmware data through the firmware upgrade function module, verifying the upgraded firmware data, storing the verified upgraded firmware data in the firmware data area, and returning a firmware update completion message to the firmware control module; The firmware update completion message is received through the firmware control module, and in response to the firmware update completion message, the embedded SIM card is restarted so that the embedded SIM card works using the upgraded firmware data in the firmware data area.

2. The method according to claim 1, characterized in that Before receiving the firmware upgrade data through the firmware upgrade function module, the method further includes: Receiving the upgraded firmware data through the firmware control module; The firmware control module calls a firmware application program interface API to transmit the upgraded firmware data to the firmware upgrade function module.

3. The method according to claim 1, characterized in that 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, 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 arranged in the first firmware area, the second firmware upgrade function module and the second firmware data area are arranged 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 of ​​the two firmware areas except the first firmware area; The receiving of the upgraded firmware data through the firmware upgrade function module, verifying the upgraded firmware data, storing the verified upgraded firmware data in the firmware data area, and returning a firmware update completion message to the firmware control module include: In the case where the embedded SIM card uses the firmware data in the first firmware area to work, the upgraded firmware data is received through the second firmware upgrade function module, and the upgraded firmware data is verified, the upgraded firmware data that passes the verification is stored in the second firmware data area, and a firmware update completion message is returned to the firmware control module; The receiving the firmware update completion message through the firmware control module and restarting the embedded SIM card in response to the firmware update completion message so that the embedded SIM card uses the upgraded firmware data in the firmware data area to work, comprising: The firmware update completion message is received through the firmware control module, and in response to the firmware update completion message, the starting address of the working firmware area is modified to the second firmware area, and the embedded SIM card is restarted so that the embedded SIM card uses the upgraded firmware data in the second firmware area to work.

4. The method according to claim 3, characterized in that After restarting the embedded SIM card, the method further includes: When a firmware version rollback instruction is received 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 works using the firmware data in the first firmware area.

5. The method according to any one of claims 2 to 4, characterized in that Before receiving the upgraded firmware data through the firmware control module, the method further includes: Receiving a firmware information query request sent by a server through the firmware control module; Acquire the firmware version information of the embedded SIM card from the firmware upgrade function module; Sending the firmware version information to the server through the firmware control module, wherein the firmware version information is used by the server to determine whether the embedded SIM card needs to upgrade the firmware version; The receiving the upgraded firmware data through the firmware control module includes: The firmware upgrade data sent by the server is received through the firmware control module.

6. An embedded SIM card, characterized in that: It includes a firmware control module, a firmware upgrade function module and a firmware data area; The firmware control module is used to receive the upgraded firmware data and call the firmware API to transmit the upgraded firmware data to the firmware upgrade function module; The firmware upgrade function module is used to receive the upgrade firmware data, verify the upgrade firmware data, store the upgraded firmware data that passes the verification 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 upon receiving the firmware update completion message, so that the embedded SIM card works by using the upgraded firmware data in the firmware data area.

7. The embedded SIM card according to claim 6, characterized in that: The embedded SIM card further includes a user data area and an on-chip operating system COS area, and the firmware control module is arranged in the COS area.

8. An Internet of Things device, characterized in that: The IoT device is deployed with the embedded SIM card described in claim 6 or 7.

9. An Internet of Things device, comprising: A transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the firmware upgrade method as described in any one of claims 1 to 5.

10. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the firmware upgrade method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Online upgrading method and system

    CN110929262A

  • 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

  • Over-the-air (OTA) mobility services platform

    US20190391800A1