ESIM identification method and related device
By recognizing the interaction information of the SIM card, the problem of controlling pluggable eSIM cards in some regions has been solved, and the effective identification and restriction of eSIM cards has been achieved, meeting regional needs.
Patent Information
- Application Number
- CN202411764711.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2026-05-12
AI Technical Summary
In some regions, eSIM cards, especially removable eSIM cards, are not permitted, and existing technologies struggle to effectively identify and manage them.
By identifying the SIM card's interaction information, including ATR, OMAPI, AID, APDU header, and GPIO pin status, it can determine whether the SIM card is a removable eSIM card, and after identification, it can close its logic channels or power off to restrict its use.
Effectively identify and restrict the use of removable eSIM cards in electronic devices to meet the needs of certain regions and prevent unauthorized use.
Smart Images

Figure CN122028027A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to eSIM identification methods and related devices. Background Technology
[0002] Mobile communication devices can access mobile communication networks based on user authentication using a Subscriber Identity Module (SIM). Traditional SIM cards require prior activation by a mobile operator and must be inserted into the physical SIM card slot of the electronic device before use. SIM cards enable data communication services such as making and receiving calls and sending and receiving text messages. Once a user uses a traditional SIM card, the critical configuration files on the SIM card cannot be updated.
[0003] With the development of mobile communication technology, embedded SIM (eSIM) cards have been proposed based on traditional SIM cards. Compared with traditional SIM cards, eSIM cards are programmable and can be remotely configured via Over-the-Air (OTA) technology, enabling functions such as remote activation, deactivation, and activation of the card.
[0004] However, some regions currently have a demand that eSIM not be allowed. How to manage eSIM in response to this demand remains to be studied. Summary of the Invention
[0005] This application provides an eSIM identification method that can identify the removable eSIM card used by an electronic device, thereby controlling the removable eSIM card and restricting the electronic device from continuing to use the removable eSIM card.
[0006] In a first aspect, this application provides an eSIM identification method, the method comprising: powering on a first user identification module SIM card; and stopping the use of the removable eSIM card when the first SIM card is identified as a removable eSIM card.
[0007] By implementing the embodiments of this application, it is possible to effectively identify the removable eSIM card used by electronic devices, and then manage the removable eSIM card to restrict the use of removable eSIM cards by electronic devices, thereby meeting the needs of some regions that do not allow the use of removable eSIM cards.
[0008] In one implementation, the method further includes: when the first SIM card is detected to be a physical SIM card in a card slot, and when the interaction information of the first SIM card meets a preset condition, identifying the first SIM card as a removable eSIM card, wherein the interaction information of the first SIM card meeting the preset condition indicates that the first SIM card is an eSIM card. By implementing the embodiments of this application, when the SIM card is detected to be a physical SIM card in a card slot, and the SIM card is identified as an eSIM card based on the SIM card's interaction information, a removable eSIM card is effectively identified, thereby stopping the use of the removable eSIM card, thus restricting the use of removable eSIM cards in electronic devices and meeting the requirement that some regions do not allow the use of removable eSIM cards.
[0009] In one implementation, the preset conditions include some or all of the following conditions: A first condition includes: the preset field of the reset response ATR of the first SIM card includes an eSIM identifier; a second condition includes: the application that calls the Open Mobile Interface (OMAPI) to interact with the first SIM card is an authorized application of the eSIM card; a third condition includes: an eSIM-specific SIM application is selected from the first SIM card; and a fourth condition includes: the Application Protocol Data Unit (APDU) header that interacts with the first SIM card includes eSIM-specific instructions. By implementing the embodiments of this application, based on some or all of the above-mentioned first to fourth conditions, a removable eSIM card can be effectively identified, thereby restricting the continued use of the removable eSIM card by electronic devices.
[0010] In one implementation, the electronic device includes a first communication module and an application processor. The first communication module includes a modem, and the interaction information of the first SIM card includes an ATR (Automatic Transfer Record). Detecting that the interaction information of the first SIM card satisfies a first condition includes: after the modem powers on the first SIM card, the first communication module obtains the ATR fed back from the first SIM card to the modem; the first communication module sends the ATR to the application processor; and the application processor detects that a preset field of the ATR includes an eSIM identifier. By implementing the embodiments of this application, a removable eSIM card can be effectively identified based on the eSIM identifier in the preset field of the ATR, thereby restricting the electronic device from continuing to use the removable eSIM card.
[0011] In one implementation, the electronic device includes a first communication module and an application processor. The first communication module includes a modem. The interaction information of the first SIM card includes applications that interact with the first SIM card by calling OMAPI. Detecting that the interaction information of the first SIM card satisfies a second condition includes: after the modem powers on the first SIM card, when it detects that OMAPI has been called, the first communication module notifies the application processor that OMAPI has been called; the application processor detects that the application calling OMAPI is an authorized application of the eSIM card. Implementing the embodiments of this application can effectively identify removable eSIM cards based on authorized applications calling OMAPI, thereby restricting the continued use of removable eSIM cards by the electronic device.
[0012] In one implementation, the authorized application of the eSIM card meets some or all of the following characteristics: it is an application in a preset whitelist and has a system signature encrypted with a preset encryption key.
[0013] In one implementation, the electronic device includes a first communication module and an application processor. The interaction information of the first SIM card includes an application identifier (AID) of a SIM application selected from the first SIM card. Detecting that the interaction information of the first SIM card satisfies a third condition includes: the first communication module determining the AID of the first SIM application selected from the first SIM card; the first communication module sending the AID of the first SIM application to the application processor; and the application processor detecting, based on the AID, that the first SIM application is a SIM application specific to eSIM. Implementing embodiments of this application allows for effective identification of removable eSIM cards based on the AID of the eSIM-specific SIM application selected from the SIM card, thereby restricting the continued use of removable eSIM cards by the electronic device.
[0014] In one implementation, eSIM-specific SIM applications include: Issuer Security Domain File (ISD-P), Issuer Security Domain Root (ISD-R), ECASD (credentials required to support eUICC security domains), Local Profile Assistant (LPA), etc.
[0015] In one implementation, the electronic device includes a first communication module and an application processor. The first communication module includes a modem, and the interaction information of the first SIM card includes an APDU header interacting with the first SIM card. Detecting that the interaction information of the first SIM card satisfies a fourth condition includes: the first communication module acquiring the APDU header interacting with the modem; the first communication module sending the APDU header to the application processor; and the application processor detecting that the APDU header includes eSIM-specific instructions. Implementing embodiments of this application allows for effective identification of removable eSIM cards based on the eSIM-specific instructions in the APDU header interacting with the SIM card, thereby restricting the continued use of removable eSIM cards by the electronic device.
[0016] In one implementation, the electronic device includes a first communication module and an application processor. The method further includes: after the first SIM card is powered on, the first communication module determines the numbers of the general purpose input / output (GPIO) pins of the communication module connected to the first SIM card; the first communication module sends the GPIO pin numbers to the application processor; detecting that the first SIM card is a physical SIM card in the card slot includes: the application processor determining that the first SIM card is a physical SIM card in the card slot based on the GPIO pin numbers. Implementing the embodiments of this application allows for effective identification of pluggable eSIM cards based on the GPIO pins connected to the SIM card, thereby restricting the continued use of pluggable eSIM cards by the electronic device.
[0017] In one implementation, when the GPIO pin connected to the first SIM card corresponds to a SIM switch, the method further includes: a first communication module determining the on / off state of the SIM switch; the first communication module sending the on / off state of the SIM switch to the application processor; detecting that the first SIM card is a physical SIM card in the card slot includes: the application processor determining that the first SIM card is a physical SIM card in the card slot based on the GPIO pin number and the on / off state of the SIM switch. Implementing the embodiments of this application allows for effective identification of pluggable eSIM cards based on the GPIO pin connected to the SIM card and the on / off state of the SIM switch corresponding to that GPIO pin, thereby restricting the continued use of pluggable eSIM cards by electronic devices.
[0018] In one implementation, stopping the use of the removable eSIM card includes: closing the logical channel between the removable eSIM card and the modem; and / or, powering off the removable eSIM card. By implementing the embodiments of this application, after identifying the removable eSIM card, closing its logical channel and powering it off can restrict the continued use of the removable eSIM card by electronic devices, thus meeting the needs of regions where the use of removable eSIM cards is not permitted.
[0019] Secondly, embodiments of this application provide an electronic device, which includes a processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, and the processor reading the computer instructions from the memory to cause the electronic device to execute the eSIM identification method described in the first aspect.
[0020] Thirdly, embodiments of this application provide a computer storage medium including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the eSIM identification method in any of the possible implementations of any of the above aspects.
[0021] Fourthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to execute the eSIM identification method in any of the possible implementations of any of the above aspects. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0023] Figure 2 This is a schematic diagram of an eSIM architecture provided in an embodiment of this application;
[0024] Figure 3A A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;
[0025] Figures 3B to 3E This is a schematic diagram of the SIM card connection provided in an embodiment of this application;
[0026] Figure 4A and Figure 4B This is a schematic diagram of an eSIM interface provided in an embodiment of this application;
[0027] Figure 5 A flowchart illustrating an eSIM identification method provided in an embodiment of this application;
[0028] Figure 6A and Figure 6B A flowchart illustrating another eSIM identification method provided in an embodiment of this application;
[0029] Figure 7A and Figure 7B A flowchart illustrating another eSIM identification method provided in an embodiment of this application;
[0030] Figure 8A and Figure 8B A flowchart illustrating another eSIM identification method provided in an embodiment of this application;
[0031] Figure 9A and Figure 9B A flowchart illustrating another eSIM identification method provided in an embodiment of this application;
[0032] Figure 10 This is a flowchart illustrating another eSIM identification method provided in an embodiment of this application. Detailed Implementation
[0033] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0034] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0035] For ease of understanding, the technical concepts involved in the embodiments of this application will be introduced below.
[0036] SIM: A SIM card is a Universal Integrated Circuit Card (UICC) that enables mobile communication and is activated by a mobile operator for its users. The SIM card stores user-related data, including raw system data stored by the SIM card manufacturer, network parameters and user data injected by the mobile operator during activation (such as authentication and encryption information), and data stored by the user during use (such as SMS messages and contacts). Electronic devices interact with the mobile network through the SIM card to perform functions such as calls and data communication.
[0037] SIM card slot: The card slot may include a card holder and a card tray, wherein the card tray may include a position for fixing at least one card, and the card holder includes at least one SIM connector for connecting a physical SIM card. In this embodiment, the SIM card slot may also be referred to as a card slot, physical card slot, etc.
[0038] Traditional SIM card: This is a removable physical SIM card. Users need to go to the mobile operator's offline / online business hall in advance to select a number and register for the network. After activation, it can be inserted into the SIM card slot of the electronic device to be used.
[0039] eSIM cards are SIM cards that can be remotely configured and activated via OTA (Over-The-Air) updates, enabling functions similar to traditional SIM cards. Specifically, eSIM cards can download, install, activate, deactivate, and delete operator configuration files via OTA. They can write or erase configuration information from any operator (such as user identity and operator subscription information), allowing users greater flexibility in choosing operator plans and activating or switching to different services offered by different operators online through a network management platform. eSIM cards can store multiple eSIM profiles from different operators; each eSIM profile can independently constitute a SIM application, and each SIM application functions as a SIM card. eSIM cards can also be called eSIM modules or universal integrated circuit cards (UICCs), or eUICCs. Physically, eSIM cards can be divided into patch eSIM cards and pluggable eSIM cards.
[0040] A patch-type eSIM card integrates the UICC (User-Defined Integrated Circuit) into the electronic device, rather than adding it as a separate removable component. The patch-type eSIM is inseparable from the electronic device. For example, the eSIM can be integrated into a system-on-chip (SoC), modem chip, or near-field communication (NFC) chip; this application does not impose any limitations on this.
[0041] A removable eSIM card is a physical eSIM card that can be detached from the electronic device. Its installation method is the same as a traditional SIM card, i.e., it is inserted into the SIM card slot. In this way, existing electronic devices that do not have a patch-type eSIM card can also achieve eSIM functionality by installing a removable eSIM.
[0042] Internal SIM refers to a general term for SIM cards that do not require a card slot, are programmable, can be remotely configured and activated, and are inseparable from electronic devices. Examples include patch-type eSIM cards, virtual SIMs (vsim), and integrated SIMs (iSIM). The following embodiments will primarily use patch-type eSIM cards as an example for illustrative purposes.
[0043] In some embodiments, the electronic device 100 is provided with a SIM card slot, which can be used to install a removable eSIM card and / or a traditional SIM card. How the electronic device 100 identifies whether the currently used SIM card is an eSIM card when using a SIM card (e.g., a traditional SIM card, a patch eSIM card, or a removable eSIM card) requires further investigation.
[0044] In one usage scenario, there is a need in some regions to prohibit the use of eSIM cards. The eSIM identification method provided in this application can effectively identify the eSIM card used by the electronic device 100 to address this need, thereby controlling the eSIM card and preventing the electronic device 100 from continuing to use it.
[0045] In another use case, some regions have a requirement to disallow the use of removable eSIM cards, but do not restrict the use of patch eSIM cards. The eSIM identification method provided in this application can effectively identify the removable eSIM card used by the electronic device 100 to address the above requirements, thereby controlling the removable eSIM card and preventing the electronic device 100 from continuing to use it.
[0046] The eSIM identification method provided in the embodiments of this application will be described in detail below.
[0047] In this application embodiment, the electronic device 100 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device, etc., and other electronic devices with SIM card slots. This application embodiment does not impose any special restrictions on the specific type of electronic device.
[0048] The structure of the electronic device 100 provided in the embodiments of this application is described below. Figure 1 A schematic diagram of the structure of an electronic device 100 is shown.
[0049] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0050] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0051] Processor 110 may include one or more processing units, such as application processor (AP), modem, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0052] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0053] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0054] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0055] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0056] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0057] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0058] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0059] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0060] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0061] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0062] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0063] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0064] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0065] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0066] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0067] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0068] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0069] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, frequency modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.
[0070] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0071] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0072] The display screen 194 is used to display images, videos, and other information. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0073] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0074] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0075] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0076] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0077] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0078] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0079] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0080] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), and double data rate synchronous dynamic random access memory (DDR SDRAM, such as fifth-generation DDR SDRAM, which is generally called DDR5 SDRAM). Non-volatile memory can include disk storage devices and flash memory.
[0081] Flash memory can be classified according to its operating principle, including NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.; according to the level of the storage cell, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc.; and according to the storage specification, including universal flash storage (UFS) and embedded multimedia card (eMMC), etc.
[0082] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.
[0083] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.
[0084] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0085] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0086] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0087] The loudspeaker 170A, also known as a "loudspeaker", is used to convert audio electrical signals into sound signals.
[0088] The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals.
[0089] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.
[0090] The 170D headphone jack is used to connect wired headphones.
[0091] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals.
[0092] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100.
[0093] The 180C barometric pressure sensor is used to measure barometric pressure.
[0094] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0095] The accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes).
[0096] Distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser.
[0097] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode.
[0098] The 180L ambient light sensor is used to detect ambient light intensity.
[0099] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, etc.
[0100] The 180J temperature sensor is used to detect temperature.
[0101] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event.
[0102] The bone conduction sensor 180M can acquire vibration signals.
[0103] Button 190 includes the power button, volume buttons, etc. Button 190 can be a mechanical button or a touch button.
[0104] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.
[0105] Indicator 192 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0106] The SIM card interface 195 is used to connect a SIM card. A physical SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support various SIM module sizes, meaning it is compatible with different SIM module sizes, such as Nano SIM cards, Micro SIM cards, and standard-sized SIM cards. The SIM card interface 195 is also compatible with different types of SIM cards; multiple cards can be inserted into the same SIM card interface 195 simultaneously, and these cards can be of the same or different types. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to achieve functions such as calls and data communication. It can be understood that the SIM card interface 195 is the hardware interface between the electronic device 100 and the SIM card, and can be used to connect a pluggable physical SIM card in the SIM card slot.
[0107] In some embodiments, the electronic device 100 includes a patch eSIM card, which is integrated inside the electronic device 100 and inseparable from it. The electronic device 100 can also interact with the network through the patch eSIM card to realize functions such as making calls and data communication.
[0108] In this embodiment of the application, the electronic device 100 may be a single-card single-pass device, a dual-card single-pass device, a dual-card dual-pass device, a multi-card multi-pass device, or a multi-card multi-pass device, etc., and this embodiment of the application does not specifically limit it.
[0109] For example, Figure 2 A schematic diagram of an eSIM card architecture is shown.
[0110] like Figure 2 As shown, an eSIM card may include an eUICC operating system and various profiles.
[0111] The eUICC operating system includes: Profile Rules Enforce, Profile Package Interpreter, and Telecom Framework.
[0112] The various eSIM profiles mentioned above can include: Operator-disabled Profile, Operator-disabled Profile, Local Profile Assistant from eSIM (LPAe), Issuer Security Domain-Root (ISD-R), and Embedded UICC Controlling Authority Security Domain (ECASD). The Operator-disabled Profile can include: Issuer Security Domain-Profile (ISD-P), Mobile network operator Security Domain (MNO-SD), File System, Network Access Application service (NAAS), Apples, Secondary Secure Domain (SSD), and UICC Controlling Authority Security Domain (CASD). Similarly, the files in the Operator-disabled Profile can be found in the Operator-available Profiles, and will not be elaborated upon here.
[0113] ISD-P is a secure container for hosting profiles. ISD-P works with a profile package interpreter for profile downloading and installation, decoding / interpreting received profile packages. The subscription manager-data preparation plus server (SM-DP+) is responsible for requesting the creation of ISD-Ps in the eSIM and managing the lifecycle of the requested ISD-Ps.
[0114] ISD-R includes LPA Services, which are responsible for creating new ISD-Ps and managing the lifecycle of all ISD-Ps. LPA Services provide the services and data required for LPA functionality. The LPA Services in eSIM can interact with LPAd in electronic devices. LPAd is used to obtain the address and password of the SM-DP+ server and establish a communication connection with SM-DP+ based on the SM-DP+ server's address and password.
[0115] The LPA is the core module for managing profiles in eUICC; when running in eSIM, the LPA can be called LPAe, which is the medium for interaction between the eSIM card and SM-DP+. Optionally, the LPAe can obtain the address information of SM-DP+ from the SubscriptionManager Discovery Server (SM-DS); the LPAe can also download the profile from SM-DP+ to the eSIM.
[0116] ECASD is the credential required to support the security domains on an eUICC. There is typically only one ECASD and one ISD-R on an eSIM.
[0117] In this embodiment, the software system of the electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment uses the layered architecture Android system as an example to illustrate the software structure of the electronic device 100.
[0118] See Figure 3A , Figure 3A This diagram illustrates a software structure block diagram of an electronic device provided by an embodiment of this application. The electronic device 100 can effectively identify the eSIM card / removable eSIM card in the electronic device 100, and thus manage the eSIM card / removable eSIM card.
[0119] like Figure 3A As shown, the layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided from top to bottom into the application layer, application framework layer, system libraries, hardware abstraction layer (HAL), and kernel layer. Wherein:
[0120] The application layer includes a series of application packages, such as calling applications, music applications, screen mirroring applications, and so on.
[0121] In some embodiments, the application layer may further include an eSIM activation application (APP), which may include a local profile assistant for device (LPAd). The eSIM activation application is the management software for the eSIM card, used to maintain the downloading, activation, deletion, and display of various profiles within the eSIM card hardware. Furthermore, other applications (such as mobile operators' online service hall APPs) can obtain information such as profiles within the eSIM card through the corresponding interfaces provided by the eSIM activation application. When the LPA runs on the electronic device, it may be referred to as LPAAd; LPAAd can be used to interact with the operator-provided eSIM server (such as SM-DP+) to perform related operations, such as downloading profiles from SM-DP+.
[0122] The eSIM activation application can run as a system-level application in the operating system of the electronic device 100, or it can be integrated into the eSIM card. This application embodiment does not impose any restrictions on this.
[0123] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The API is used to enable communication between the application layer and the protocol stack, HAL layer, and kernel layer. The application framework layer includes a number of predefined functions.
[0124] like Figure 3A As shown, the application framework layer mainly includes system services. System services are background service components in the Android operating system that provide access to system resources and functions. Common system services include ActivityManager, WindowManager, PackageManager, and so on.
[0125] In this embodiment, the System Server may further include an eSIM identification module and an Open Mobile API (OMAPI). The eSIM identification module can be used to identify whether an eSIM card is being used, or specifically to identify whether a removable eSIM card is being used. OMAPI is an interface service for accessing device security elements (such as traditional SIM cards and eSIM cards). Applications can access data in the SIM card through OMAPI. In one implementation, OMAPI can connect to the eSIM card at the hardware layer through a SIM card interface driver based on the International Organization for Standardization (ISO) 7876 standard, such as a Serial Peripheral Interface (SPI) driver or an ISO 7816 driver located at the kernel layer. This allows the LPA to interact with the eSIM card and perform related operations (such as update operations) on the system data in the eSIM card.
[0126] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0127] System libraries support the application framework layer and act as a link between it and the kernel layer. System libraries can include multiple functional modules, such as the Bluetooth protocol stack.
[0128] The HAL layer and kernel layer are used to respond to system service calls in the application framework layer and perform corresponding operations.
[0129] The kernel layer is an abstraction layer between hardware and software, providing the core system services of the operating system. This layer has many drivers that drive the hardware-related hardware, such as display drivers, camera drivers, and sensor drivers.
[0130] In some embodiments, such as Figure 3AAs shown, the communication module 1 (e.g., a baseband processor) of the electronic device 100 includes a modem. The upper-layer software system of the electronic device 100 can interact with the SIM card through the modem to access the mobile network and realize functions such as voice and data transmission, calls, and SMS. In one implementation, the modem interacts with the SIM card through an Application Protocol Data Unit (APDU), which contains application layer control information and data. For example, when the modem interacts with the eSIM card through the APDU, the APDU header may include eSIM-specific commands. In this embodiment, the communication module 1 can also be referred to as the first communication module.
[0131] In some embodiments, such as Figure 3A As shown, communication module 1 also includes a smart card interface (Serial Communication Interface, SCI), an SCI driver, and a modem. The SCI driver and SCI can be used to control the connection relationship between different modems and different SIM modules (e.g., physical SIM cards, patch SIM cards). The SCI can connect to a pluggable physical SIM card (e.g., a traditional SIM card, a pluggable SIM card) through the SIM card interface, or it can connect to a patch SIM card. Communication module 1 can obtain the connection relationship between the modem and the SIM module through the SCI driver and report it to the upper-layer software system. In one implementation, the eSIM identification module can determine whether the currently used SIM card is a physical SIM card in the SIM card slot based on the above connection relationship. For example, Figures 3B to 3E Examples of four connection relationships between a modem and a SIM module are shown.
[0132] Example 1: such as Figure 3B As shown, electronic device 100 may include at least one modem (e.g., modem 0), at least one SCI (e.g., SCI 0), and at least one SIM card interface (e.g., SIM card interface 0). Electronic device 100 may not include an internal SIM (e.g., a patch-type eSIM card). After a physical SIM card 0 is inserted into SIM card interface 0, modem 0 connects to physical SIM card 0 via SCI 0. The removable physical SIM card 0 can be a traditional SIM card or a removable eSIM card. Electronic device 100 can be a single-SIM-per-use electronic device.
[0133] Example 2: such as Figure 3CAs shown, electronic device 100 may include Modem 0, SCI 0, SIM card interface 0, and internal SIM (e.g., a patch eSIM card). After a physical SIM card 0 is inserted into SIM card interface 0, the connection of SCI 0 to the patch eSIM card or physical SIM card 0 can be controlled via a SIM switch connected to SCI 0, thereby controlling the connection of Modem 0 to either the patch eSIM card or physical SIM card 0. It can be understood that the patch eSIM card or physical SIM card 0 can share Modem 0 in a time-sharing manner. Electronic device 100 can be a dual-SIM single-pass electronic device.
[0134] Example 3: such as Figure 3D As shown, electronic device 100 may include Modem0, Modem1, SCI 0, SCI 1, SIM card interface 1, and internal SIM (e.g., a patch eSIM card). After a physical SIM card 0 is inserted into SIM card interface 0, Modem0 can connect to the physical SIM card 0 via SCI 0; Modem1 can connect to the patch eSIM card via SCI 1, and the patch eSIM card exclusively uses Modem1. Electronic device 100 can be a dual-SIM dual-standby electronic device.
[0135] Example 4: Figure 3E As shown, the electronic device 100 may include Modem0, Modem1, SCI 0, SCI 1, SIM card interface 0, SIM card interface 1, and an internal SIM (e.g., a patch-type eSIM card). After inserting a physical SIM card 0 into SIM card interface 0 and a physical SIM card 1 into SIM card interface 1, Modem0 can connect to the physical SIM card 1 via SCI 0. Through a SIM switch connected to SCI 1, SCI 1 can be controlled to connect to either the patch-type eSIM card or the physical SIM card 1, thereby controlling Modem1 to connect to either the patch-type eSIM card or the physical SIM card 1. The electronic device 100 can be a triple-SIM dual-standby electronic device.
[0136] The functions of SCI 0 and SCI 1 can be implemented in hardware or software. If implemented in hardware, they can be GPIO pins of communication module 1 (e.g., a baseband processor), meaning SCI 0 and SCI 1 are SCI hardware interfaces. The SCI driver can be implemented in software. In one implementation, the SCI driver can also be a modem driver program or instruction running on communication module 1.
[0137] For example, SCI 0 and SCI 1 are GPIO pins of communication module 1 (e.g., baseband processor); SCI 0 and SCI 1 are connected to different modems, that is, the GPIO pins corresponding to SCI 0 and SCI 1 are connected to different modems. In some embodiments, the SCI driver can determine whether the SIM card is a physical SIM card in the SIM card slot based on the GPIO pins of the SIM card connection to communication module 1.
[0138] For example, see Figure 3B and Figure 3D The GPIO pins of the communication module 1 connected to the pluggable physical SIM card and the patch SIM card are different. In subsequent embodiments, the SCI driver can determine whether the SIM card is a physical SIM card in the SIM card slot based on the GPIO pins of the SIM card connected to the communication module 1.
[0139] For example, see Figure 3C and Figure 3E Different physical SIM cards connected to different SIM card interfaces have different GPIO pins connected to communication module 1. Physical SIM card 0 and the surface-mount eSIM card have the same GPIO pins connected to communication module 1, but the corresponding SIM switch states are different. For example, a switch state of 0 indicates that the GPIO pin corresponding to SCI 1 is connected to physical SIM card 0; a switch state of 1 indicates that the GPIO pin corresponding to SCI 1 is connected to the surface-mount eSIM card. In subsequent embodiments, the SCI driver can determine whether the SIM card is a physical SIM card in the SIM card slot based on the GPIO pin of the SIM card connected to communication module 1 and the switch state corresponding to that GPIO pin.
[0140] It should be noted that, Figures 3B to 3E These are merely examples provided in the embodiments of this application. The embodiments of this application do not specifically limit the number of Modems, the number of SIM modules, or the connection relationship between Modems and SIM modules.
[0141] For example, such as Figures 3A to 3E As shown, the SIM card slot of the electronic device 100 can accept a traditional SIM card or a removable eSIM card, and the electronic device 100 can also embed a patch-type eSIM card. In this embodiment, after the modem of the electronic device 100 powers on the SIM card, the electronic device 100 can identify whether the SIM card is an eSIM card and thus manage the eSIM card; or, the electronic device 100 can identify whether the SIM card is specifically a removable eSIM card and thus manage the removable eSIM card.
[0142] For example, a user inserts a removable eSIM card into the SIM card slot 1 (i.e., SIM1) of electronic device 100, and installs an eSIM application on electronic device 100. An eSIM application refers to an application that provides network services based on an eSIM card. Optionally, an eSIM application specifically refers to a third-party application. For example, Figure 4A and Figure 4B The diagram shows a comparison of interfaces that allow the use of removable eSIM cards and those that restrict the use of removable eSIM cards.
[0143] Figure 4A This illustrates an interface showing a user successfully using an eSIM application when a removable eSIM card is allowed. In one implementation, after detecting a user action to open the eSIM application, the eSIM application successfully performs network services based on the eSIM card, and the eSIM application displays... Figure 4A The interface 11 shown indicates that the electronic device 100 is compatible with the aforementioned eSIM application, and the SIM card slot compatible with the aforementioned eSIM application is a SIM 1 with a removable eSIM card inserted. The interface 11 may include a continue button 101, which is used to trigger the display of other application interfaces of the eSIM application.
[0144] Based on the eSIM identification method provided in this application Figure 4B This document illustrates an interface where a user fails to use an eSIM application when the use of a removable eSIM card is restricted. In one implementation, based on the eSIM identification method provided in this application, after the removable eSIM card inserted into SIM1 is powered on, the electronic device 100 controls it to power off; after detecting a user operation to open the eSIM application, the eSIM application fails to successfully access the eSIM card for network services, and the eSIM application displays... Figure 4B Interface 12 is shown. Interface 12 indicates that electronic device 100 is not compatible with the aforementioned eSIM application.
[0145] Based on the aforementioned technical concepts, electronic devices, software systems, and SIM cards, the method flow of the eSIM card identification method provided in the embodiments of this application will be described in detail below.
[0146] In the first embodiment of this application, the electronic device 100 can effectively identify whether the powered-on SIM card is a removable eSIM card, thereby restricting the use of removable eSIM cards. For example, Figure 5 A method flow for an eSIM card identification method is shown, which includes steps S101 to S105.
[0147] S101, Electronic device 100 powers on SIM card 1.
[0148] In this embodiment of the application, SIM card 1 may also be referred to as the first SIM card.
[0149] The following describes four scenarios where electronic device 100 powers on SIM card 1. Scenario 1: Electronic device 100 powers on SIM card 1 when it is powered on or restarted; SIM card 1 can be a physical SIM card inserted into the card slot or a patch-type eSIM card. Scenario 2: Electronic device 100 powers on SIM card 1 when it detects SIM card 1 inserted into the card slot while powered on; SIM card 1 is a physical SIM card. Scenario 3: Electronic device 100 has multiple SIM cards; when a user switches the currently used SIM card to SIM card 1 during use of electronic device 100, electronic device 100 powers on SIM card 1; SIM card 1 can be a traditional SIM card or an eSIM card.
[0150] S102, Electronic device 100 determines whether SIM card 1 is a physical SIM card in the card slot; if yes, then execute S103; if no, then execute S105.
[0151] In some embodiments, the electronic device 100 can obtain the numbers of the GPIO pins (i.e., SCI hardware interfaces, such as SCI 0 and SCI 1) of the SIM card 1 connecting to the communication module 1. The electronic device 100 can identify whether the SIM card is a physical SIM card in the SIM card slot based on these numbers. For example, see... Figure 3D The GPIO pin number can indicate SCI 0 or SCI 1; when the GPIO pin number indicates SCI 0, the electronic device 100 determines that SIM card 1 is a pluggable physical SIM card connected to SIM card interface 0; when the GPIO pin number indicates SCI 1, the electronic device 100 determines that SIM card 1 is a patch eSIM card.
[0152] In some embodiments, when SIM card 1 is connected to the GPIO pin of communication module 1 via SIM card switch, electronic device 100 can obtain the number of the GPIO pin of SIM card 1 connected to communication module 1, and the on / off state of the SIM card switch; electronic device 100 can identify whether SIM card 1 is a physical SIM card in the SIM card slot based on the number and the on / off state. For example, see... Figure 3EThe GPIO pin number can indicate SCI 0 or SCI 1, and the SIM switch corresponding to SCI 0 has a switch state of 0 or 1; when the GPIO pin number indicates SCI 1, or when the GPIO pin number indicates SCI 0 and the switch state is 0, the electronic device 100 determines that the SIM card 1 is a pluggable physical SIM card; when the GPIO pin number indicates SCI 0 and the switch state is 1, the electronic device 100 determines that the SIM card 1 is a patch eSIM card.
[0153] This application is not limited to using GPIO pins to determine whether SIM card 1 is a physical SIM card in the card slot. Other methods can also be used to determine this, such as using DET pin, VDD pin, interrupt PIN, etc., which are used for hot-swapping of the card slot to detect the physical SIM card in the card slot. No specific limitation is made here.
[0154] S103. Electronic device 100 determines whether the interaction information 1 of SIM card 1 meets the preset conditions; if yes, then execute S104; if no, then execute S105.
[0155] If the interaction information 1 of SIM card 1 meets the preset conditions, it indicates that SIM card 1 is an eSIM card; otherwise, it indicates that SIM card 1 is not an eSIM card.
[0156] In some embodiments of this application, after the SIM card 1 is powered on, the electronic device 100 can obtain interaction information related to the SIM card 1; when the interaction information includes interaction information 1, the electronic device 100 can identify whether the SIM card is an eSIM card based on interaction information 1. Interaction information 1 may include some or all of the following: preset fields in the answer to reset (ATR) response fed back by the SIM card 1, the application identifier (e.g., package name, system signature) of the application that calls OMAPI to interact with the SIM card 1, the application identifier of the SIM application selected in the SIM card 1, and the instructions in the APDU header interacting with the SIM card 1. In some embodiments, when interaction information 1 meets preset conditions, the electronic device 100 identifies the SIM card as an eSIM card. The preset conditions may include some or all of the first to fourth conditions.
[0157] First condition: The default fields in the ATR returned by SIM card 1 include the eUICC flag. The eUICC flag can also be referred to as the eSIM flag.
[0158] The second condition is that the application that calls OMAPI to interact with SIM card 1 is an authorized application of the eSIM card.
[0159] Third condition: Select the eSIM-specific SIM application in SIM card 1.
[0160] Fourth condition: The APDU header used for interaction with SIM card 1 includes eSIM-specific instructions.
[0161] Step S102 is optional. In some embodiments, the electronic device 100 assumes that the device does not have an embedded internal SIM card (e.g., a patch eSIM card), and therefore does not need to execute S102.
[0162] S104. Confirm that SIM card 1 is a removable eSIM card, and electronic device 100 stops using SIM card 1.
[0163] In some embodiments, the electronic device 100 stops using the SIM card 1, specifically including some or all of the following: the electronic device 100 deactivates the SIM card 1; closes the logical channel between the SIM card 1 and the modem; and powers off the SIM card 1.
[0164] It is understandable that if step S102 identifies SIM card 1 as a physical SIM card in the SIM card slot, and step S103 identifies SIM card 1 as an eSIM card, then SIM card 1 can be determined to be a removable eSIM card; otherwise, SIM card 1 is determined not to be a removable eSIM card.
[0165] S105. Confirm that SIM card 1 is not a removable eSIM card, and electronic device 100 interacts normally with SIM card 1.
[0166] It is understood that in step S105, the electronic device 100 can interact normally with the SIM card 1 using conventional technical means, and this application embodiment does not specifically limit this.
[0167] This application embodiment does not specifically limit the execution order of steps S102 and S103. In another implementation, the eSIM identification module may first execute S103 to determine whether SIM card 1 is an eSIM card based on preset conditions; if SIM card 1 is not an eSIM card, then execute S105, that is, the electronic device 100 interacts normally with SIM card 1. If it is an eSIM card, then execute S102 to determine whether the eSIM card is a physical SIM card in the card slot; if it is a physical SIM card, then determine that SIM card 1 is a removable eSIM card, and execute S104 to restrict the electronic device 100 from continuing to use SIM card 1; otherwise, determine that SIM card 1 is not a removable eSIM card, and execute S105. In another implementation, the electronic device 100 may also execute S102 and S103 simultaneously.
[0168] In Scheme 1, the electronic device 100 may include a communication module 1 and an application processor, and is equipped with a SIM card 1. The communication module 1 includes an SCI driver and a modem, and the application processor includes an eSIM identification module. The following provides a detailed description of four embodiments of Scheme 1 (i.e., Embodiments 1 to 4).
[0169] In Embodiment 1, the electronic device 100 can identify a removable eSIM card based on the eUICC identifier in a preset field of the ATR, thereby restricting the use of removable eSIM cards. For example, Figure 6A A method flow for an eSIM card identification method is shown, which includes steps S201 to S205.
[0170] S201, Electronic device 100 powers on SIM card 1.
[0171] In some embodiments, such as Figure 6B As shown, step S201 may specifically include steps S201A to S201C.
[0172] S201A, the application processor sends a power-on command to the communication module 1.
[0173] S201B: Based on the above power-on command, the Modem of the communication module 1 powers on the SIM card 1.
[0174] After the S201C and SIM card 1 are successfully powered on, they send a power-on response to the modem.
[0175] For example, refer to Figure 3A The modem can power on SIM card 1 via SCI; SIM card 1 sends a power-on response to the modem via SCI.
[0176] In some embodiments, the card slot includes a card holder with an insertion detection sensor. When a SIM card is inserted into the card slot, i.e., connected to the SIM card interface, the insertion detection sensor on the card holder detects a high voltage level. When the SIM card is removed from the card slot, i.e., when the SIM card is not connected to the SIM card interface, the insertion detection sensor detects a low voltage level. When the application processor detects a high voltage level at the interrupt PIN of the SIM card interface, it instructs the modem to power on the SIM card 1 connected to that SIM card interface.
[0177] The embodiments of this application do not limit the specific implementation of powering on SIM card 1.
[0178] S202, Electronic device 100 determines whether SIM card 1 is a physical SIM card in the card slot; if yes, then execute S203; if no, then execute S205.
[0179] In some embodiments, after detecting that SIM card 1 is powered on, electronic device 100 executes S202 to determine whether SIM card 1 is a physical SIM card in the card slot. In one implementation, the SCI driver can determine the number of the GPIO pin (i.e., SCI hardware interface) that SIM card 1 is connected to communication module 1. For example, the GPIO pin number indicates SCI 0 or SCI 1; the eSIM identification module can obtain the above-mentioned GPIO pin number, and then identify whether the SIM card is a physical SIM card in the SIM card slot based on the number.
[0180] For example, such as Figure 6B As shown, step S202 may include S202A to S202D.
[0181] S202A, Communication Module 1 obtains the GPIO pin number of SIM Card 1 connected to Communication Module 1 through SCI driver.
[0182] S202B, Communication Module 1 reports the GPIO pin numbers of the SIM card 1 to the application processor.
[0183] In one implementation, after SIM card 1 is powered on, communication module 1 automatically obtains and reports the GPIO pin numbers of SIM card 1 through the SCI driver. In another implementation, after SIM card 1 is powered on, the application processor sends an instruction to communication module 1; based on this instruction, communication module 1 obtains and reports the GPIO pin numbers of SIM card 1 through the SCI driver.
[0184] S202C: The application processor's eSIM identification module determines whether SIM card 1 is a physical SIM card in the card slot based on the GPIO pin number mentioned above; if yes, execute S203; otherwise, execute S205.
[0185] In some embodiments, when the GPIO pin of SIM card 1 is connected to a SIM switch, in step S202A, the SCI driver of communication module 1 also obtains the switch status of the SIM switch, and in step S202B, communication module 1 also reports the switch status of the SIM switch to the application processor; in step S202C, the eSIM identification module determines whether SIM card 1 is a physical SIM card in the card slot based on the number of the GPIO pin and the switch status of the SIM switch.
[0186] For the specific implementation of step S202C, please refer to the relevant description of step S102, which will not be repeated here.
[0187] S203. Electronic device 100 detects whether the preset field of the ATR of SIM card 1 contains the eUICC identifier; if yes, then execute S204; if no, then execute S205.
[0188] Here, ATR is a byte sequence; when electronic device 100 powers on SIM card 1, it sends a reset command to SIM card 1; after SIM card 1 is powered on, SIM card 1 returns an ATR to the sender of the reset command, and the ATR is the reset response of SIM card 1 to the reset command. If SIM card 1 is an eSIM card, then the preset fields in the ATR (such as the Tbi field or the TerminalCapability field) carry the eUICC identifier.
[0189] In some embodiments, communication module 1 can obtain interaction information between SIM card 1 and modem, such as power-on response, through SCI driver. After detecting the power-on response from SIM card 1 through SCI driver, communication module 1 can send the power-on response, which includes ATR, to application processor. The eSIM identification module in application processor can parse whether the preset field of the ATR of SIM card 1 contains the eUICC identifier. In this embodiment, communication module 1 can also obtain the ATR in the power-on response and only send the ATR to the eSIM identification module of application processor; or communication module 1 can also obtain the preset field in the ATR of the power-on response and only send the preset field to the eSIM identification module of application processor. No specific limitation is made here.
[0190] In some embodiments, such as Figure 6B As shown, step S203 specifically includes S203A to S203D.
[0191] S203A, the communication module 1 obtains the ATR fed back by the SIM card 1 through the SCI driver.
[0192] S203B, Communication Module 1 sends the ATR feedback from SIM Card 1 to the application processor.
[0193] S203C: The application processor's eSIM identification module determines whether the ATR's preset fields contain the eUICC identifier; if so, proceed to S204; otherwise, proceed to S205.
[0194] The eSIM identification module can parse the ATR returned by SIM card 1 to determine whether the preset fields of the ATR contain the eUICC identifier. For example, the preset field is the Tbi field, and Table 1 shows one type of Tbi field for an ATR. As shown in Table 1, when bit b2 of the Tbi field is 1, it indicates that SIM card 1 supports eUICC-related functions, and SIM card 1 is an eSIM card. It can be understood that when byte b2 of the Tbi field is 1, the Tbi field contains the eUICC identifier.
[0195]
[0196] Table 1
[0197] In some embodiments, before step S203A, the eSIM identification module of the application processor sends an instruction to the communication module 1; based on the instruction, the communication module 1 executes S203A and S203B, monitors the preset fields of the ATR fed back by the SIM card 1 through the SCI driver, and reports them to the eSIM identification module.
[0198] S204. Confirm that SIM card 1 is a removable eSIM card, and electronic device 100 stops using SIM card 1.
[0199] It is understandable that if SIM card 1 is a physical card in the card slot, and the preset field in the ATR returned by SIM card 1 carries the eUICC identifier, then electronic device 100 recognizes SIM card 1 as a removable eSIM card, and electronic device 100 stops using the removable eSIM card.
[0200] In some embodiments, such as Figure 6B As shown, step S204 specifically includes S204A to S204C.
[0201] S204A, The application processor instructs the communication module 1 to stop using SIM card 1.
[0202] S204B, the Modem of communication module 1 powers off SIM card 1.
[0203] For example, refer to Figures 3A to 3E The modem powers off SIM card 1 in the card slot via the SCI and SIM card interfaces.
[0204] S205. Confirm that SIM card 1 is not a removable eSIM card, and electronic device 100 interacts normally with SIM card 1.
[0205] It should be noted that the specific implementation of steps S201 to S205 can be found in the relevant descriptions of steps S101 to S105, and will not be repeated here.
[0206] In some embodiments, the software system of the electronic device 100 (e.g., the Android system) does not have a built-in native LPA (i.e., LPAd), and therefore cannot directly manage the eSIM card through the built-in native LPA. On devices that do not support a native LPA, third-party applications can use OMAPI to manage the eSIM card. OMAPI is a standard interface provided by Android for external security components (SE).
[0207] In one implementation, the eUICC uses the ARA-M field to store the SHA-1 or SHA-256 value of the Android developer certificate, thereby informing the Android system which applications can access it and granting these applications Carrier Privileges. ARA-M is a security mechanism used to declare read and write permissions to data in the SE, ensuring that data can only be accessed by authorized applications. Therefore, users can only manage the eUICC through OMAPI using specific third-party applications; these specific third-party applications, having the permission to manage the eSIM card through OMAPI, can be understood as LPAs installed as userapps. For ease of description, applications with the permission to manage the eSIM card through OMAPI will be referred to as authorized applications.
[0208] In some embodiments, if the electronic device 100 detects that the application calling OMAPI is an authorized application of the eSIM card, it can determine that the SIM card accessed through the OMAPI call is an eSIM card. It is understood that if the application calling OMAPI is not an authorized application of the eSIM card, it indicates that the application is not accessing an eSIM card through OMAPI.
[0209] In Embodiment 2, the electronic device 100, based on the authorized application accessing SIM card 1 via OMAPI, can identify the removable eSIM card and restrict its use. For example, Figure 7A The flowchart of another eSIM card identification method is shown, which includes steps S301 to S305.
[0210] S301, Electronic device 100 powers on SIM card 1.
[0211] The specific implementation of step S301 can be found in the description of step S201, and will not be repeated here.
[0212] S302, Electronic device 100 determines whether SIM card 1 is a physical SIM card in the card slot; if yes, then execute S303; if no, then execute S305.
[0213] The specific implementation of step S302 can be found in the description of step S202, and will not be repeated here.
[0214] S303. Electronic device 100 detects whether the application calling OMAPI is an authorized application of the eSIM card; if yes, then execute S304; if no, then execute S305.
[0215] In this embodiment, the authorized application of the eSIM card in the electronic device 100 can call OMAPI to establish a logical channel between the modem and the eSIM card, and then interact with the eSIM card based on the logical channel to manage the eSIM card and conduct mobile communication services. In some use cases, only authorized applications are allowed to call OMAPI to interact with the eSIM card; the aforementioned authorized applications must meet some or all of the following characteristics: they are applications in a preset whitelist, and they have a system signature encrypted with a preset encryption key.
[0216] In one implementation, the system signature of an authorized application downloaded via a preset path is encrypted with a preset encryption key. For example, the preset path is the application market that comes pre-installed with the electronic device 100.
[0217] In some embodiments, the electronic device 100 may call OMAPI to establish logical channels with different SEs (e.g., SIM cards, SD cards), and the logical channel numbers corresponding to different SEs are different. For example, the logical channel number established with the SIM card is 0. If the electronic device 100 detects that the logical channel number established with the SE by calling OMAPI is 0, the electronic device 100 determines whether the application calling OMAPI is an authorized application of the eSIM card.
[0218] In some embodiments, after step S302 determines that SIM card 1 is a physical SIM card in the card slot, if the electronic device 100 detects that the application calling OMAPI is an authorized application of the eSIM card, then SIM card 1 can be determined to be a removable eSIM card.
[0219] In some embodiments, the application processor's eSIM identification module may include an OMAPI monitoring module and a judgment module, such as Figure 7B As shown, step S303 may specifically include S303A to S303D.
[0220] S303A, Communication Module 1 detects that OMAPI is being called through the SCI driver.
[0221] In some embodiments, the electronic device 100 calls OMAPI to establish a logical channel between the modem and the eSIM card; the SCI driver of the communication module 1 can obtain the interaction information between the SIM card 1 and the modem, such as the relevant information for calling OMAPI to establish the above-mentioned logical channel.
[0222] In some embodiments, before step S303A, the OMAPI monitoring module of the application processor sends an instruction to the communication module 1; based on the instruction, the communication module 1 executes S303A to monitor whether the OMAPI is called through SCI.
[0223] In some embodiments, in step S303A, if the communication module 1 detects request information 1 and response information 1 for calling OMAPI through the SCI driver, then step S303B is executed. Request information 1 is used to request the execution of related operations on the SIM card 1; response information 1 is used to respond to request information 1, indicating that request information 1 has been successfully processed.
[0224] S303B, the communication module 1 sends instruction information 1 to the application processor to indicate to the OMAPI monitoring module that OMAPI has been called.
[0225] S303C: The application processor's judgment module determines whether the application calling OMAPI (e.g., application 1) is an authorized application as described above; if so, execute S304; otherwise, execute S305.
[0226] In some embodiments, after step S303B and before step S303C, based on indication information 1, the OMAPI monitoring module of the application processor sends an instruction to the judgment module; based on the instruction, the judgment module executes S303C to determine whether the application 1 calling OMAPI is the aforementioned authorized application.
[0227] In some embodiments, the determination module can obtain a preset whitelist, which stores a list of the aforementioned authorized applications. If application 1, which calls OMAPI, is an application in the preset whitelist, the determination module determines that application 1 is an authorized application of the eSIM card; otherwise, it determines that application 1 is not an authorized application of the eSIM card. In one implementation, the preset whitelist stores the application identifier of the authorized application (e.g., the package name of the application package of the authorized application); if the application identifier of application 1 belongs to the preset whitelist, it determines that application 1 is an authorized application.
[0228] In some embodiments, the determination module can obtain the decryption key of the system signature of the authorized application; if the system signature of application 1 is verified using the decryption key, then application 1 is determined to be an authorized application of the eSIM card; otherwise, application 1 is determined not to be an authorized application.
[0229] S304. Confirm that SIM card 1 is a removable eSIM card, and electronic device 100 stops using SIM card 1.
[0230] It is understood that if SIM card 1 is a physical card in the card slot, and application 1 calling OMAPI is an authorized application for the eSIM card, then electronic device 100 recognizes SIM card 1 as a removable eSIM card, and electronic device 100 stops using the removable eSIM card. In some embodiments, such as Figure 7B As shown, step S304 specifically includes S304A, and some or all of steps S304B to S304D.
[0231] S304A, The application processor instructs the communication module 1 to stop using SIM card 1.
[0232] S304B, The Modem of Communication Module 1 closes the logical channel between the Modem and SIM Card 1.
[0233] S304C, the Modem of Communication Module 1 powers off SIM Card 1.
[0234] For example, refer to Figures 3A to 3E The modem powers off SIM card 1 in the card slot via the SCI and SIM card interfaces.
[0235] In some embodiments, the electronic device 100 may also perform only steps S304B or S304C to restrict the continued use of SIM card 1. For example, step S304B is optional; simply powering off SIM card 1 can also restrict its use. For example, step S304C is optional; simply closing the logical channel between SIM cards 1 can also restrict the electronic device 100 from using SIM card 1 to access mobile communications.
[0236] In some embodiments, step S304 specifically includes: the application processor instructs the modem of the communication module 1 to close the logical channel of the SIM card 1, and the modem executes S304C; the application processor instructs the modem of the communication module 1 to power off the SIM card 1, and the modem executes S304CD.
[0237] S305. Confirm that SIM card 1 is not a removable eSIM card, and electronic device 100 interacts normally with SIM card 1.
[0238] It should be noted that the specific implementation of step S305 can be found in the description of step S205, and will not be repeated here.
[0239] In this embodiment, the eSIM card can store profiles of various eSIMs from different operators. Each eSIM profile can independently constitute a SIM application, and each SIM application functions as a SIM card. Some profiles (i.e., SIM applications) in the eSIM card are unique to the eSIM card and not available in traditional SIMs, such as ISD-P, ISD-R, ECASD, and LPA. It can be understood that if the electronic device 100 successfully selects a SIM application specific to the eSIM, it can be determined that the eSIM card is currently in use.
[0240] In Embodiment 3, the electronic device 100 can identify a removable eSIM card based on an eSIM-specific SIM application selected from the SIM card, thereby restricting the use of the removable eSIM card. For example, Figure 8AA method flow for an eSIM card identification method is shown, which includes steps S401 to S405.
[0241] S401, Electronic device 100 powers on SIM card 1.
[0242] The specific implementation of step S401 can be found in the description of step S201, and will not be repeated here.
[0243] S402, Electronic device 100 determines whether SIM card 1 is a physical SIM card in the card slot; if yes, then execute S403; if no, then execute S405.
[0244] The specific implementation of step S402 can be found in the description of step S202, and will not be repeated here.
[0245] S403. Electronic device 100 detects whether an eSIM-specific SIM application has been selected from SIM card 1; if yes, proceed to S404; if no, proceed to S405.
[0246] In some embodiments, each SIM application in the SIM card corresponds to a different AID. The above detection of whether an eSIM-specific SIM application was selected from SIM card 1 specifically includes: detecting whether the AID of the eSIM-specific SIM application was selected from SIM card 1.
[0247] In some embodiments, such as Figure 8B As shown, step S403 specifically includes S403A to S403D.
[0248] S403A, Communication Module 1 detects through SCI driver that Modem has successfully selected SIM application 1 in SIM card 1.
[0249] In some embodiments, in step S403A, if the communication module 1 detects request information 2 and response information 2 for selecting SIM application 1 through the SCI driver, then step S403B is executed. The response information 2 is used to respond to request information 2, indicating successful selection of SIM application 1.
[0250] In this embodiment of the application, SIM application 1 can also be referred to as the first SIM application.
[0251] S403B, Communication Module 1 sends the AID of SIM Application 1 to the application processor.
[0252] S403C: The eSIM identification module of the application processor determines whether the eSIM-specific SIM application has been selected based on the AID of SIM application 1; if so, execute S404; otherwise, execute S405.
[0253] It is understandable that if the AID of SIM application 1 belongs to the AID of the SIM application specific to eSIM, then the SIM application specific to eSIM has been selected.
[0254] In some embodiments, before step S403A, the application processor sends an instruction to the communication module 1; based on the instruction, the communication module 1 executes S403A to monitor the SIM application selected from the SIM card 1 through the SCI driver.
[0255] In some embodiments, step S403 specifically includes: the application processor sending an instruction to the communication module 1, which instructs the communication module 1 to actively attempt to select an eSIM-specific SIM application from the SIM card 1, such as ISD-P, ISD-R, ECASD, LPA, etc. Taking LPA as an example, based on the above instruction, the modem of the communication module 1 actively selects LPA from the SIM card 1; the SIM card 1 sends response information 3 back to the modem, indicating whether LPA was successfully selected; after detecting response information 3 through the SCI driver, the communication module 1 sends response information 4 to the application processor, which indicates whether LPA was successfully selected; if response information 4 indicates successful selection of LPA, the eSIM identification module of the application processor determines that an eSIM-specific SIM application has been selected from the SIM card 1 and executes S404; otherwise, it executes S405. The response information 4 may include the AID of LPA.
[0256] S404. Confirm that SIM card 1 is a removable eSIM card, and electronic device 100 stops using SIM card 1.
[0257] It is understandable that if SIM card 1 is a physical card in the card slot, and the eSIM-specific SIM application is successfully selected from SIM card 1, then electronic device 100 recognizes SIM card 1 as a removable eSIM card, and electronic device 100 stops using the removable eSIM card.
[0258] For details on the implementation of step S404, please refer to the descriptions of steps S204 and S304, which will not be repeated here.
[0259] S405. Confirm that SIM card 1 is not a removable eSIM card, and electronic device 100 interacts normally with SIM card 1.
[0260] The specific implementation of step S405 can be found in the description of step S205, and will not be repeated here.
[0261] In this embodiment, after SIM card 1 is powered on, the modem can send APDU messages to SIM card 1. The APDU message can include at least one APDU instruction, which can be used to write APDU data to SIM card 1, query information related to the profile in the SIM card (e.g., the number of currently active profiles, profile identifiers, etc.), etc. When the modem interacts with the eSIM card via APDU messages, the APDU message can include instructions unique to eSIMs (hereinafter referred to as eSIM-specific instructions for ease of description), such as instructions to write a profile, erase a profile, download a profile, etc. This embodiment does not specifically limit the eSIM-specific instructions. It can be understood that if the APDU header interacting with SIM card 1 contains eSIM-specific instructions (e.g., BF2D Get Profile), it can be determined that the currently used SIM card 1 is an eSIM card.
[0262] In the embodiments of this application, APDU messages can also be referred to as APDU commands or APDU instruction sets, without specific limitations here.
[0263] In Embodiment 4, the electronic device 100 can identify the removable eSIM card based on eSIM-specific instructions in the APDU instruction set of the SIM card, and then control the removable eSIM card to power down. For example, Figure 9A A method flow for an eSIM card identification method is shown, which includes steps S501 to S505.
[0264] S501, Electronic device 100 powers on SIM card 1.
[0265] The specific implementation of step S501 can be found in the description of step S201, and will not be repeated here.
[0266] S502, Electronic device 100 determines whether SIM card 1 is a physical SIM card in the card slot; if yes, then execute S503; if no, then execute S505.
[0267] The specific implementation of step S502 can be found in the description of step S202, and will not be repeated here.
[0268] S503, Electronic device 100 determines whether the APDU header interacting with SIM card 1 contains eSIM-specific instructions; if yes, it executes S504; if no, it executes S505.
[0269] In some embodiments, such as Figure 9B As shown, step S503 specifically includes S503A to S503C.
[0270] S503A, communication module 1 detects the APDU header of the interaction between the modem and SIM card 1 through the SCI driver.
[0271] APDU messages include an APDU header, which indicates the instructions contained in the APDU message. Communication module 1 can monitor the APDU headers transmitted in the ISO7816 standard interface in real time via the SCI driver. In one implementation, the APDU header includes operators for the aforementioned instructions, and electronic device 100 can determine the instructions contained in the APDU message based on the operators.
[0272] S503B, communication module 1 sends the aforementioned APDU header to the application processor.
[0273] S503C: The application processor's eSIM identification module parses whether the APDU header contains eSIM-specific instructions; if so, it executes S504; otherwise, it executes S505.
[0274] In some embodiments, before step S503A, the eSIM identification module of the application processor sends an instruction to the communication module 1; based on the instruction, the communication module 1 executes S503A and monitors the APDU header of the interaction between the modem and the SIM card 1 through the SCI driver.
[0275] In some embodiments, step S503 specifically includes: the communication module 1 monitors and parses the APDU header of the APDU message interacting between the Modem and the SIM card 1 through the SCI driver; when the APDU header includes eSIM-specific instructions, it monitors the response message of the APDU message; if the response message of the APDU message is detected, and the response message indicates that the APDU message has been processed, that is, the eSIM-specific instructions in the APDU message have been executed, then the communication module 1 sends response information 5 to the application processor, and the response information 5 is used to indicate that the eSIM-specific instructions have been executed; based on the response information 5, the eSIM identification module of the application processor determines to execute S504. It can be understood that if the response information 5 is not received, the application processor maintains normal interaction with the SIM card 1.
[0276] S504. Confirm that SIM card 1 is a removable eSIM card, and electronic device 100 stops using SIM card 1.
[0277] It is understandable that if SIM card 1 is a physical card in the card slot, and an eSIM-specific instruction is detected in the APDU that interacts with SIM card 1, then electronic device 100 recognizes SIM card 1 as a removable eSIM card, and electronic device 100 stops using the removable eSIM card.
[0278] For details on the implementation of step S504, please refer to the descriptions of steps S204 and S304, which will not be repeated here.
[0279] S505: Confirm that SIM card 1 is not a removable eSIM card, and electronic device 100 interacts normally with SIM card 1.
[0280] The specific implementation of step S505 can be found in the description of step S205, and will not be repeated here.
[0281] In the second embodiment of this application, the electronic device 100 can effectively identify whether the powered-on SIM card is an eSIM card, thereby restricting the use of the eSIM card. For example, Figure 10 A method flow for an eSIM card identification method is shown, which includes steps S601 to S604.
[0282] S601, Electronic device 100 powers on SIM card 1.
[0283] The specific implementation of step S601 can be found in the description of step S101, and will not be repeated here.
[0284] S602, Electronic device 100 determines whether the interaction information 1 of SIM card 1 meets the preset conditions; if yes, then execute S603; if no, then execute S604.
[0285] If the interaction information 1 of SIM card 1 meets the preset conditions, it indicates that SIM card 1 is an eSIM card; otherwise, SIM card 1 is not an eSIM card. The specific implementation of step S602 can be found in the relevant description of step S103, and will not be repeated here.
[0286] S603. Confirm that SIM card 1 is an eSIM card, and electronic device 100 stops using SIM card 1.
[0287] The specific implementation of step S603 can be found in the description of step S104, and will not be repeated here.
[0288] S604. Confirm that SIM card 1 is not an eSIM card. Electronic device 100 interacts normally with SIM card 1.
[0289] The specific implementation of step S604 can be found in the description of step S105, and will not be repeated here.
[0290] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.
[0291] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0292] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0293] In summary, the above description is merely an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made according to the disclosure of the present invention should be included within the scope of protection of the present invention.
Claims
1. An embedded subscriber identity module (eSIM) identification method, applied to electronic devices, characterized in that, The method includes: Power on the first user identification module SIM card; When the first SIM card is identified as a removable eSIM card, the use of the removable eSIM card is stopped.
2. The method according to claim 1, characterized in that, The method further includes: When the first SIM card is detected to be a physical SIM card in the card slot, and when the interaction information of the first SIM card meets the preset conditions, the first SIM card is identified as a removable eSIM card. The fact that the interaction information of the first SIM card meets the preset conditions indicates that the first SIM card is an eSIM card.
3. The method according to claim 1, characterized in that, The preset conditions include some or all of the following conditions. The first condition includes: the preset field of the reset response ATR of the first SIM card includes the eSIM identifier; The second condition includes: the application that calls the Open Mobile Interface (OMAPI) to interact with the first SIM card is an authorized application of the eSIM card; The third condition includes: selecting an eSIM-specific SIM application from the first SIM card; The fourth condition includes: the Application Protocol Data Unit (APDU) header interacting with the first SIM card includes eSIM-specific instructions.
4. The method according to claim 2 or 3, characterized in that, The electronic device includes a first communication module and an application processor. The first communication module includes a modem. The interaction information of the first SIM card includes the ATR. Detecting that the interaction information of the first SIM card satisfies the first condition includes: After the modem powers on the first SIM card, the first communication module obtains the ATR fed back by the first SIM card to the modem; The first communication module sends the ATR to the application processor; The application processor detects that the preset fields of the ATR include the eSIM identifier.
5. The method according to any one of claims 2 to 4, characterized in that, The electronic device includes a first communication module and an application processor. The first communication module includes a modem. The interaction information of the first SIM card includes the application that calls the OMAPI to interact with the first SIM card. Detecting that the interaction information of the first SIM card satisfies the second condition includes: After the Modem powers on the first SIM card, when it detects that the OMAPI has been called, the first communication module notifies the application processor that the OMAPI has been called. The application processor detects that the application calling OMAPI is an authorized application for the eSIM card.
6. The method according to claim 5, characterized in that, The authorized applications of the eSIM card meet some or all of the following characteristics: they are applications in a preset whitelist and have a system signature encrypted with a preset encryption key.
7. The method according to any one of claims 2 to 6, characterized in that, The electronic device includes a first communication module and an application processor. The interaction information of the first SIM card includes the application identifier (AID) of the SIM application selected from the first SIM card. Detecting that the interaction information of the first SIM card satisfies the third condition includes: The first communication module determines the AID of the first SIM application selected from the first SIM card; The first communication module sends the AID of the first SIM application to the application processor; Based on the AID, the application processor detects that the first SIM application is a SIM application specific to eSIM.
8. The method according to claim 7, characterized in that, The eSIM-specific SIM applications include: Issuer Security Domain File (ISD-P), Issuer Security Domain Root (ISD-R), ECASD (credentials required to support eUICC security domains), and Local Configuration File Assistant (LPA).
9. The method according to any one of claims 2 to 8, characterized in that, The electronic device includes a first communication module and an application processor. The first communication module includes a modem. The interaction information of the first SIM card includes an APDU header that interacts with the first SIM card. Detecting that the interaction information of the first SIM card satisfies the fourth condition includes: The first communication module obtains the APDU header of the interaction between the first SIM card and the modem; The first communication module sends the APDU header to the application processor; The application processor detects that the APDU header includes the eSIM-specific instructions.
10. The method according to any one of claims 2 to 9, characterized in that, The electronic device includes a first communication module and an application processor, and the method further includes: After the first SIM card is powered on, the first communication module determines the number of the general purpose input / output (GPIO) pins of the first SIM card that are connected to the communication module; The first communication module sends the GPIO pin number to the application processor; The detection that the first SIM card is a physical SIM card in the card slot includes: The application processor determines that the first SIM card is a physical SIM card in the card slot based on the number of the GPIO pin.
11. The method according to claim 10, characterized in that, When the GPIO pin connected to the first SIM card corresponds to a SIM switch, the method further includes: The first communication module determines the on / off state of the SIM switch; The first communication module sends the on / off status of the SIM switch to the application processor; The detection that the first SIM card is a physical SIM card in the card slot includes: The application processor determines that the first SIM card is a physical SIM card in the card slot based on the GPIO pin number and the on / off state of the SIM switch.
12. The method according to any one of claims 1 to 11, characterized in that, The discontinuation of use of the removable eSIM card includes: Close the logical channels of the removable eSIM card and the modem; and / or power down the removable eSIM card.
13. An electronic device, characterized in that, include: A processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, which, when the processor reads from the memory, cause the electronic device to perform the eSIM identification method as described in claims 1 to 12.
14. A computer-readable storage medium, characterized in that, It includes computer instructions that, when executed on a server, cause the electronic device to perform the eSIM identification method as described in claims 1 to 12.
15. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the eSIM identification method as described in claims 1 to 12.