Search

EP-4109967-B1 - METHOD FOR SWITCHING BETWEEN SIM CARD AND ESIM CARD, AND ELECTRONIC DEVICE

EP4109967B1EP 4109967 B1EP4109967 B1EP 4109967B1EP-4109967-B1

Inventors

  • WANG, SHAOJUN
  • ZHANG, XIN
  • HUANG, BIN

Dates

Publication Date
20260506
Application Date
20210308

Claims (12)

  1. A method for switching between a subscriber identity module, SIM, card and an embedded subscriber identity module, eSIM, card, wherein the method is applied to an electronic device, the electronic device comprises at least a card connector and an eSIM card, a SIM card connected to the card connector shares a radio frequency resource with the eSIM card, and the method comprises: determining (S801) a type of a to-be-detected card connected to the card connector, wherein the type comprises a SIM card, wherein the card connector comprises eight metal sheets and eight pins, the eight pins and the eight metal sheets of the card connector are connected in a one-to-one correspondence, and when the card connector is connected to a SIM card, both a first metal sheet and a second metal sheet in the eight metal sheets are connected to a first pin of the SIM card; and when the to-be-detected card is a SIM card and the eSIM card is enabled, displaying (S802) a prompt box, wherein the prompt box comprises a first control, and the first control indicates to switch the eSIM card to the to-be-detected card, wherein the determining a type of a to-be-detected card connected to the card connector comprises: inputting a first electrical signal to a pin that is in the card connector and that is connected to the first metal sheet, and detecting an electrical signal of a pin that is in the card connector and that is connected to the second metal sheet, to obtain a second electrical signal; and when the first electrical signal is consistent with the second electrical signal, determining that the to-be-detected card is a SIM card.
  2. The method according to claim 1, wherein the method further comprises: switching the eSIM card to the to-be-detected card in response to a user operation entered for the first control.
  3. The method according to claim 1 or 2, wherein both a third metal sheet and a fourth metal sheet in the eight metal sheets are connected to a second pin of the SIM card; and the determining a type of a to-be-detected card connected to the card connector comprises: inputting a first electrical signal to a pin that is in the card connector and that is connected to the first metal sheet, and detecting an electrical signal of a pin that is in the card connector and that is connected to the second metal sheet, to obtain a second electrical signal; inputting a third electrical signal to a pin that is in the card connector and that is connected to the third metal sheet, and detecting an electrical signal of a pin that is in the card connector and that is connected to the fourth metal sheet, to obtain a fourth electrical signal; and when the first electrical signal is consistent with the second electrical signal and the third electrical signal is consistent with the fourth electrical signal, determining that the to-be-detected card is a SIM card.
  4. The method according to claim 3, wherein the first pin is a power supply pin of the SIM card, and the second pin is a ground pin of the SIM card.
  5. The method according to any one of claims 1 to 4, wherein the determining a type of a to-be-detected card connected to the card connector comprises: determining whether the to-be-detected card is an SD card; and when the to-be-detected card is not an SD card, detecting whether the to-be-detected card is a SIM card.
  6. The method according to any one of claims 1 to 5, wherein the method further comprises: determining, based on a change of an electrical signal of a card tray insertion and removal pin, that the to-be-detected card is inserted into the electronic device, and triggering the electronic device to perform the step of determining the type of the to-be-detected card connected to the card connector.
  7. The method according to any one of claims 1 to 5, wherein the method further comprises: loading an operating system of the electronic device in response to a power-on operation entered by a user; and after the operating system is loaded, triggering the electronic device to perform the step of determining the type of the to-be-detected card connected to the card connector.
  8. An electronic device (100), comprising a processor (110), a memory (121), at least one radio frequency resource (161, 162), an embedded subscriber identity module, eSIM, card, and a card connector, wherein a subscriber identity module, SIM, card connected to the card connector shares a radio frequency resource with the eSIM card, the memory is configured to store program instructions, the radio frequency resource is used by the electronic device to connect to a mobile network, and the processor is configured to invoke the memory to store the program instructions, to perform the following operations: determining a type of a to-be-detected card connected to the card connector, wherein the type comprises a SIM card, wherein the card connector comprises eight metal sheets and eight pins, the eight pins and the eight metal sheets of the card connector are connected in a one-to-one correspondence, and when the card connector is connected to a SIM card, both a first metal sheet and a second metal sheet in the eight metal sheets are connected to a first pin of the SIM card; and when the to-be-detected card is a SIM card and the eSIM card is enabled, displaying a prompt box, wherein the prompt box comprises a first control, and the first control indicates to switch the eSIM card to the to-be-detected card, wherein that the processor performs the operation of determining the type of the to-be-detected card connected to the card connector comprises: inputting a first electrical signal to a pin that is in the card connector and that is connected to the first metal sheet, and detecting an electrical signal of a pin that is in the card connector and that is connected to the second metal sheet, to obtain a second electrical signal; and when the first electrical signal is consistent with the second electrical signal, determining that the to-be-detected card is a SIM card.
  9. The electronic device according to claim 8, wherein the processor is further configured to: switch the eSIM card to the to-be-detected card in response to a user operation entered for the first control.
  10. The electronic device according to claim 8 or 9, wherein both a third metal sheet and a fourth metal sheet in the eight metal sheets are connected to a second pin of the SIM card; and that the processor performs the operation of determining the type of the to-be-detected card connected to the card connector comprises: inputting a first electrical signal to a pin that is in the card connector and that is connected to the first metal sheet, and detecting an electrical signal of a pin that is in the card connector and that is connected to the second metal sheet, to obtain a second electrical signal; inputting a third electrical signal to a pin that is in the card connector and that is connected to the third metal sheet, and detecting an electrical signal of a pin that is in the card connector and that is connected to the fourth metal sheet, to obtain a fourth electrical signal; and when the first electrical signal is consistent with the second electrical signal and the third electrical signal is consistent with the fourth electrical signal, determining that the to-be-detected card is a SIM card.
  11. The electronic device according to claim 10, wherein the first pin is a power supply pin of the SIM card, and the second pin is a ground pin of the SIM card.
  12. A computer-readable storage medium including instructions, when the instructions are run on an electronic device of claims 8 to 11, the electronic device is enabled to perform the method according to any one of claims 1 to 7.

Description

This application claims priority to Chinese Patent Application No. 202010203729.4, filed with the China National Intellectual Property Administration on March 20, 2020 and entitled "METHOD FOR SWITCHING BETWEEN SIM CARD AND ESIM CARD, AND ELECTRONIC DEVICE". TECHNICAL FIELD This application relates to the field of terminal technologies, and in particular, to a method for switching between a SIM card and an eSIM card, and an electronic device. BACKGROUND Currently, at least one SIM card may be generally inserted into a mobile phone, and an eSIM card is also supported by the mobile phone. However, a configuration of a baseband chip of the mobile phone cannot support all SIM cards and the eSIM card at the same time. Generally, in the mobile phone, one SIM card (for example, a secondary SIM card) shares a radio frequency resource with the eSIM card. When the secondary SIM card is in an operating state, the eSIM card is in an offline state. Conversely, when the eSIM card is in an operating state, a circuit of a secondary card slot is in a power-off state. If a SIM card is inserted into the secondary card slot or there is a physical SIM card in the secondary card slot when the mobile phone is powered on, the mobile phone cannot identify insertion of the SIM card and the inserted SIM card cannot be used. In this case, a user may consider that the SIM card is damaged or the mobile phone is faulty. How to switch to the SIM card when the eSIM card is in an operating state is a current technical problem. CN 110 621 013 describes an SIM module management method and electronic equipment. For the existing electronic equipment supporting the double SIM modules, a scheme for supporting the eSIM module is provided, and the compatibility of the double SIM modules and the eSIM module is realized. The electronic equipment provided by the embodiment of the invention can support three SIM modules, wherein the three SIM modules at least comprise one eSIM module. And the other two SIM modules can be plug-in SIM modules, or one plug-in SIM module and one soft SIM module. A user can arbitrarily select two SIM modules from the three SIM modules to be in an online standby state at the same time, or can arbitrarily select one SIM module fromthe three SIM modules to be in an online standby state. CN 110 753 379 A describes a double-card implementation method for single-communication-channel equipment. An eSIM card technology is introduced, an eSIM card and a switching device arranged between a processor and a communication module are installed on single communication channel equipment; the processor uses an eSIM card for communication by default; and when it is judged that the SIM card is accessed into the SIM card slot, the switching device is controlled to be switched to the channel connection communication module of the SIM card for communication, so that free switching of the SIM cardon the single communication channel equipment is realized, more communication options on the single communication channel equipment are provided for a user, and the use of the user is facilitated. The invention further discloses a double-card implementation system for the single-communication-channel equipment, and the double-card implementation system has the above beneficial effects. SUMMARY The invention is defined by the independent claims 1, 8 and 12. Advantageous embodiments are described in the dependent claims. Independent claim 1 is directed to a method for switching between a SIM card and an eSIM card, independent claim 8 is directed to an electronic device and independent claim 12 is directed to a computer-readable storage medium. BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic diagram of a structure of a SIM card according to an embodiment of this application;FIG. 2 is a schematic diagram of pin distribution of a SIM card according to an embodiment of this application;FIG. 3 is a schematic diagram of pin distribution of a nano-SD card according to an embodiment of this application;FIG. 4 is a schematic diagram of a structure of a 2-in-1 card connector according to an embodiment of this application;FIG. 5A is a schematic diagram of a structure of a single-SIM single-active device according to an embodiment of this application;FIG. 5B is a schematic diagram of a structure of a dual-SIM single-active device according to an embodiment of this application;FIG. 5C is a schematic diagram of a structure of a dual-SIM dual-active device according to an embodiment of this application;FIG. 6 is a schematic diagram of an insertion and removal detection principle of a card tray according to an embodiment of this application;FIG. 7A is a schematic flowchart of a method for detecting a to-be-detected card according to an embodiment of this application;FIG. 7B is a schematic flowchart of another method for detecting a to-be-detected card according to an embodiment of this application;FIG. 8 is a schematic flowchart of a method for switching between a SI