Method, device and equipment for recovering configuration information of WWAN module
By encrypting and storing the configuration information of the WWAN module in eSIM and decrypting and recovering when needed, the problem of difficulty in recovering the default configuration of the WWAN module is solved, improving the reliability, security and convenience of the recovery process.
Patent Information
- Application Number
- CN202510072103.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-04-29
AI Technical Summary
During the production and testing of WWAN modules, factory default configuration often needs to be changed, making it difficult to restore the factory default configuration after the test is completed, especially when the backup partition is erased abnormally.
The configuration information of the WWAN module is encrypted through an encryption algorithm, and the encrypted information is stored in the eSIM. When the configuration information is modified or deleted, the backup configuration information is retrieved and decrypted in the eSIM through the AT command and written to the WWAN module.
Improves the reliability, security and convenience of default configuration recovery of WWAN modules, avoids default configuration loss due to partition corruption, and simplifies the recovery process.
Smart Images

Figure CN119906984A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and equipment for recovering configuration information of a WWAN module. Background Art
[0002] During the production and testing of Wireless Wide Area Network (WWAN) modules, the factory default configuration of the WWAN modules usually needs to be changed multiple times due to the need to cope with various test scenarios. After the test is completed, the factory default configuration of the WWAN modules must be restored.
[0003] At present, most methods for restoring the default configuration of the WWAN module rely on external storage devices or software tools. In addition, the default configuration of the WWAN module is backed up in the mirror partition inside the WWAN module, which includes a primary partition and a backup partition. However, during the upgrade or other operations of the WWAN module, although the backup partition will be protected, there may be abnormal erasure of the backup partition, and the default configuration backed up in the backup partition will still be lost, and the factory default configuration of the WWAN module cannot be restored. Therefore, when the default configuration of the WWAN module is abnormally erased or changed, how to restore the WWAN module to the factory default configuration needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus and device for restoring the configuration information of a WWAN module, which can improve the reliability, security and convenience of restoring the default configuration of the WWAN module when the configuration information in the WWAN module is modified or deleted.
[0005] The present application is introduced below from different aspects. It should be understood that the implementation methods and beneficial effects of the following different aspects can be referenced to each other.
[0006] In a first aspect, an embodiment of the present application provides a method for recovering configuration information of a WWAN module, which can be applied to a terminal device. The method includes:
[0007] The terminal device encrypts the first configuration information of the WWAN module through an encryption algorithm to obtain the second configuration information, and stores the second configuration information in an embedded subscriber identity module (Embedded Subscriber Identity Module, eSIM); the first configuration information includes the international mobile equipment identity code of the WWAN module and the serial number of the WWAN module; when the first configuration information in the WWAN module is modified or deleted, the second configuration information is retrieved from the eSIM through a first AT command; when the second configuration information is retrieved from the eSIM, the terminal device decrypts the second configuration information using a decryption algorithm corresponding to the encryption algorithm to obtain the first configuration information of the WWAN module; the terminal device writes the first configuration information of the WWAN module into the WWAN module.
[0008] In the embodiment of the present application, the terminal device encrypts the default configuration of the WWAN module by an encryption algorithm and stores it in the eSIM, and the terminal device needs to use the decryption algorithm corresponding to the encryption algorithm to decrypt in order to obtain the default configuration (i.e., the first configuration information) stored in the eSIM. Encrypted storage in the eSIM can prevent the default configuration of the WWAN module from being lost due to damage to the WWAN module partition, and can improve the security of the default configuration recovery of the WWAN module. In addition, the default configuration of the WWAN module is stored in the eSIM, and the reliability of the default configuration recovery of the WWAN module can be improved by utilizing the strong stability of the eSIM during the module production, testing, and upgrade process. When the default configuration in the WWAN module is modified or deleted, the terminal device can trigger the default configuration recovery process of the WWAN module through an AT command, and can restore the default configuration of the WWAN module backed up in the eSIM to the WWAN module, thereby simplifying the default configuration recovery process and improving the convenience of the default configuration recovery of the WWAN module. Therefore, when the configuration information in the WWAN module is modified or deleted, the reliability, security, and convenience of the default configuration recovery of the WWAN module can be improved.
[0009] In combination with the first aspect, in a feasible implementation, the terminal device writes the first configuration information of the WWAN module into the eSIM through a second AT command; the terminal device encrypts the first configuration information of the WWAN module stored in the eSIM through an encryption algorithm to obtain the second configuration information. By first writing the first configuration information of the WWAN module into the eSIM and then encrypting the first configuration information in the eSIM, the terminal device can provide a method of first writing the first configuration information of the WWAN module into the eSIM and then encrypting it.
[0010] In combination with the first aspect, in a feasible implementation, after the terminal device writes the first configuration information of the WWAN module into the eSIM through the second AT command, the terminal device verifies whether the first configuration information written into the eSIM is the same as the preset first configuration information of the WWAN module; if the first configuration information written into the eSIM is the same as the preset first configuration information of the WWAN module, the step of encrypting the first configuration information of the WWAN module stored in the eSIM through an encryption algorithm is performed. After the terminal device writes the first configuration information of the WWAN module into the eSIM through the second AT command, the validity of the first configuration information written into the eSIM is verified, which can ensure that the first configuration information written into the eSIM is valid.
[0011] In combination with the first aspect, in a feasible implementation, the terminal device writes the first configuration information of the WWAN module to the backup partition specified in the eSIM through the second AT command, and the eSIM includes one or more partitions. The eSIM can be partitioned, and the first configuration information of the WWAN module is written to the backup partition specified in the eSIM. The stability of the eSIM storage data can be utilized, thereby improving the reliability of the WWAN module default configuration recovery.
[0012] In combination with the first aspect, in a feasible implementation manner, the terminal device restarts the WWAN module to trigger the WWAN module to run the first configuration information.
[0013] In combination with the first aspect, in a feasible implementation, the first configuration information further includes a universal asynchronous receiver / transmitter and a dual inter-process communication. Restoring the default configuration changed during the test to the factory default configuration can improve the efficiency of the test, and in addition, can ensure that the normal version of the WWAN module is not affected by the test and other operations.
[0014] In combination with the first aspect, in a feasible implementation, the terminal device includes a firmware switching service for monitoring the WWAN module, and when the firmware switching service detects that the first configuration information in the WWAN module is modified or deleted, the terminal device calls an application programming interface to retrieve the second configuration information in the eSIM through a first AT command; the application programming interface is used to execute the first AT command. When the firmware switching service detects that the first configuration information in the WWAN module is modified or deleted, the API interface with the first AT command function is called to actively restore the default configuration of the modified or deleted WWAN module, thereby improving the convenience of restoring the default configuration of the WWAN module.
[0015] In a second aspect, an embodiment of the present application provides a communication device for executing the method in the first aspect or any possible implementation of the first aspect. The communication device includes:
[0016] An encryption module, used to encrypt the configuration information of the WWAN module by using an encryption algorithm to obtain first configuration information, and store the first configuration information in the eSIM;
[0017] A retrieval module, configured to retrieve the first configuration information in the eSIM through an AT command when the configuration information in the WWAN module is modified or deleted;
[0018] A decryption module, configured to, when the first configuration information is retrieved from the eSIM, decrypt the first configuration information using a decryption algorithm corresponding to the encryption algorithm to obtain the configuration information of the WWAN module;
[0019] The writing module is used to write the configuration information of the WWAN module into the WWAN module.
[0020] In combination with the second aspect, in a feasible implementation method, the writing module is also used to write the first configuration information of the WWAN module into the eSIM through a second AT command; the encryption module is also used to encrypt the first configuration information of the WWAN module stored in the eSIM through an encryption algorithm to obtain the second configuration information.
[0021] In combination with the second aspect, in a feasible implementation method, the above-mentioned communication device also includes a verification module, which is used to verify whether the first configuration information written into the eSIM is the same as the first configuration information of the preset WWAN module; the encryption module is also used to encrypt the first configuration information of the WWAN module stored in the eSIM through an encryption algorithm when the first configuration information written into the eSIM is the same as the first configuration information of the preset WWAN module.
[0022] In combination with the second aspect, in a feasible implementation, the writing module is further used to write the first configuration information of the WWAN module into a backup partition specified in the eSIM through a second AT command, and the eSIM includes one or more partitions.
[0023] In combination with the second aspect, in a feasible implementation, the above-mentioned communication device also includes a restart module, and the restart module is used to restart the WWAN module to trigger the WWAN module to run the first configuration information.
[0024] In combination with the second aspect, in a feasible implementation manner, the first configuration information further includes a universal asynchronous receiver-transmitter and dual inter-process communication.
[0025] In combination with the second aspect, in a feasible implementation method, the retrieval module is also used to call the application programming interface to retrieve the second configuration information in the eSIM through the first AT command when the firmware switching service detects that the first configuration information in the WWAN module is modified or deleted; the application programming interface is used to execute the first AT command.
[0026] On the third side, an embodiment of the present application provides a terminal device, which may include a processor, a memory, and a network interface, and the processor is connected to the memory and the network interface. Among them, the network interface is used to provide a data communication function, the memory is used to store a computer program, and the processor is used to call the computer program, so that the terminal device executes the configuration information recovery method of the WWAN module provided by the first aspect or any feasible implementation of the first aspect, and can also achieve the beneficial effects of the configuration information recovery method of the WWAN module provided by the first aspect.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store a computer program. When the computer program is run on a terminal device, the terminal device executes the configuration information recovery method of the WWAN module provided by the above-mentioned first aspect or any feasible implementation method of the first aspect, and can also achieve the beneficial effects of the configuration information recovery method of the WWAN module provided by the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] 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 will be briefly introduced below. Obviously, the drawings described below are 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 work.
[0029] Figure 1 It is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0030] Figure 2 It is a flowchart of a configuration information recovery method of a WWAN module provided in an embodiment of the present application;
[0031] Figure 3 is a structural diagram of a communication device provided in an embodiment of the present application;
[0032] Figure 4 It is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] 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.
[0034] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c; a and b; a and c; b and c; or a, b, and c. Among them, a, b, and c can be single or multiple.
[0035] In this application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described in this application as "exemplary", "for example" or "for example" should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the words "exemplary", "for example" or "for example" is intended to present the related concepts in a concrete way.
[0036] It should be understood that in the present application, "when", "if" and "if" all mean that the device will take corresponding actions under certain objective circumstances, and do not limit the time, nor do they require that the device must have a judgment action when it is implemented, nor do they mean that there are other limitations.
[0037] Elements used in the singular herein are intended to mean "one or more" rather than "one and only one" unless specifically stated otherwise.
[0038] It can be understood that in each embodiment of the present application, "A corresponds to B" means that there is a corresponding relationship between A and B, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0039] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0040] This application can be applied to Figure 1 In the system architecture shown in Figure 1 As shown, the WWAN module can be physically connected to the motherboard of the terminal device through welding, slots or cables. The operating system and application of the terminal device can interact with the WWAN module through drivers and communication protocols. The eSIM can be directly integrated into the chip inside the WWAN module, or soldered on the circuit board of the WWAN module in the form of an independent chip. The WWAN module interacts with the eSIM through a specific interface protocol.
[0041] 1. WWAN module
[0042] The WWAN module is mainly used to connect devices to wireless wide area networks, enabling devices to transmit and communicate data through network services provided by mobile network operators. For example, it allows devices to access mobile networks such as the 4th Generation Long-Term Evolution (4G LTE) or the 5th Generation (5G). The WWAN module supports a variety of interfaces for connecting and interacting with terminal devices. Common interfaces may include Universal Serial Bus (USB), Universal Asynchronous Receiver / Transmitter (UART), Serial Peripheral Interface (SPI), etc.
[0043] 2. eSIM
[0044] Embedded SIM (eSIM) is a technology that integrates the functions of a traditional SIM card directly into the device chip, rather than using a physical pluggable SIM card. eSIM saves space for a physical card slot and is directly soldered or integrated on the device circuit board. Compared with a physical SIM card, it does not have network connection failures caused by loose card slots, poor contact, etc., which improves the reliability of the device's network connection. In addition, the storage content of the eSIM can be directly integrated into the chip, and the chip can use non-volatile memory (NVM) to store information or data. Its storage method is more reliable and secure in design.
[0045] It should be noted that the above Figure 1 The system architecture or scenario in the embodiment of the present application is only an exemplary implementation method. The system architecture or scenario in the embodiment of the present application includes but is not limited to the above system architecture or scenario.
[0046] It is understandable that in the production and testing process of the WWAN module, it is often necessary to modify and adjust its default configuration multiple times to meet various different test requirements. For example, in different network environment tests, the network parameter settings of the WWAN module may need to be adjusted; during performance testing, the default configurations such as the transmission power of the WWAN module may be changed. However, these setting changes made during the test will change the default configuration of the WWAN module and affect the testing of its normal version. Because the non-default configuration will cause the test results of the normal version of the WWAN module to be inaccurate, it cannot truly reflect the performance and functions of the WWAN module under standard conditions. Therefore, when the test is completed, the configuration of the WWAN module needs to be restored to the default configuration state.
[0047] At present, most of the methods used to restore the default configuration of the WWAN module are to use external storage devices, such as importing the default configuration through storage media such as USB flash drives; or rely on specific software tools to communicate with the WWAN module and perform recovery operations. However, these traditional recovery methods have many problems. In terms of security, external storage devices may carry viruses or malware, and once connected to the WWAN module, they may pose a threat to the system security of the module. At the same time, software tools may also have security vulnerabilities and be used by illegal personnel to attack the module. In terms of operation, these methods are relatively cumbersome. When using an external storage device, you need to first find a suitable default configuration file and copy it correctly to the storage device, and then connect the storage device to the WWAN module. There are relatively more steps. Software tools may require complex installation and setup processes, and have high technical requirements for operators, which increases the difficulty and time cost of operation.
[0048] At present, for important data in the WWAN module, the backup method adopted is to perform partition backup in the storage area inside the module. Among them, partition A is set as the main partition, which is used to store various important data required for the normal operation of the module and the default configuration information of the WWAN module. Partition B is used as a backup partition, and its main function is to backup and store important data and the default configuration information of the WWAN module. During the upgrade process of the WWAN module, protection measures will be taken for this part of the storage area containing the backup partition, that is, it will not be erased during the upgrade operation, in order to ensure the integrity and security of the data in the backup partition, so as to prevent the loss of important data and the default configuration information of the WWAN module due to the upgrade. However, this backup mechanism has certain limitations. Although the backup partition is protected during the normal upgrade process, if the WWAN module has an abnormal situation, such as a system failure, an unexpected power outage, or a malicious attack, the backup partition may be abnormally erased. Once the backup partition is abnormally erased, the default configuration information of the WWAN module originally stored therein will be lost, which will have a serious impact on the normal operation and default configuration recovery of the WWAN module, and may even cause the WWAN module to fail to start normally or function abnormally.
[0049] At present, in the data management of WWAN modules, it is generally adopted to back up the default configuration and important data to the internal backup partition of the WWAN module. However, this method has the following defects: First, the partition of the WWAN module is easy to be damaged. When performing software upgrades or other related operations, even if certain protection measures have been implemented, due to various unforeseen factors, such as system abnormalities, operational errors or hardware failures, the main partition and the backup partition may still be accidentally erased or damaged. Once the default configuration of the WWAN module is accidentally erased or damaged, it will have a serious impact on the normal operation and function realization of the module, causing the WWAN module to fail to start according to the expected configuration, or various abnormal errors during operation. Second, the default configuration recovery process of the WWAN module is complicated. When the partition of the WWAN module is erased or damaged, additional professional tools and personnel with corresponding technical capabilities are required. The entire recovery process is not only cumbersome, but also time-consuming, which will affect the efficiency and progress of the WWAN module testing work. Third, the default configuration recovery process of the WWAN module is not safe enough. The existing partition protection mechanism is vulnerable to malware attacks or may be bypassed by improper user operations. Malware can exploit system vulnerabilities to break through the partition protection of the WWAN module and obtain or tamper with the default configuration data, thereby causing the default configuration data to be leaked or lost. In summary, the traditional method of backing up the default configuration of the WWAN module to the internal partition of the WWAN module is difficult to meet the requirements for efficiency, security and reliability in the default configuration recovery process of the WWAN module.
[0050] Therefore, the embodiments of the present application provide a method, apparatus and device for restoring the configuration information of a WWAN module, which can improve the reliability, security and convenience of restoring the default configuration of the WWAN module.
[0051] See also Figure 2 , Figure 2 1 is a flowchart diagram of a method for restoring configuration information of a WWAN module provided in an embodiment of the present application. The method includes steps S201 to S204. Figure 2 The method shown can be applied to a terminal device.
[0052] S201, the terminal device encrypts the first configuration information of the WWAN module by an encryption algorithm to obtain the second configuration information, and stores the second configuration information in the eSIM. The first configuration information includes the international mobile equipment identity code of the WWAN module and the serial number of the WWAN module.
[0053] Among them, the International Mobile Equipment Identity (IMEI) is a unique serial number used to identify mobile devices. It is a very important identifier for modules with wireless wide area network functions. The IMEI code usually consists of 15 digits, which have specific coding rules and meanings. The first 8 digits are the model approval number, which represents the model and manufacturer of the device. The next 2 digits are the final assembly number, which is used to indicate the production location and batch of the device. The following 6 digits are the serial number, which is used to uniquely identify each specific device. The last digit is the check code, which is used to verify the accuracy of the IMEI code. IMEI is an important identifier of the legitimacy of the device for mobile networks. Network operators verify IMEI to ensure that only certified devices can access the network. The serial number of the WWAN module is a unique number assigned by the manufacturer to distinguish different WWAN modules. The serial number (SN) of the WWAN module is a key basis for manufacturers to track products. When a product has quality problems or needs to be recalled, the serial number can be used to accurately locate the module of a specific batch and model. Restoring the default configuration of the serial number can ensure effective management of the device throughout the product life cycle. For example, if a batch of WWAN modules has a potential fault, the manufacturer can quickly notify the relevant users based on the serial number to replace or repair the product.
[0054] In a possible implementation, the first configuration information may also include a universal asynchronous receiver / transmitter (UART) and a dual inter-process communication (DIPC). UART is a serial communication interface widely used in computers and embedded systems for asynchronous data transmission between different devices. After the testing phase, the reason why UART needs to restore the default configuration is that different devices may have their default communication parameter settings, which are determined based on the design purpose and industry standards of the device. For example, if a certain model of WWAN module, the default baud rate may be 9600bps, the data bit is 8 bits, the stop bit is 1 bit, and there is no check bit. If these parameters are modified during the debugging process, communication failures may occur when communicating with other devices that follow the default standard. Or the modification cannot meet user needs. Restoring the default settings of UART can ensure that UART can transmit data according to the expected communication protocol. DIPC is an inter-process communication mechanism that supports two or more different modes in the system, and refers to the process of exchanging data and information between different processes in an operating system environment. During the debugging process, the properties of the communication channel in DIPC, the allocation method of shared memory, or the initial value of the semaphore may be modified. These modifications will affect the performance of the WWAN module. For example, if the access rights to the shared memory in DIPC are changed during debugging, if the default settings of DIPC are not restored, it may cause access conflicts between processes and affect the stability of the system. Restoring the default settings of DIPC can enable communication between processes to proceed in the expected manner as designed. In one possible implementation, the first configuration information may also include the default Dynamic Host Configuration Protocol (DHCP), the address of the public Domain Name System (DNS) server, the network protocol stack, the default encryption algorithm, such as support for the Advanced Encryption Standard (AES) algorithm, etc., which are not limited here.
[0055] In a possible implementation, the terminal device encrypts the first configuration information of the WWAN module by using the AES encryption algorithm. For the encryption process, first, the terminal device needs to generate an AES encryption key. The AES supports multiple key lengths, such as 128 bits, 192 bits, and 256 bits. The key can be generated inside the terminal device by a secure random number generator. Then, the terminal device determines the specific content of the first configuration information to be encrypted. If the first configuration information is not in the form of a byte stream, it needs to be converted into a byte array because the AES encryption algorithm operates on the byte stream. For example, the first configuration information in the form of a string is converted into a byte array by a suitable encoding method, such as Unicode Transformation Format-8 (UTF-8). After the terminal device determines the specific content of the first configuration information to be encrypted, it calls the AES encryption algorithm for encryption, and the specific process may include initializing the encryption algorithm, performing encryption operations, and processing encryption results. The encryption process may specifically refer to creating an AES encryption object in the software environment of the terminal device (such as through a cryptography library of a programming language), and passing the previously generated key to the AES encryption object for initializing the encryption operation. Then, in the programming language tool of the terminal device, the first configuration information converted into a byte array is used as input, and the encryption method of the encryption object is called for encryption. The result of the encryption is a byte array, the content of which is the configuration information encrypted by AES, that is, the second configuration information. Therefore, by using the AES encryption algorithm to perform high-intensity encryption on important data such as the default configuration of the WWAN module, data leakage caused by malware or user operations can be prevented.
[0056] After the terminal device obtains the second configuration information, the encrypted second configuration information can be stored in the eSIM. Among them, the eSIM itself has a certain storage capacity, which is mainly used to store key information related to user identity identification and network access, that is, eSIM configuration file information. Non-volatile memory can be used inside the eSIM to ensure the reliability and security of information storage. After the storage capacity of the eSIM stores the configuration file information of the eSIM, the remaining storage space can also store additional second configuration information. For example, the eSIM chip may have a storage capacity of several hundred bytes to several thousand bytes, and the stored second configuration information can be stored as long as it does not exceed this capacity limit. In addition, for security considerations, the storage of the second configuration information can utilize the security features of the eSIM itself. Because the eSIM chip has a high security level, it can prevent illegal access and tampering of the stored information. The second configuration information is stored in the eSIM, and the stored configuration information can be protected with the help of the security mechanism of the eSIM. For example, the encryption and authentication mechanism inside the eSIM chip can prevent unauthorized devices from reading the second configuration information. Therefore, the terminal device encrypts and stores important data such as the default configuration of the WWAN module in the eSIM, which can prevent the loss of important data such as the default configuration due to damage to the partition of the WWAN module and ensure the normal use of the WWAN module. In addition, it can avoid allocating additional storage space inside the WWAN module to back up important data such as the default configuration of the WWAN module, saving the limited storage space of the WWAN module.
[0057] In another possible implementation, the terminal device writes the first configuration information of the WWAN module into the eSIM through a second AT command; then, the terminal device encrypts the first configuration information of the WWAN module stored in the eSIM through an encryption algorithm to obtain the second configuration information. Among them, AT commands (Attention commands) are a set of commands used to control the WWAN module or other communication devices. AT commands can be specially designed to write the first configuration information of the WWAN module into the eSIM. The instruction sequence, such as the second AT command. The AT command is sent to the WWAN module through the communication interface between the terminal device and the WWAN module.
[0058] The terminal device writes the first configuration information of the WWAN module into the eSIM through the second AT command, specifically including: the terminal device writes the factory default configuration of the WWAN module, such as IMEI, SN, UART, DIPC, etc., into the eSIM through the second AT command. For example, the terminal device writes the factory default configuration of the IMEI of the WWAN module into the eSIM through the second AT command, and the customized second AT command may include "AT+WRITE_IMEI[IMEI data]", where "AT+WRITE_IMEI" is the command header, indicating the operation of writing IMEI, and the "[IMEI data]" part needs to be replaced with the actual IMEI code. For example, if the IMEI code is "123456789", then the complete second AT command can be "AT+WRITE_IMEI 123456789". The terminal device can send the second AT command through the communication interface of the WWAN module. After receiving the second AT command, the WWAN module will parse the second AT command, extract the IMEI data, and store the IMEI data in the designated storage area of the eSIM (such as the backup partition in the eSIM). For another example, the terminal device writes the SN factory default configuration of the WWAN module into the eSIM through the second AT command. The customized second AT command may include "AT+WRITE_SN[SN data]". If the SN is "ABCDEFGHIJKLMNOP", then the second AT command may be "AT+WRITE_SN ABCDEFGHIJKLMNOP". After receiving the second AT command, the WWAN module will store the SN data in the designated storage area of the eSIM. For another example, the terminal device writes the UART factory default configuration of the WWAN module into the eSIM through the second AT command. The customized second AT command may include "AT+WRITE_UART_CONFIG[baud rate][data bit][stop bit][parity bit]", then the second AT command may be "AT+WRITE_UART_CONFIG 9600, 8, 1, None". After receiving the second AT command, the WWAN module will parse the UART configuration parameters and store them in the designated storage area of the eSIM. For example, the terminal device writes the factory default configuration of the DIPC of the WWAN module into the eSIM through the second AT command. The customized second AT command may include "AT+WRITE_DIPC_CONFIG [shared memory size] [starting address] [message queue length] [message format] [semaphore initial value] [semaphore value range]". The specific command format and number of parameters depend on the actual configuration content of the DIPC and the design of the WWAN module.After the WWAN module receives the second AT command, the DIPC configuration parameters can be stored in a partition in the eSIM specifically used to store the default configuration information of the WWAN module (such as a backup partition in the eSIM). After the terminal device writes the first configuration information of the WWAN module into the eSIM through the second AT command, the terminal device encrypts the first configuration information of the WWAN module stored in the eSIM through an encryption algorithm to obtain the second configuration information. Among them, the terminal device can encrypt the first configuration information of the WWAN module through the AES encryption algorithm to obtain the second configuration information. Regarding the encryption process of the first configuration information of the WWAN module using the AES encryption algorithm, please refer to the above description of this, which will not be repeated here.
[0059] In a possible implementation, the terminal device writes the first configuration information of the WWAN module into the eSIM through the second AT command, including: the terminal device writes the first configuration information of the WWAN module into the backup partition specified in the eSIM through the second AT command, and the eSIM includes one or more partitions. Exemplarily, the eSIM includes a small storage system, and the storage system can be divided into one or more partitions. These partitions are similar to the partitions of a computer hard disk, and each partition has different uses. For example, some partitions are used to store the main configuration files of the network operator; some partitions are used to back up important device configurations. In this embodiment, the partition refers to the backup partition for storing the first configuration information of the WWAN module. It should be noted that different partitions may have different access rights and management methods. In general, the partitions of the eSIM are divided and set by the device manufacturer or operator according to security and functional requirements. The terminal device needs to use specific commands and protocols to access and operate these partitions to ensure the security and integrity of the information stored therein. The terminal device writes the first configuration information into the backup partition specified by the eSIM through the second AT command, which belongs to the backup strategy of backing up the first configuration information of the WWAN module to the eSIM. When the first configuration information of the WWAN module is lost or modified, it can serve as an important data source for restoring the factory default configuration of the WWAN module.
[0060] In the process of the terminal device writing the first configuration information into the backup partition specified in the eSIM through the second AT command, the terminal device may send the second AT command through the communication interface between the WWAN module and the eSIM. The second AT command may include the first configuration information of the WWAN module to be written (such as IMEI, SN, UART parameters, DIPC parameters, etc.) and information such as the address or identifier of the backup partition specified in the eSIM. The terminal device sends the second AT command to the WWAN module. After the WWAN module receives the second AT command, it can correctly write the first configuration information of the WWAN module into the backup partition specified in the eSIM according to the storage specification of the eSIM and the requirements of the backup partition.
[0061] In a possible implementation, after the terminal device writes the first configuration information of the WWAN module into the eSIM through the second AT command, the terminal device can verify whether the first configuration information written into the eSIM is the same as the first configuration information of the preset WWAN module; if the configuration information written into the eSIM is the same as the first configuration information of the preset WWAN module, the first configuration information of the WWAN module stored in the eSIM is encrypted by an encryption algorithm. Among them, the preset first configuration information of the WWAN module may refer to the first configuration information of the WWAN module stored in the main partition inside the WWAN module, or may refer to the hard-coded factory default configuration provided by the WWAN module manufacturer. In the above verification process, if the first configuration information of the written WWAN module includes IMEI and SN, since IMEI and SN are usually unique identifiers in the form of strings, the IMEI or SN string of the WWAN module read from the eSIM can be directly compared character by character with the IMEI or SN string of the corresponding preset WWAN module. If the two compared strings are exactly the same, it means that the writing of IMEI or SN is correct. For example, the IMEI string of the WWAN module read from the eSIM is compared character by character with the IMEI string of the corresponding preset WWAN module. If the two compared strings are exactly the same, it means that the IMEI written into the eSIM by the terminal device is correct. If the first configuration information of the written WWAN module includes UART configuration information, because the UART configuration information may include multiple parameters such as baud rate, data bit, stop bit or parity bit, the verification process needs to compare these parameters separately. For example, the terminal device can compare the baud rate value, data bit, stop bit or parity bit of the WWAN module read from the eSIM with the baud rate value, data bit, stop bit or parity bit of the preset WWAN module to see if they are completely consistent. If the first configuration information of the written WWAN module includes DIPC configuration information, since the DIPC configuration information may be more complex and may include the size of the shared memory, the parameters of the message queue, the setting of the semaphore, etc., the verification process needs to compare these parameters one by one. For example, for the shared memory size, it is necessary to compare whether the size value of the shared memory of the WWAN module read from the eSIM is the same as the size value of the shared memory of the preset WWAN module; for the message queue parameters, it is necessary to compare whether the queue length, message format, etc. of the WWAN module read from the eSIM are consistent with the queue length, message format, etc. of the preset WWAN module; for the semaphore setting, it is necessary to compare whether the initial value and value range of the semaphore of the WWAN module read from the eSIM are consistent with the initial value and value range of the semaphore of the preset WWAN module.If, after comparison, the first configuration information of all WWAN modules read from the eSIM is exactly the same as the first configuration information of the preset WWAN module, then the first configuration information of the written WWAN module can be considered valid. At this time, the terminal device can continue to execute the step of encrypting the first configuration information of the WWAN module stored in the eSIM through the encryption algorithm. If it is found during the comparison process that the field of the first configuration information of any WWAN module is different from the field of the preset first configuration information of the WWAN module, it means that an error may have occurred in the writing process. The terminal device can take corresponding measures, such as rewriting the first configuration information of the WWAN module, checking whether the AT command is sent correctly, checking whether the communication between the WWAN module and the eSIM is normal, etc.
[0062] S202: When the first configuration information in the WWAN module is modified or deleted, retrieve the second configuration information in the eSIM through a first AT command.
[0063] In a possible implementation, the modification or deletion of the first configuration information in the WWAN module may include erasing the IMEI or SN in the main partition of the WWAN module, modifying the configuration information of the DIPC mode or the configuration information of the UART of the WWAN module, etc. Among them, the first AT command is used for the terminal device to communicate with the WWAN module to implement an instruction set for retrieving the configuration information stored in the eSIM in the WWAN module. The first AT command is usually customized by the WWAN module manufacturer and is used to obtain the required backup second configuration information in a specific scenario (such as after the first configuration information is modified or deleted). The first AT command is used to retrieve the second configuration information, which may have the function of communicating with the WWAN module and operating its internal storage (such as eSIM storage). The first AT command usually follows a certain command format and protocol to achieve different operation purposes. The terminal device triggers the operation of restoring the first configuration information of the WWAN module through the AT command, which can simplify the default configuration recovery process of the WWAN module. In addition, there is a certain storage structure inside the eSIM for storing various configuration information. The second configuration information is encrypted and stored in a specific partition or storage area of the eSIM. Under normal circumstances, the eSIM storage area is protected and can only be accessed with the correct commands and permissions. Therefore, the high reliability of the eSIM can be used to ensure that the default configuration of the WWAN module can be quickly and safely restored in various situations.
[0064] In a possible implementation, the process of retrieving the second configuration information in the eSIM through the above-mentioned first AT command may include: first, the terminal device determines the format of the first AT command. According to the document provided by the WWAN module manufacturer or the technical specifications of the communication module, the first AT command format for retrieving the second configuration information is determined. For example, it can be "AT+RETRIEVE_2ND_CONFIG[parameter option]", where "[parameter option]" may include an identifier of the type of second configuration information to be retrieved (such as IMEI, SN, UART, DIPC, etc.). After determining the format of the first AT command, the terminal device sends the first AT command through the communication interface connected to the WWAN module. For example, if all the second configuration information is to be retrieved, the first AT command may be "AT+RETRIEVE_2ND_CONFIG ALL"; if only the second configuration information related to UART is to be retrieved, the first AT command may be "AT+RETRIEVE_2ND_CONFIG UART". After receiving the first AT command, the WWAN module can parse the first AT command. The WWAN module first identifies that the type of the first AT command is used to retrieve the second configuration information, and then determines which storage area or partition of the eSIM to retrieve from based on the parameters in the first AT command (such as the type of the second configuration information). The WWAN module communicates with the eSIM based on the first AT command and requests access to the area where the second configuration information is stored from the eSIM. The access process may involve identity authentication (if the eSIM has a security protection mechanism) and storage address location. For example, the WWAN module may send a request containing a storage area index or key to the eSIM based on the first AT command to obtain access rights. After obtaining access rights, the WWAN module reads the corresponding second configuration information from the designated eSIM storage area.
[0065] In a possible implementation, the terminal device includes a firmware switching service (FWSWITCHService) for real-time monitoring of the status of the WWAN module. Since the WWAN module includes an eSIM, the firmware switching service can also monitor the status of the eSIM. The firmware switching service is a service running on a Windows operating system (Windows) platform, which usually runs in the Windows background of the terminal device and does not require the user to manually start or keep an eye on it. When the firmware switching service detects that the first configuration information in the WWAN module has been modified or deleted, for example, the firmware switching service detects that the IMEI or SN in the main partition of the WWAN module has been lost, the terminal device can call an application programming interface (Application ProgrammingInterface, API) to retrieve the second configuration information in the eSIM through a first AT command; the application programming interface is used to execute the first AT command. Then the terminal device performs a subsequent configuration information recovery process according to the retrieved second configuration information. Exemplarily, assuming that the first AT command can be "AT+GTRESCON", AT+GTRESCON can be provided to the FWSWITCHService as an API. The API interface can play the role of a bridge here, which is a predefined interface for interaction between software components. That is, when the firmware switching service of the terminal device detects that the first configuration information in the WWAN module has been modified or deleted, for example, the firmware switching service detects that the WWAN module cannot query the stored IMEI or SN, the terminal device will call the API interface with the first AT command function to start the configuration information recovery process. Because the terminal device directly operates the WWAN module may involve complex underlying communication protocols, and the API interface can encapsulate these complex operations, the firmware switching service of the terminal device only needs to call according to the definition of the interface to trigger the corresponding function of the first AT command. After the terminal device calls the API interface, it executes the first AT command through the API interface, and then executes the configuration information recovery process according to the first AT command. This way of restoring the default configuration of the WWAN module can add a service check mechanism on the host side of the product. The service check mechanism may include: when the firmware switching service detects that the first configuration information in the WWAN module has been modified or deleted, calling the API interface with the first AT command function to actively restore the default configuration of the modified or deleted WWAN module, thereby improving the convenience of restoring the default configuration of the WWAN module.
[0066] S203: When the second configuration information is retrieved from the eSIM, the terminal device decrypts the second configuration information using a decryption algorithm corresponding to the encryption algorithm to obtain the first configuration information of the WWAN module.
[0067] In one possible implementation, if a symmetric encryption algorithm (such as AES) was used before, the decryption key is the same as the encryption key. The key can be stored in a secure storage area of the terminal device or in the eSIM during the encryption process. If it is an asymmetric encryption algorithm, it is necessary to obtain the corresponding private key (for decryption), which can also be stored in a secure storage area of the terminal device or in the eSIM. For example, if the encryption algorithm previously used to encrypt the first configuration information to obtain the second configuration information is AES, then when the terminal device retrieves the second configuration information in the eSIM, it can use the decryption algorithm or the corresponding decryption key of AES to decrypt the second configuration information and obtain the first configuration information of the WWAN module.
[0068] S204: The terminal device writes the first configuration information of the WWAN module into the WWAN module.
[0069] In a possible implementation, the terminal device can write the first configuration information of the WWAN module into the WWAN module through the aforementioned first AT command. The first AT command can be used to retrieve the second configuration information and write the first configuration information into the WWAN module, and the first AT command can be composed of one or more AT commands. According to the grammatical rules and document description of the first AT command, a specific command for retrieving and writing configuration information is constructed. Assume that the basic format of the first AT command is "AT+[operation code][parameter list]", where "operation code" is used to specify the operation type (such as a write operation may have a specific operation code, which is different from the retrieval operation code), and "parameter list" is used to pass specific configuration information.
[0070] For example, if the first AT command is used to write IMEI configuration information, assuming the operation code is "SET_IMEI" and the IMEI code is "123456789012345", then the first AT command can be "AT+SET_IMEI 123456789012345". If the first AT command is used to retrieve IMEI configuration information, and the operation code is set to "GET_IMEI", then the first AT command can be "AT+GET_IMEI". After the module receives this first AT command, it will return the currently stored IMEI configuration information. Alternatively, for the IMEI configuration information recovery process, the terminal device can directly send the first AT command to the WWAN module. The first AT command can be "AT+GTRESCON_IMEI", which is used to restore the first configuration information of the WWAN module from the backup eSIM partition to the WWAN module and initialize the IMEI configuration information in the WWAN module. For another example, if the first AT command is used to write SN configuration information, assuming that the operation code is "SET_SN" and the SN number is "ABCDEFGHIJKLMNOP", then the first AT command can be "AT+SET_SN ABCDEFGHIJKLMNOP". If the first AT command is used to retrieve SN configuration information and the operation code is set to "GET_SN", then the first AT command can be "AT+GET_SN". After the module receives this first AT command, it will return the currently stored SN configuration information. Alternatively, for the SN configuration information recovery process, the terminal device can directly send the first AT command to the WWAN module. The first AT command can be "AT+GTRESCON_SN", which is used to restore the first configuration information of the WWAN module from the backup eSIM partition to the WWAN module and initialize the SN configuration information in the WWAN module. For example, if the first AT command is used to write UART configuration information, assuming the operation code is "SET_UART", to set the baud rate to 9600bps, the data bit to 8 bits, the stop bit to 1 bit, and no parity, then the first AT command can be "AT+SET_UART 9600, 8, 1, None". If the first AT command is used to retrieve UART configuration information, the operation code is set to "GET_UART", then the first AT command can be "AT+GET_UART". After the module receives this first AT command, it will return the currently stored UART configuration parameters, such as baud rate, data bit, stop bit, parity bit and other information. Alternatively, for the recovery process of UART configuration information, the terminal device can directly send the first AT command to the WWAN module. The first AT command can be "AT+GTRESCON_UART", which is used to restore the first configuration information of the WWAN module from the backed up eSIM partition to the WWAN module and initialize the UART configuration information in the WWAN module.For another example, if the first AT command is used to write DIPC configuration information, assuming the operation code is "SET_DIPC", if you want to set the shared memory size to 1024 bytes and the message queue length to 10, then the first AT command can be "AT+SET_DIPC1024,10". This is just a simple example, and the actual DIPC configuration information may be more complex and contain more parameters. If the first AT command is used to retrieve DIPC configuration information and the operation code is set to "GET_DIPC", then the first AT command can be "AT+GET_DIPC". After the module receives this first AT command, it will return the currently stored DIPC configuration information. Alternatively, for the DIPC configuration information recovery process, the terminal device can directly send the first AT command to the WWAN module. The first AT command can be "AT+GTRESCON_DIPC", which is used to restore the first configuration information of the WWAN module from the backup eSIM partition to the WWAN module, and initialize the DIPC configuration information in the WWAN module.
[0071] Among them, the terminal device sends the constructed first AT command through the communication interface with the WWAN module. After receiving the write command, the WWAN module will execute the first AT command. After executing the first AT command, the WWAN module can return a response message to the terminal device. The terminal device determines whether the first configuration information of the WWAN module is successfully written into the WWAN module based on the response message. The response message can be a simple status code (such as "OK" for success and "ERROR" for failure), or it can contain more detailed error information (such as error code and error description). If the write is successful, the terminal device can verify the first configuration information of the WWAN module; if the write fails, the cause of the error can be further analyzed, and the cause of the error may include command format error, configuration information not meeting the requirements, internal failure of the module, etc.
[0072] In a possible implementation, after the terminal device writes the first configuration information of the WWAN module into the WWAN module, the terminal device restarts the WWAN module to trigger the WWAN module to run the first configuration information. The terminal device can restart the WWAN module by sending a specific software instruction. In the scenario of using the AT command set, the terminal device can send an AT command of "AT+RESET" to trigger the restart of the WWAN module. The terminal device sends the AT command to the WWAN module, and the control unit of the WWAN module executes the internal restart program after receiving the AT command. If some WWAN modules are equipped with a hardware reset pin or button, the restart of the WWAN module can also be achieved by triggering this hardware reset mechanism. When the WWAN module restarts, it will go through an initialization phase. In this phase, the firmware or software of the WWAN module will check its internal storage area (such as internal registers, flash memory, etc.) to obtain configuration information. Since the terminal device has previously written the first configuration information into the WWAN module, the WWAN module will read the first configuration information during initialization. The WWAN module may apply the first configuration information in a certain order. Taking the communication interface configuration as an example, the WWAN module will first read and set the UART (Universal Asynchronous Receiver / Transmitter) related parameters, such as baud rate, data bit, stop bit and parity bit. Only after the UART configuration is completed will other types of configurations, such as DIPC configuration, be processed. Applying the first configuration information in a certain order helps ensure that each subsystem can be initialized correctly and cooperate with each other. After successfully loading and applying all the first configuration information, the WWAN module will enter the normal working state and start running according to the first configuration information. For example, the WWAN module can try to connect to the mobile network using the loaded network access configuration, communicate with other devices through the configured UART interface, or communicate between internal processes according to the DIPC configuration.
[0073] The above-mentioned default configuration recovery method of the WWAN module can improve the reliability of the WWAN module during the production, testing and upgrading process, avoid storing important data such as the default configuration in the partition of the WWAN module, and cause the use of the normal functions of the WWAN module, thereby ensuring that the WWAN module can operate normally under various test environments.
[0074] In an embodiment of the present application, the terminal device encrypts the first configuration information of the WWAN module through an encryption algorithm, obtains the second configuration information, and stores the second configuration information in the eSIM. When the first configuration information in the WWAN module is modified or deleted, the second configuration information is retrieved from the eSIM through the first AT command. In the case where the second configuration information is retrieved in the eSIM, the terminal device decrypts the second configuration information using the decryption algorithm corresponding to the encryption algorithm to obtain the first configuration information of the WWAN module. The terminal device writes the first configuration information of the WWAN module into the WWAN module. When the configuration information in the WWAN module is modified or deleted, the reliability, security and convenience of restoring the default configuration of the WWAN module can be improved.
[0075] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0076] See also Figure 3 , Figure 3 : is a schematic diagram of the structure of a communication device provided in an embodiment of the present application, and the communication device may include:
[0077] The encryption module 301 is used to encrypt the configuration information of the WWAN module by using an encryption algorithm to obtain first configuration information, and store the first configuration information in the eSIM;
[0078] The retrieval module 302 is used to retrieve the first configuration information in the eSIM through an AT command when the configuration information in the WWAN module is modified or deleted;
[0079] The decryption module 303 is used to decrypt the first configuration information using a decryption algorithm corresponding to the encryption algorithm to obtain the configuration information of the WWAN module when the first configuration information is retrieved from the eSIM;
[0080] The writing module 304 is used to write the configuration information of the WWAN module into the WWAN module.
[0081] In a feasible implementation, the writing module 304 is also used to write the first configuration information of the WWAN module into the eSIM through a second AT command; the encryption module 301 is also used to encrypt the first configuration information of the WWAN module stored in the eSIM through an encryption algorithm to obtain the second configuration information.
[0082] In a feasible implementation, the above-mentioned communication device also includes a verification module 305, which is used to verify whether the first configuration information written into the eSIM is the same as the first configuration information of the preset WWAN module; the encryption module 301 is also used to encrypt the first configuration information of the WWAN module stored in the eSIM by an encryption algorithm when the first configuration information written into the eSIM is the same as the first configuration information of the preset WWAN module.
[0083] In a feasible implementation, the writing module 304 is further configured to write the first configuration information of the WWAN module into a backup partition specified in the eSIM through a second AT command, where the eSIM includes one or more partitions.
[0084] In a feasible implementation, the communication device further includes a restart module 306, which is used to restart the WWAN module and trigger the WWAN module to run the first configuration information.
[0085] In a feasible implementation, the first configuration information further includes a universal asynchronous receiver-transmitter and a dual inter-process communication.
[0086] In a feasible implementation, the retrieval module 302 is also used to call an application programming interface to retrieve the second configuration information in the eSIM through a first AT command when the firmware switching service detects that the first configuration information in the WWAN module is modified or deleted; the application programming interface is used to execute the first AT command.
[0087] In a specific implementation, the communication device can execute the above-mentioned Figure 2 The steps or methods executed by the terminal device in the embodiment shown in the figure implement the functions implemented in the above method embodiment. For details, please refer to the above Figure 2 The corresponding descriptions provided in each step of the method embodiment are not repeated here.
[0088] In the embodiment of the present application, the encryption module 301 is used to encrypt the configuration information of the WWAN module through an encryption algorithm, obtain the first configuration information, and store the first configuration information in the eSIM; the retrieval module 302 is used to retrieve the first configuration information in the eSIM through an AT command when the configuration information in the WWAN module is modified or deleted; the decryption module 303 is used to decrypt the first configuration information using the decryption algorithm corresponding to the encryption algorithm when the first configuration information is retrieved in the eSIM to obtain the configuration information of the WWAN module; the writing module 304 is used to write the configuration information of the WWAN module into the WWAN module. When the configuration information in the WWAN module is modified or deleted, the reliability, security and convenience of restoring the default configuration of the WWAN module can be improved.
[0089] See also Figure 4 , Figure 4 4 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. It can be used to implement the steps of the configuration information recovery method of the WWAN module described in any of the above embodiments. The terminal device may include: a processor 401, a memory 402, a network interface 403 and a bus system 404.
[0090] The memory 402 includes but is not limited to RAM, ROM, EPROM or CD-ROM, and is used to store relevant instructions and data. The memory 402 stores the following elements, executable modules or data structures, or their subsets, or their extended sets:
[0091] Operation instructions: include various operation instructions, used to implement various operations.
[0092] Operating system: includes various system programs used to implement various basic businesses and handle hardware-based tasks.
[0093] Figure 4 Only one memory is shown in the figure, of course, the memory can also be set to multiple as needed.
[0094] Processor 401 may be a controller, CPU, general processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present application. As described in Embodiment 1, when the first configuration information in the WWAN module is modified or deleted, the process of retrieving the second configuration information in the eSIM through the first AT command. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0095] The network interface 403 may provide a network communication function, and may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). In the embodiment of the present application, the network interface 403 is used to execute the process of retrieving the second configuration information in the eSIM through the first AT command when the first configuration information in the WWAN module is modified or deleted as described in the first embodiment.
[0096] In a specific application, the various components of the terminal device are coupled together through the bus system 404, wherein the bus system 404 may include a power bus, a control bus, and a status signal bus in addition to a data bus. Figure 4 In the figure, various buses are labeled as bus system 404. For convenience of representation, Figure 4The drawing is only schematic.
[0097] It should be noted that in practical applications, the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed.
[0098] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). It should be noted that the memory described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memory.
[0099] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a computer, the method or steps executed by the terminal device in any of the above embodiments are implemented.
[0100] An embodiment of the present application also provides a computer program product, which, when executed by a computer, implements the method or steps of the terminal device in any of the above embodiments.
[0101] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0102] In short, the above is only a preferred embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application should be included in the protection scope of this application.
Claims
1. A method for restoring configuration information of a WWAN module, characterized in that: Applied to a terminal device, the method comprises: Encrypting first configuration information of a wireless wide area network WWAN module by an encryption algorithm to obtain second configuration information, and storing the second configuration information in an embedded user identity module eSIM; the first configuration information includes an international mobile equipment identity code of the WWAN module and a serial number of the WWAN module; When the first configuration information in the WWAN module is modified or deleted, retrieving the second configuration information in the eSIM through a first AT command; When the second configuration information is retrieved from the eSIM, decrypt the second configuration information using a decryption algorithm corresponding to the encryption algorithm to obtain the first configuration information of the WWAN module; The first configuration information of the WWAN module is written into the WWAN module.
2. The method according to claim 1, characterized in that The method of encrypting the first configuration information of the wireless wide area network WWAN module by using an encryption algorithm to obtain the second configuration information includes: Writing the first configuration information of the WWAN module into the eSIM through a second AT command; The first configuration information of the WWAN module stored in the eSIM is encrypted by an encryption algorithm to obtain second configuration information.
3. The method according to claim 2, characterized in that After writing the first configuration information of the WWAN module into the eSIM through the second AT command, the method further includes: Verifying whether the first configuration information written into the eSIM is the same as the preset first configuration information of the WWAN module; If the first configuration information written into the eSIM is the same as the preset first configuration information of the WWAN module, a step of encrypting the first configuration information of the WWAN module stored in the eSIM by using an encryption algorithm is performed.
4. The method according to claim 2, characterized in that Writing the first configuration information of the WWAN module into the eSIM through the second AT command includes: The first configuration information of the WWAN module is written into a backup partition specified in the eSIM through the second AT command, and the eSIM includes one or more partitions.
5. The method according to any one of claims 1 to 4, characterized in that After writing the first configuration information of the WWAN module into the WWAN module, the method further includes: Restarting the WWAN module triggers the WWAN module to run the first configuration information.
6. The method according to any one of claims 1 to 4, characterized in that The first configuration information also includes a universal asynchronous receiver / transmitter UART and a dual inter-process communication DIPC.
7. The method according to any one of claims 1 to 4, characterized in that The terminal device includes a firmware switching service for monitoring the WWAN module, and when the first configuration information in the WWAN module is modified or deleted, retrieving the second configuration information in the eSIM through a first AT command, comprising: When the firmware switching service detects that the first configuration information in the WWAN module is modified or deleted, an application programming interface is called to retrieve the second configuration information in the eSIM through a first AT command; the application programming interface is used to execute the first AT command.
8. A communication device, characterized in that: include: An encryption module, configured to encrypt the configuration information of the WWAN module by using an encryption algorithm to obtain first configuration information, and store the first configuration information in the eSIM; a retrieval module, configured to retrieve the first configuration information in the eSIM through an AT command when the configuration information in the WWAN module is modified or deleted; a decryption module, configured to, when the first configuration information is retrieved from the eSIM, decrypt the first configuration information using a decryption algorithm corresponding to the encryption algorithm to obtain the configuration information of the WWAN module; The writing module is used to write the configuration information of the WWAN module into the WWAN module.
9. A terminal device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store a computer program, and the processor is used to call the computer program so that the terminal device executes the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor, so that a terminal device having the processor executes the method according to any one of claims 1 to 7.