Method for controlling equipment and equipment
By detecting card events and obtaining configuration information, the baseband processor's perception of the physical SIM card is blocked, which solves the restart problem caused by the customer's front-end device's insertion or removal of the physical SIM card when using the eSIM card, and improves the stability of the device and reliability.
Patent Information
- Application Number
- CN202310865369.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2025-01-14
AI Technical Summary
Existing customer front devices can cause restarts when inserting or removing physical SIM cards, affecting the reliability and user experience of the device, especially when using eSIM cards.
By detecting card events and obtaining configuration information, if the configuration information indicates that only eSIM card is used to work, the baseband processor's perception of the insertion or removal of the physical SIM card is blocked, and only notifies the application processor of card events to avoid restart operations, thereby improving the The stability and reliability of the eSIM card work scenario.
It effectively avoids device restart problems caused by insertion or removal of physical SIM cards, improves the stability and reliability of eSIM cards, and improves the user experience.
Smart Images

Figure CN119316982A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a method and device for controlling a device. Background Art
[0002] Customer premise equipment (CPE) is a mobile signal access device that receives mobile signals and forwards them as wireless fidelity (Wi-Fi) signals. CPE can include a card slot, into which a physical subscriber identity module (SIM) card is inserted, or an embedded SIM (eSIM) card. CPE can choose to use a physical SIM card or an eSIM card to perform services based on different user needs, but it also requires a more flexible control method to achieve the coexistence of physical SIM cards and eSIM cards.
[0003] In the prior art, the CPE can perform a power-on operation on a physical SIM card to use the physical SIM card, or it can perform a power-on operation on an eSIM card to use the eSIM card. However, in any case, when the physical SIM card is inserted into or removed from the card slot of the CPE, the CPE will be restarted, thereby affecting the current normal use of the CPE. Therefore, the reliability and user experience of the CPE are very poor. Summary of the invention
[0004] In view of this, the present application provides a method and device for controlling a device, which improves the problem of interruption of the device's operation using an eSIM card, and improves the stability and reliability in a scenario where only an eSIM card is used.
[0005] In order to achieve the above-mentioned purpose, a first aspect provides a method for controlling a device, the device comprising an application processor, a baseband processor, an eSIM card and a card slot, the card slot being used to insert a physical SIM card, the method comprising: detecting a card event, the card event comprising inserting the physical SIM card into the card slot or removing the physical SIM card from the card slot; obtaining configuration information, the configuration information being used to indicate a SIM card working mode; if the configuration information indicates that only the eSIM card is to be used for work, then only notifying the application processor of the card event.
[0006] In the above scheme, card events such as inserting a physical SIM card into the card slot or removing a physical SIM card from the card slot can be detected, and configuration information for indicating the working mode of the SIM card can be obtained. If the configuration information indicates that the current working mode of the SIM card is to use only the eSIM card, the card event can be notified to the application processor so that the application layer perceives the card event without notifying the baseband processor of the card event. That is, when only the eSIM card is used, the baseband processor is shielded from the perception of card events such as inserting a physical SIM card and removing a physical SIM card, thereby reducing the restart operations caused by this, improving the problem of the device being interrupted when using the eSIM card, and improving the stability and reliability in the scenario where only the eSIM card is used.
[0007] In some embodiments, the baseband processor is a single-card single-standby baseband processor, that is, the baseband processor can only power on one SIM card at the same time. The device supports single-card single-standby, that is, the device can include two or more SIM cards, but can only power on one of the SIM cards at the same time. When switching from working with one SIM card to working with another SIM card, the device needs to power off the current SIM card and switch to powering on the other SIM card.
[0008] In some embodiments, the configuration information includes non-volatile (NV) data stored in the kernel layer, and if the configuration information indicates to use only the eSIM card, only the card event is notified to the application processor, including: if the NV data is a first value, only the card event is notified to the application processor.
[0009] Among them, the NV data may include multiple values, and different SIM card operating modes may be indicated when the NV data has different values. In some embodiments, if the NV data has a first value, it may indicate that the SIM card operating mode is to use only an eSIM card, and if the NV data has a second value, it may indicate that the SIM card operating mode is to use only a physical SIM card; if the NV data has a third value, it may indicate that the SIM card operating mode is to use a physical SIM card first. In some embodiments, the first value, the second value, and the third value may be any one of 0, 1, and 2, respectively. It is understandable that in actual applications, the value range of NV data is not limited to 0-2, nor is it limited to only numbers.
[0010] In some embodiments, the configuration information may be configured or updated according to an external input operation, such as information submitted by a user or a relevant technical staff. In some embodiments, the configuration information may be updated in response to a user setting operation on the SIM card working mode. In some embodiments, the method further comprises: in response to a first setting operation, setting the NV data to the first value, the first setting operation being used to set the SIM card working mode to work only with the eSIM card. Similarly, in response to a second setting operation, the NV data may be set to a second value, the second setting operation being used to set the SIM card working mode to work only with a physical SIM card; in response to a third setting operation, the NV data may be set to a third value, the third setting operation being used to set the SIM card working mode to work with a physical SIM card first.
[0011] In some embodiments, the card event includes the physical SIM card being inserted into the card slot, and the method further includes: updating the state information of the physical SIM card to indicate that the card slot includes the physical SIM card; in response to a second setting operation or a third setting operation, and the card slot includes the physical SIM card, restarting the device, wherein the second setting operation is used to set the SIM card working mode to use only the physical SIM card to work, and the third setting operation is used to set the SIM card working mode to use the physical SIM card to work preferentially. That is, in the case where the card slot includes a physical SIM card, since the physical SIM card is available, if the user switches the SIM card work to use only the physical SIM card to work or use the physical SIM card preferentially to work, the device can be restarted to switch to use the physical SIM card to work.
[0012] In some embodiments, when the state information of the physical SIM card indicates that the card slot does not include a physical SIM card (or when it is determined by any means that the card slot does not include a physical SIM card), the device may be restarted in response to the first setting operation or the third setting operation on the SIM card working mode. That is, in the case where the card slot does not include a physical SIM card, since the physical SIM card is unavailable, if the user sets the SIM card working mode to work only with an eSIM card or to work with a physical SIM card first, the device may be restarted to switch to working with an eSIM card.
[0013] Among them, the status information of the physical SIM card can be used to indicate whether the card slot includes a physical SIM card. In some embodiments, the status information of the physical SIM card can be updated based on the card event, wherein, if the card event is the insertion of a physical SIM card into the card slot, the status information of the physical SIM card can be updated to the card slot including the physical SIM card; if the card event is the removal of the physical SIM card from the card slot, the status information can be updated to the card slot not including the physical SIM card. That is, when the SIM card working mode is to work only with the eSIM card and a card event is detected, the baseband processor can be shielded from sensing the card event, but the stored status information of the physical SIM card can be updated according to the card event. In the subsequent working process, when the SIM card working mode is updated to work only with the physical SIM card or to work with the physical SIM card first, and the card slot includes a physical SIM card, the device can still be restarted, thereby switching from working with the eSIM card to working with the physical SIM card.
[0014] In some implementations, the status information of the physical SIM card may be stored in the application layer, and the status information of the physical SIM card may be updated by the application processor, so that the application processor can obtain the status information and determine whether to restart the device in response to the received update operation of the configuration information.
[0015] In some implementations, the method further includes: if the configuration information indicates to use only the physical SIM card to work or to use the physical SIM card preferentially to work, notifying the application processor and the baseband processor of the card event.
[0016] In some implementations, notifying the application processor of the card event includes: notifying the application processor of the card event through a system daemon. The system daemon can run in the application processor and is a program with higher system permissions that can be used to ensure the safe operation of the device. In the embodiment of the present application, the application processor can communicate with the kernel layer through the system daemon, thereby shielding the baseband processor from perceiving specific information such as card events.
[0017] In some implementations, the method further includes: acquiring the configuration information when starting up the device; and performing a power-on operation on the eSIM card or the physical SIM card based on the configuration information.
[0018] In some embodiments, the device includes a switch, and the switch may include a first set of pins, a second set of pins, and a third set of pins. The first set of pins may be coupled to the application processor and the baseband processor, the second set of pins may correspond to the pins of the eSIM card, and the third set of pins may correspond to the pins of the physical SIM card. When the switch connects the first set of pins to the second set of pins, the eSIM card is connected to the application processor and the baseband processor, so that the device switches to work using the eSIM card; when the switch connects the first set of pins to the third set of pins, the physical SIM card is connected to the application processor and the baseband processor, so that the device switches to work using the physical SIM card.
[0019] In some embodiments, the card slot includes a first pin, which is coupled to the application processor. When the card slot includes the physical SIM card, the first pin is at a first level, and when the card slot does not include the physical SIM card, the first pin is at a second level. Based on the configuration information, performing a power-on operation on the eSIM card or the physical SIM card includes any one of the following: if the configuration information indicates that only the physical SIM card is to be used for work, a power-on operation is performed on the physical SIM card; if the configuration information indicates that only the eSIM card is to be used for work, a power-on operation is performed on the eSIM card; if the configuration information indicates that the physical SIM card is to be used first for work and the first pin is at the first level, a power-on operation is performed on the physical SIM card; if the configuration information indicates that the physical SIM card is to be used first for work and the first pin is at the second level, a power-on operation is performed on the eSIM card.
[0020] Among them, the configuration information includes the NV data of the kernel layer, so the SIM card working mode can be determined by the NV data, and whether the card slot includes a physical SIM card can be determined by the level of the first pin of the card slot. That is, in the startup phase, if the relevant information for selecting a SIM card cannot be obtained from the application layer, the SIM card working mode can be determined from the NV data of the kernel layer, and whether the card slot includes a physical SIM card can be determined from the hardware pin, so as to accurately power on the physical SIM card or the eSIM card.
[0021] In some embodiments, a processor (such as an application processor) may be coupled to a third pin (also referred to as SIM_SEL) of the switch, and the third pin may be one of the first set of pins. The third pin may have a GPIO function for selecting an eSIM card or a physical SIM card. In some embodiments, the third pin may be used to instruct the switch to connect the first set of pins to the second set of pins, or to connect the first set of pins to the third set of pins.
[0022] In some embodiments, a processor (such as a baseband processor) may be coupled to a second pin of the switch. The second pin may be used to power on the eSIM card or the physical SIM card. In some embodiments, when the switch connects the first set of pins to the second set of pins, the second pin may be connected to the VCC pin of the eSIM card; when the switch connects the first set of pins to the third set of pins, the second pin may be connected to the VCC pin of the physical SIM card.
[0023] A second aspect provides a method for controlling a device, the device comprising an application processor, a baseband processor, a second SIM card and a card slot, the card slot being used to insert a first SIM card, the method comprising: detecting a card event, the card event comprising inserting the first SIM card into the card slot or removing the first SIM card from the card slot; acquiring configuration information, the configuration information being used to indicate a SIM card working mode; if the configuration information indicates that only the second SIM card is to be used for operation, then only notifying the application processor of the card event.
[0024] The third aspect provides a device for controlling a device, which has the function of realizing the device behaviors in the above aspects and possible implementations of the above aspects. The functions can be realized by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a transceiver module or unit, a processing module or unit, an acquisition module or unit, etc.
[0025] The fourth aspect provides a device, including: a processor, an eSIM card and a card slot, the card slot is used to insert a physical SIM card and a memory, the processor includes an application processor and a baseband processor, and the memory is used to store programs; the processor is used to execute any one of the above-mentioned first aspect or the method described in the second aspect when calling the program.
[0026] A fifth aspect provides a chip system, the chip system includes a processor, the processor includes an application processor and a baseband processor, the processor is coupled to a memory, and the processor executes a program stored in the memory to implement any one of the first aspect or the method described in the second aspect. The chip system may be a single chip or a chip module composed of multiple chips.
[0027] A sixth aspect provides a readable storage medium having a program stored thereon, and when the program is executed by a device, the method described in any one of the first aspect or the second aspect is implemented.
[0028] A seventh aspect provides a program product, which, when executed on a device, enables the device to execute any one of the methods described in the first aspect or the second aspect.
[0029] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of the structure of a device provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of the structure of a processor provided in an embodiment of the present application;
[0032] Figure 3 A structural block diagram of a hardware and software combined device provided in an embodiment of the present application
[0033] Figure 4 A flowchart of a method for controlling a device provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of a display interface provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of another display interface provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of a method for starting a device provided in an embodiment of the present application;
[0037] Figure 8 A flowchart of another method for starting a device provided in an embodiment of the present application;
[0038] Fig. 9 A flowchart of another method for controlling a device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The method for controlling a device provided in the embodiment of the present application can be applied to CPE, E5 devices, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, personal digital assistants (PDA) and other devices. The embodiment of the present application does not impose any restrictions on the specific type of device. Among them, the device supports single-card single-standby, that is, the device can include two or more SIM cards, but only one of the SIM cards can be powered on at the same time. When switching from working with one SIM card to working with another SIM card, the device needs to power off the current SIM card and switch to powering on the other SIM card.
[0040] Among them, CPE can be a mobile signal access device that receives mobile signals and forwards them as wireless Wi-Fi signals; the E5 device can have the same functions as the CPE, and the E5 device can be powered by a battery.
[0041] Please refer to Figure 1 , is a schematic diagram of the structure of a device 100 provided in the present application. The device 100 may include a processor 110, an internal memory 121, a battery 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an eSIM card 170, and a card slot 180, etc.
[0042] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the device 100. In other embodiments of the present application, the device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0043] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a controller, a memory, a baseband processor (BP), etc. Different processing units may be independent devices or integrated into one or more processors.
[0044] The controller may be the nerve center and command center of the device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0045] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This reduces repeated accesses and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0046] In some embodiments, the processor 110 may include one or more interfaces, which may include a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a universal serial bus (USB) interface.
[0047] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the eSIM card 170, the physical SIM card 181, etc.
[0048] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the device 100. In other embodiments of the present application, the device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0049] The wireless communication function of the device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0050] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
[0051] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0052] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules. In some embodiments, the modem processor may trigger the device 100 to restart when it detects that the physical SIM card 181 is inserted or removed from the card slot 180.
[0053] The wireless communication module 160 can provide wireless local area networks (WLAN) (such as Wi-Fi networks) applied on the device 100. Optionally, the wireless communication module 160 can provide wireless communication solutions such as Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied on the device 100. 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 the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0054] In some embodiments, antenna 1 of device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that device 100 can communicate with the network and other devices through wireless communication technology.
[0055] The internal memory 121 can be used to store program codes, which include instructions. The processor 110 executes various functional applications and data processing of the device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function, etc. The data storage area can store data created during the use of the device 100, etc. In addition, the internal memory 121 may include a high-speed random access memory. In some embodiments, the internal memory 121 may include a non-volatile memory (NVRAM), and the data stored in the NVRAM may be referred to as non-volatile data, i.e., NV data. Due to the non-volatile nature of NVRAM, the NV data therein can be retained even in the case of power failure, so NVRAM is used to store more important information, such as the basic configuration of the device 100.
[0056] SIM cards can be used to implement wireless communication solutions. SIM cards can be used to store user-related data, such as international mobile subscriber identities; network parameters provided by network operators, such as authentication information, encryption information, etc.; user data, such as short messages, address books, location information, etc. SIM cards can include eSIM cards 170 and physical SIM cards 181.
[0057] The eSIM card 170 can be embedded in the device 100 and cannot be separated from the device 100. The information in the eSIM card 170 can be modified to switch the number and operator. The eSIM card 170 may include multiple pins, such as six pins: clock (CLK), power supply voltage (VCC), programming voltage (VPP), I / O (input / output), reset (RST), and ground (GND).
[0058] The physical SIM card 181 can be connected to the device 100 through the card slot 180. The card slot 180 can be used as a SIM card interface, and the SIM card 181 can be inserted into or pulled out of the card slot 180 to achieve contact and separation with the device 100. The device 100 can support 1 or N card slots 180, where N is a positive integer greater than 1. The card slot 180 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same card slot 180 at the same time. The types of the multiple cards can be the same or different. The card slot 180 can also be compatible with different types of SIM cards. The card slot 180 can also be compatible with external memory cards. The device 100 interacts with the network through the physical SIM card 181 to achieve functions such as calls and data communications. The physical SIM card 181 can include multiple pins, such as 6 pins of clock (CLK), power supply voltage (VCC), programming voltage (VPP), I / O (input / output), reset (RST) and ground (GND).
[0059] In some embodiments, the card slot 180 may include a card tray and a card holder. The card tray may be used to fix and support the physical SIM card 181. The card holder may include a plurality of metal shrapnel and pins connected to each metal shrapnel, the plurality of metal shrapnel may be connected to a plurality of pins included in the physical SIM card 181, and the pins of each metal shrapnel may be coupled to other modules or chips, such as the processor 110. In some embodiments, the card holder may include 6 metal shrapnel, the 6 metal shrapnel are respectively electrically connected to the 6 pins of the clock (CLK), power supply voltage (VCC), programming voltage (VPP), I / O (input / output), reset (RST) and ground terminal (GND) of the physical SIM card 181. The card holder may also include another metal shrapnel and a pin connected to the other metal shrapnel, the pin connected to the other shrapnel may be coupled to other modules or chips, and the pin may be used to detect that the card tray is inserted into or removed from the card holder. In some embodiments, when the card tray is inserted into the card holder, the card tray contacts another metal spring, and the other metal spring and the pin connected to the other metal spring are at a high level. When the card tray is removed from the card holder, the card tray is separated from the other metal spring, and the other metal spring and the pin connected to the other metal spring are at a low level.
[0060] Figure 2 The schematic diagram of the structure of a processor 110 provided in an embodiment of the present application is as follows. The processor 110 includes an application processor 111 and a baseband processor 112 .
[0061] The application processor 111 can run an operating system (such as an Android system) and application programs. In some embodiments, the application processor 111 can be used to control the display of SIM card-related setting items to the user and receive SIM card-related setting items submitted by the user. In some embodiments, the application processor 111 can be used to instruct the baseband processor 112 to send a power-on instruction so that the baseband processor 112 performs a power-on operation. In some embodiments, the application processor 111 can trigger the device 100 to restart, and determine whether to perform a power-on operation on the eSIM card 170 or a power-on operation on the physical SIM card 181 during the restart process.
[0062] The baseband processor 112 may include a modem, which may be used to communicate with a base station, perform data exchange with the application processor 111 , and control power-on operations to the eSIM card 170 or the physical SIM card 181 .
[0063] The baseband processor 112 may have a single-card single-standby function, that is, the baseband processor 112 can only power on one SIM card at a time. Figure 2 As shown, the eSIM card 170 or the physical SIM card 181 can be connected to the application processor 111 and the baseband processor 112 through the switch 190. Figure 2 In the present embodiment, the active end of the switch 190 is connected to the eSIM card 170, the eSIM card 170 is electrically connected to the application processor 111 and the baseband processor 112, and the device 100 can perform a power-on operation on the eSIM card 170 and perform services based on the eSIM card 170, that is, the eSIM card mode. Similarly, when the active end of the switch 190 is connected to the physical SIM card 181, the physical SIM card 181 is electrically connected to the application processor 111 and the baseband processor 112, so that the device 100 can perform a power-on operation on the physical SIM card 181 and perform services based on the physical SIM card 181, that is, the physical SIM card mode.
[0064] In some implementations, the eSIM card 170 , the switch 190 , the application processor 111 , and the baseband processor 112 may be integrated together, that is, the eSIM card 170 , the switch 190 , the application processor 111 , and the baseband processor 112 may all belong to the processor 110 .
[0065] The switch 190 may include a first set of pins, a second set of pins, and a third set of pins. The first set of pins may be coupled to the application processor 111 and the baseband processor 112, the second set of pins may correspond to the pins of the eSIM card 170, and the third set of pins may correspond to the pins of the physical SIM card 181. When the switch 190 connects the first set of pins to the second set of pins, the eSIM card 170 is connected to the application processor 111 and the baseband processor 112, so that the device 100 switches to work using the eSIM card 170; when the switch 190 connects the first set of pins to the third set of pins, the physical SIM card 181 is connected to the application processor 111 and the baseband processor 112, so that the device 100 switches to work using the physical SIM card 181.
[0066] The processor 110 (such as the application processor 111) can be coupled to the first pin (also referred to as SIM_DET) in the card slot 180. In some embodiments, the level of the first pin can be used to detect whether the physical SIM card 181 is in place, that is, whether the card slot 180 includes the physical SIM card 181. When the first pin is at the first level, it is determined that the physical SIM card 181 is in place; when the first pin is at the second level, it is determined that the physical SIM card 181 is not in place; when the first pin changes from the first level to the second level, it is determined that the physical SIM card 181 is removed; when the first pin changes from the second level to the first level, it is determined that the physical SIM card 181 is inserted. In some embodiments, the first level can be any one of a high level and a low level, and the second level can be the other of the high level and the low level, for example, the first level can be a high level, and the second level can be a low level. And it can be understood that the high level and the low level can be any two levels of different sizes, or two levels of different sizes agreed in advance. For example, the high level can be 1 and the low level can be 0.
[0067] The processor 110 (such as the baseband processor 112) may be coupled to a second pin of the switch 190, and the second pin may be one of the first set of pins. The second pin may be used to power on the eSIM card 170 or the physical SIM card 181. In some embodiments, when the switch 190 connects the first set of pins to the second set of pins, the second pin may be connected to the VCC pin of the eSIM card 170; when the switch 190 connects the first set of pins to the third set of pins, the second pin may be connected to the VCC pin of the physical SIM card 181.
[0068] The processor 110 (such as the application processor 111) may be coupled to a third pin (also referred to as SIM_SEL) of the switch 190, and the third pin may be one of the first set of pins. The third pin may have a GPIO function for selecting the eSIM card 170 or the physical SIM card 181. In some embodiments, the third pin may be used to instruct the switch 190 to connect the first set of pins to the second set of pins, or to connect the first set of pins to the third set of pins.
[0069] By the above Figure 2 It can be seen that the switch 190 can switch between the eSIM card 170 or the physical SIM card 181, thereby realizing the switching of the SIM card working mode. The switching process will involve hardware power-on operation, which may cause the device 100 to restart.
[0070] The software system of device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
[0071] Figure 3 The structure block diagram of a device combining software and hardware provided in an embodiment of the present application includes an application processor 111, a baseband processor 112, a kernel layer 113, an eSIM card 170 and a physical SIM card 181.
[0072] The application processor 111 may include an AT service 115 adapted to the baseband processor 112. The application processor 111 may communicate with the baseband processor 112 based on the AT service 115, including the application processor 111 obtaining the identification code (personal identification number, PIN) in the SIM card from the baseband processor 112 through the AT service 115, instructing the baseband processor 112 to dial, configuring the baseband processor 112 and the SIM card and other hardware. In some embodiments, an AT channel is included between the application processor 111 and the baseband processor 112, and the AT channel can be used for data transmission between the application processor 111 and the baseband processor 112. In some embodiments, the AT channel may include a communication interface between the application processor 111 and the baseband processor 112. In an embodiment of the present application, the application processor 111 may instruct the baseband processor 112 to power on the eSIM card 170 or the physical SIM card 181 through the AT service 115, and receive information such as card-free events and network loss events fed back by the baseband processor 112.
[0073] In some implementations, the application processor 111 may include a system daemon (syswatch) 114. The system daemon 114 is a program with higher system privileges that can be used to ensure the safe operation of the device. In the embodiment of the present application, the application processor 111 can communicate with the kernel layer 113 through the system daemon 114, thereby shielding the baseband processor from perceiving specific information such as card events.
[0074] In some implementations, the application processor 111 may run application packages including physical SIM card management, eSIM card management, SIM card operating mode management, WLAN and other applications.
[0075] Physical SIM card management can be used by users to view and edit relevant information of the physical SIM card 181, such as viewing the mobile network operator, call package, storage or deletion of short messages, etc. of the physical SIM card 181.
[0076] eSIM card management can have the same or similar functions as physical SIM card management, and can also be used to change the international mobile subscriber identity code and network parameters provided by the network operator.
[0077] SIM card working mode management can be used to configure the SIM card working mode. In some embodiments, the SIM card working mode may include working with only an eSIM card (referred to as eSIM only), working with only a physical SIM card (referred to as physical SIM only), or using a physical SIM card first (referred to as automatic mode). When the device includes an eSIM card 170 and a physical SIM card 181, since the eSIM card 170 is always in place and does not need to be physically installed or removed, it only needs to be configured according to the card slot 180 ( Figure 3 The SIM card actually used is determined by whether the physical SIM card 181 is included in the mobile phone (not shown), so the priority use of the physical SIM card can be called the automatic mode. It can be understood that in actual applications, the SIM card working mode can also include more modes, or each SIM card working mode can also have other names. For example, only the eSIM mode can also be called the virtual card mode, and only the physical SIM mode can also be called the physical card mode. The embodiments of the present application do not limit the number of SIM card working modes and the mode names.
[0078] The kernel layer 113 is a layer between hardware and software. The kernel layer 113 may include a driver corresponding to each SIM card, such as an eSIM card driver and a physical SIM card driver. The kernel layer 113 may implement communication between the application processor 111 and the baseband processor 112, and the eSIM card 170 and the physical SIM card 181. In some embodiments, the kernel layer 113 may detect whether the card slot 180 includes a physical SIM card 181. In some embodiments, the kernel layer 113 may detect card events such as inserting a physical SIM card 181 into the card slot 180 and removing a physical SIM card 181 from the card slot 180.
[0079] In some embodiments, the kernel layer 113 may include one or more NV data, and the NV data may be used to record configuration information related to the communication function, such as international mobile equipment identity (IMEI), networks allowed to be registered, and currently registered networks. In some embodiments, the NV data may include a SIM card operating mode, which may be a physical SIM card only mode, an eSIM card only mode, or an automatic mode.
[0080] Depend on Figure 4 It can be seen that the kernel layer 113 can communicate directly with the application processor 111 or the baseband processor 112. Then, when the kernel layer 113 transmits information to the upper layer, it can transmit the information to the application processor 111 and the baseband processor 112, or it can selectively transmit the information to only one of the application processor 111 and the baseband processor 112, while shielding the other from sensing the information. In the embodiment of the present application, in the mode of working with only the eSIM card 170, the insertion or removal of the physical SIM card 181 will not actually have an adverse effect on the working process of using the eSIM card 170, so the baseband processor 112 can be shielded from sensing card events such as the insertion or removal of the physical SIM card 181, thereby improving problems such as device restart caused by the baseband processor 112 sensing card events such as the insertion or removal of the physical SIM card 181.
[0081] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0082] Please refer to Figure 4 , is a flow chart of a method for controlling a device provided in an embodiment of the present application. The method can be applied to the aforementioned device. It should be noted that the method is not based on Figure 5The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0083] S401, the device detects a card event, where the card event includes inserting a physical SIM card into a card slot or removing a physical SIM card from a card slot.
[0084] In some embodiments, it is possible to determine whether the card slot includes a physical SIM card by detecting the level of a first pin on the card slot. In some embodiments, if the first pin is at a first level, it is determined that the card slot includes a physical SIM card; if the first pin is at a second level, it is determined that the card slot does not include a physical SIM card; if the first pin changes from a first level to a second level, it is determined that the SIM card is removed from the card slot; if the first pin changes from a second level to a first level, it is determined that a SIM card is inserted into the card slot.
[0085] For example, the device may execute S401 through a kernel layer.
[0086] S402, the device obtains configuration information, the configuration information is used to indicate the SIM card working mode. Then, based on the different SIM card working modes indicated by the configuration information, S403, S405 or S407 can be executed.
[0087] The configuration information may be information stored inside the device.
[0088] In some embodiments, the configuration information may include NV data of the kernel layer, so the NV data can be obtained from the kernel layer of the device. In some embodiments, the NV data can be obtained from the kernel layer based on the index number corresponding to the NV data (such as 5071 or 50751). It is understood that in practical applications, the NV data may also correspond to other index numbers. Among them, the NV data may include multiple values, and different SIM card operating modes may be represented when the NV data has different values. In some embodiments, if the NV data is the first value, it can indicate that the SIM card operating mode is to work only with an eSIM card, and if the NV data is the second value, it can indicate that the SIM card operating mode is to work only with a physical SIM card; if the NV data is the third value, it can indicate that the SIM card operating mode is to work with a physical SIM card first. In some embodiments, the first value, the second value, and the third value may be any one of 0, 1, and 2, respectively. It is understood that in practical applications, the value range of NV data is not limited to 0-2, nor is it limited to only numbers.
[0089] In some embodiments, the configuration information may be configured or updated according to an external input operation, such as information submitted by a user or a relevant technician. In some embodiments, the configuration information may be updated in response to a user setting operation on the SIM card working mode. In some embodiments, the NV data may be set to a first value in response to a first setting operation, and the first setting operation is used to set the SIM card working mode to work only with an eSIM card; the NV data may be set to a second value in response to a second setting operation, and the second setting operation is used to set the SIM card working mode to work only with a physical SIM card; the NV data may be set to a third value in response to a third setting operation, and the third setting operation is used to set the SIM card working mode to work with a physical SIM card first.
[0090] In some embodiments, Figure 5 As shown, a first display interface 501 can be displayed to the user, and the first display interface 501 includes a SIM card management option 502. When a user click operation is received based on the SIM card management option 502, a second display interface 503 is displayed, and the second display interface 503 includes three options: eSIM only, physical SIM only, and automatic. When a user click operation is received based on the eSIM only option, the NV data of the kernel layer can be set to the first value. When a user click operation is received based on the physical SIM only option, the NV data of the kernel layer can be set to the second value. When a user click operation is received based on the automatic option, the NV data of the kernel layer can be set to the third value.
[0091] In some implementations, the configuration information may be information preset inside the device, such as information preset before leaving the factory.
[0092] For example, the device may execute S402 through a kernel layer.
[0093] S403: If the configuration information indicates that only the eSIM card is to be used, the device only notifies the application processor of the card event.
[0094] If the configuration information indicates that the current SIM card working mode is to use only the eSIM card, then whether the physical SIM card is inserted or removed will not affect the device's eSIM working process, the device will not switch to the physical SIM card, and will not power on or off the physical SIM card. Therefore, the card event can be notified to the application processor, so that the application layer perceives the card event, and the card event is not notified to the baseband processor. That is, when only the eSIM card is used, the baseband processor is shielded from the perception of card events such as inserting and removing the physical SIM card, thereby reducing the restart operations caused by this, improving the problem of the device's eSIM card working process being interrupted, and improving the stability and reliability of the eSIM card-only working scenario.
[0095] In some implementations, the application processor may be notified of card events via a system daemon.
[0096] In some implementations, prompt information may be presented to the user, which may prompt the user of a card event so that the user can perceive the card event and determine whether to update the SIM card operating mode of the device or perform other operations based on the card event.
[0097] For example, when only using an eSIM card, the device may display the following information when a physical SIM card is inserted into the card slot: Figure 6 The third display interface 601 is shown. In the third display interface 601, the upper left corner shows that the card 2 is currently in use, and a prompt message "SIM card message" is also displayed, which includes "Card 1 (physical SIM card) is detected to have been inserted, and card 2 (eSIM card) is currently in use", thereby prompting the user that the card 2 currently in use is the eSIM card, and the card 1 currently inserted is the physical SIM card.
[0098] In some embodiments, Figure 6 As shown in the figure, the prompt information may also include three options: "Restart", "Switch Card Mode" and "Ignore". When a user click operation is received based on the "Restart" option, the device may be restarted but the configuration information for indicating the SIM card working mode may not be updated; when a user click operation is received based on the "Switch Card Mode" option, the following may be displayed: Figure 5 The first display interface 501 or the second display interface 503 is shown to facilitate the user to update the configuration information, thereby switching the SIM card working mode; when a user click operation is received based on the "Ignore" option, the prompt information can be hidden.
[0099] For example, the device may execute S403 through a kernel layer.
[0100] S404: The device updates the status information of the physical SIM card.
[0101] Among them, the status information of the physical SIM card can be used to indicate whether the card slot includes a physical SIM card. In some embodiments, the status information of the physical SIM card can be updated based on the card event, wherein, if the card event is the insertion of a physical SIM card into the card slot, the status information of the physical SIM card can be updated to the card slot including the physical SIM card; if the card event is the removal of the physical SIM card from the card slot, the status information can be updated to the card slot not including the physical SIM card. That is, when the SIM card working mode is to work only with the eSIM card and a card event is detected, the baseband processor can be shielded from sensing the card event, but the stored status information of the physical SIM card can be updated according to the card event. In the subsequent working process, when the SIM card working mode is updated to work only with the physical SIM card or to work with the physical SIM card first, and the card slot includes a physical SIM card, the device can still be restarted, thereby switching from working with the eSIM card to working with the physical SIM card.
[0102] In some embodiments, the state information of the physical SIM card can be stored in the application layer, and the state information of the physical SIM card can be updated by the application processor, so that the application processor can obtain the state information and determine whether to restart the device in response to the received update operation of the configuration information. In some embodiments, when the device is restarted, the state information of the physical SIM card can be deleted or initialized.
[0103] In some embodiments, when the state information of the physical SIM card indicates that the card slot includes a physical SIM card, the device may be restarted in response to the second switching operation or the third setting operation. That is, in the case where the card slot includes a physical SIM card, since the physical SIM card is available, if the user switches the SIM card operation to only using the physical SIM card or giving priority to using the physical SIM card, the device may be restarted to switch to using the physical SIM card.
[0104] It is understandable that, in actual applications, other methods can be used to record and determine whether the card slot includes a physical SIM card without storing and updating the status information of the physical SIM card. Therefore, S404 can be omitted. Accordingly, when it is determined by any method that the card slot includes a physical SIM card, the device can be restarted in response to the second setting operation or the third setting operation.
[0105] S405: If the configuration information indicates that only the physical SIM card is used, the device notifies the application processor and the baseband processor of the card event.
[0106] If the configuration information indicates that the current SIM card working mode is to use only a physical SIM card, the insertion and removal of the physical SIM card will affect whether the device can use the physical SIM card, as well as the power-on or power-off operation of the physical SIM card. Therefore, in the case of using only a physical SIM card, the card event can be notified to the application processor and the baseband processor.
[0107] In some embodiments, the status information of the physical SIM card can be updated based on a card event. If the card event is inserting a physical SIM card into the card slot, the status information of the physical SIM card can be updated to the card slot including the physical SIM card; if the card event is removing the physical SIM card from the card slot, the status information of the physical SIM card can be updated to the card slot not including the physical SIM card.
[0108] For example, the device may execute S405 through a kernel layer.
[0109] S406, the device restarts.
[0110] In some implementations, if the configuration information indicates that only a physical SIM card is used, and the card event includes inserting a physical SIM card into the card slot, the device may be restarted to power on the physical SIM card again.
[0111] In some embodiments, if the configuration information indicates that only a physical SIM card is used for work, and the card event includes removing the physical SIM card from the card slot, the baseband processor may report the card absence event and the network drop event to the application processor, and the application processor may determine whether to restart the device based on the card absence event, the network drop event and other related information. It should be noted that since the configuration information indicates that only a physical SIM card is used for work, when the card event includes removing the physical SIM card from the card slot, even if the device is restarted, the physical SIM card cannot be used for work, so the device may or may not be restarted at this time.
[0112] In some embodiments, when the state information of the physical SIM card indicates that the card slot does not include a physical SIM card (or when it is determined by any means that the card slot does not include a physical SIM card), the device may be restarted in response to the first setting operation or the third setting operation on the SIM card working mode. That is, in the case where the card slot does not include a physical SIM card, since the physical SIM card is unavailable, if the user sets the SIM card working mode to work only with an eSIM card or to work with a physical SIM card first, the device may be restarted to switch to working with an eSIM card.
[0113] S407: If the configuration information indicates that the physical SIM card is used first, the device notifies the application processor and the baseband processor of the card event.
[0114] If the configuration information indicates that the current SIM card working mode is to give priority to the use of the physical SIM card, the insertion and removal of the physical SIM card will affect the device's switching between using the physical SIM card and using the eSIM card, which means that the physical SIM card needs to be powered on or off, so the application processor and baseband processor can be notified of the card event.
[0115] For example, the device may execute S407 through a kernel layer.
[0116] S408, the device restarts.
[0117] In some implementations, if the configuration information indicates that the physical SIM card is to be used preferentially, and the card event includes inserting a physical SIM card into the card slot, the device may be restarted to power on the physical SIM card again.
[0118] In some implementations, if the configuration information indicates that the physical SIM card is preferred, and the card event includes removing the physical SIM card from the card slot, the device may be restarted to power on the eSIM card again.
[0119] The way in which the device executes S408 to restart may be the same as or similar to the way in which the device executes S406 to restart.
[0120] In an embodiment of the present application, card events such as inserting a physical SIM card into a card slot or removing a physical SIM card from a card slot can be detected, and configuration information indicating the working mode of the SIM card can be obtained. If the configuration information indicates that the current working mode of the SIM card is to work only with an eSIM card, the card event can be notified to the application processor so that the application layer perceives the card event without notifying the baseband processor of the card event. That is, in the case of working only with an eSIM card, the baseband processor is shielded from the perception of card events such as inserting a physical SIM card and removing a physical SIM card, thereby reducing the restart operations caused by this, improving the problem of interruption of the process of the device working with an eSIM card, and improving the stability and reliability in the scenario of working only with an eSIM card.
[0121] Please refer to Figure 7 , is a flow chart of a method for starting a device provided in an embodiment of the present application. The method can be applied to the aforementioned device. It should be noted that the method is not limited to the specific order described in 7 and below. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0122] S701, when starting up, the device obtains configuration information.
[0123] The configuration information may be used to indicate the configured SIM card working mode. In some implementations, the SIM card working mode may include working only with an eSIM card, working only with a physical SIM card, and working with a physical SIM card first.
[0124] In some embodiments, the configuration information may include NV data stored in the kernel layer, so that when the kernel layer is started and the SIM card working mode set by the application layer cannot be determined, the configured SIM card working mode can be determined, thereby improving the reliability of selecting the SIM card working mode at startup. If the NV data is the first value, the SIM card working mode is determined to be only using the eSIM card; if the NV data is the second value, the SIM card working mode is determined to be only using the physical SIM card; if the NV data is the third value, the SIM card working mode is determined to be preferentially using the physical SIM card.
[0125] For example, the device may execute S701 through an application processor.
[0126] S702: The device performs a power-on operation on the eSIM card or the physical SIM card based on the configuration information.
[0127] In some embodiments, if the configuration information indicates that only a physical SIM card is used for operation, a power-on operation is performed on the physical SIM card; if the configuration information indicates that only an eSIM card is used for operation, a power-on operation is performed on the eSIM card. In some embodiments, if the configuration information indicates that a physical SIM card is used first and the card slot includes a physical SIM card, a power-on operation is performed on the physical SIM card; if the configuration information indicates that a physical SIM card is used first and the card slot does not include a physical SIM card, a power-on operation is performed on the eSIM card.
[0128] In some embodiments, the configuration information includes NV data of the kernel layer, so the SIM card working mode can be determined by the NV data, and whether the card slot includes a physical SIM card can be determined by the level of the first pin of the card slot. In some embodiments, if the NV data is the first value, a power-on operation is performed on the eSIM card; if the NV data is the second value, a power-on operation is performed on the physical SIM card; if the NV data is the third value and the first pin is the first level, a power-on operation is performed on the physical SIM card; if the NV data is the third value and the first pin is the second level, a power-on operation is performed on the eSIM card. In some embodiments, the first level can be a high level and the second level can be a low level. That is, in the boot-up phase, if the relevant information of selecting a SIM card cannot be obtained from the application layer, the SIM card working mode can be determined from the NV data of the kernel layer, and whether the card slot includes a physical SIM card can be determined from the hardware pin, so as to accurately power on the physical SIM card or the eSIM card.
[0129] In some implementations, the application processor can determine whether the eSIM card or the physical SIM card performs a power-on operation and instruct the switch to switch to the eSIM card or the physical SIM card. When the switch switching is completed, the baseband processor is started again. The baseband processor can directly power on the eSIM card or the physical SIM card that has been switched through the switch.
[0130] In an embodiment of the present application, during the boot-up phase, when it is impossible to obtain relevant information for selecting a SIM card from the application layer, the SIM card operating mode can be determined from the NV data of the kernel layer, and whether the card slot includes a physical SIM card can be determined based on the level value of the hardware pin. Then, based on the configured SIM card operating mode and whether the card slot contains a physical SIM card, the physical SIM card or the eSIM card can be accurately powered on, thereby improving the problem of difficulty in selecting the SIM card operating mode during the boot-up phase.
[0131] Please refer to Figure 8 , is a flow chart of a method for starting a device provided in an embodiment of the present application. The method can be used as Figure 7 It should be noted that this method is not based on Figure 8 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0132] S801 , the device starts the application processor 111 .
[0133] S802, the device obtains NV data.
[0134] In some embodiments, the NV data may include a first value, a second value, or a third value. When the NV data is the first value (such as 0), it is determined that only the eSIM card is used to work, so S805 can be executed. When the NV data is the second value (such as 1), it is determined that only the physical SIM card is used to work, so S804 can be executed. When the NV data is the third value (such as 2), it is determined that the physical SIM card is used first to work, so S803 can be executed.
[0135] For example, the device may execute S802 through an application processor or a kernel layer.
[0136] S803, the device reads the level of the first pin.
[0137] If the first pin is at the first level (such as a high level), it is determined that the card slot includes a physical SIM card, and S804 can be executed; if the first pin is at the second level (such as a low level), it is determined that the card slot does not include a physical SIM card, and S805 can be executed.
[0138] For example, the device may execute S803 through an application processor or a kernel layer.
[0139] S804, the device switches the switch 190 to the physical SIM card 181. If the switch is successful, S805 is executed; if the switch fails, the process returns to S801, thereby triggering a restart of the entire device.
[0140] It should be noted that the reason for the failure to switch the switch 190 to the physical SIM card 181 may be a software reason, such as a failure in the program used to execute the aforementioned S801-S804, or a hardware reason, such as the switch 190 cannot perform mechanical movement, the relevant circuit of the switch 190 is short-circuited or open-circuited, etc. The embodiment of the present application does not limit the reason for the failure to execute S804. However, it is understandable that, whether it is a software or hardware reason, by executing S804, if it is impossible to switch to the physical SIM card 181, the device can be restarted again, and the physical SIM card can be tried again to power on, thereby improving the problem of being unable to switch to the physical SIM card and improving the reliability of the device.
[0141] For example, the device may execute S804 through an application processor or a kernel layer.
[0142] S805 , the device starts the baseband processor 112 .
[0143] Since the switch 190 can electrically connect the baseband processor 112 and the eSIM card 170 or the physical SIM card 181, the baseband processor 112 is started, that is, the eSIM card 170 or the physical SIM card 181 can be powered on through the baseband processor 112, and the powered-on eSIM card 170 or the physical SIM card 181 can be used for operation.
[0144] For example, the device may execute S805 through an application processor or a kernel layer.
[0145] It is understandable that the physical SIM card mentioned above can be replaced by the first SIM card, the eSIM card can be replaced by the second SIM card, and the first SIM card is not limited to the physical SIM card mentioned above, and the second SIM card is not limited to the eSIM card mentioned above, as long as the first SIM card and the second SIM card are any different SIM cards, and the device can only power on the first SIM card or the second SIM card at the same time. Figure 4 As an example, the physical SIM card is replaced with the first SIM card, and the eSIM card is replaced with the second SIM card, and the following can be obtained: Fig. 9 Please refer to the method shown. Fig. 9 , is a flow chart of a method for controlling a device provided in an embodiment of the present application. The method can be applied to the aforementioned device. It should be noted that the method is not based on Fig. 9 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0146] S901, a device detects a card event, where the card event includes inserting a first SIM card into a card slot or removing the first SIM card from the card slot.
[0147] In some implementations, the first SIM card may include the aforementioned physical SIM card. Of course, in practical applications, the first SIM card may also include other SIM cards.
[0148] S902, the device obtains configuration information, the configuration information is used to indicate the SIM card working mode. Then, based on the different SIM card working modes indicated by the configuration information, S903, S905 or S907 can be executed.
[0149] In some implementations, the SIM card working mode may include working only with the second SIM card, working only with the first SIM card, or working with the first SIM card preferentially.
[0150] In some implementations, the second SIM card may include the aforementioned eSIM card. Of course, in practical applications, the second SIM card may also include other SIM cards.
[0151] S903: If the configuration information indicates that only the second SIM card is to be used, the device only notifies the application processor of the card event.
[0152] S904: The device updates the status information of the first SIM card.
[0153] The status information of the first SIM card may be used to indicate whether the card slot includes the first SIM card. In some embodiments, the status information of the first SIM card may be updated based on a card event, wherein if the card event is that the first SIM card is inserted into the card slot, the status information of the first SIM card may be updated to indicate that the card slot includes the first SIM card; if the card event is that the first SIM card is removed from the card slot, the status information may be updated to indicate that the card slot does not include the first SIM card.
[0154] In some embodiments, when the status information of the first SIM card indicates that the card slot includes the first SIM card, the device may be restarted in response to a second setting operation or a third setting operation, wherein the second setting operation is used to set the SIM card working mode to work only with the first SIM card; and the third setting operation is used to set the SIM card working mode to work with the first SIM card first.
[0155] S905: If the configuration information indicates that only the first SIM card is to be used, the device notifies the application processor and the baseband processor of the card event.
[0156] S906: The device restarts.
[0157] In some embodiments, when the status information of the first SIM card indicates that the card slot does not include the first SIM card, the device may be restarted in response to a first setting operation or a third setting operation on the SIM card working mode, wherein the first setting operation sets the SIM card working mode to work only with the second SIM card.
[0158] S907: If the configuration information indicates that the first SIM card is used preferentially, the device notifies the application processor and the baseband processor of the card event.
[0159] S908: The device restarts.
[0160] The method of executing S901-S908 may be the same as or similar to the method of executing S401-S408 described above.
[0161] In an embodiment of the present application, card events such as inserting the first SIM card into the card slot or removing the first SIM card from the card slot can be detected, and configuration information indicating the working mode of the SIM card can be obtained. If the configuration information indicates that the current working mode of the SIM card is to work only with the second SIM card, the card event can be notified to the application processor so that the application layer perceives the card event without notifying the baseband processor of the card event. That is, in the case of working with only the second SIM card, the baseband processor is shielded from the perception of card events such as inserting the first SIM card and removing the first SIM card, thereby reducing the restart operation caused by this, improving the problem of interruption of the process of the device working with the second SIM card, and improving the stability and reliability in the working scenario of only using the second SIM card.
[0162] Based on the same inventive concept, an embodiment of the present application further provides a device. The device includes: a memory and a processor. The memory is used to store a computer program; the processor is used to execute the method described in the above method embodiment when calling the computer program. In some embodiments, the device may also include an eSIM card and a card slot, and the card slot is used to insert a physical SIM card. In some embodiments, the processor includes an application processor and a baseband processor.
[0163] The device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0164] Based on the same inventive concept, the embodiment of the present application further provides a chip system. The chip system includes a processor, the processor includes an application processor and a baseband processor, the processor is coupled to a memory, and the processor executes a program stored in the memory to implement the method described in the above method embodiment.
[0165] The chip system may be a single chip or a chip module composed of multiple chips.
[0166] The embodiment of the present application also provides a readable storage medium on which a program is stored. When the program is executed by a processor, the method described in the above method embodiment is implemented.
[0167] The embodiment of the present application also provides a program product, which, when executed on a device, enables the device to implement the method described in the above method embodiment.
[0168] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a program, and the program can be stored in a readable storage medium. When the program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the program includes program code, and the program code can be in source code form, object code form, executable file or some intermediate form. The readable storage medium may at least include: any entity or device that can carry the program code to the camera device / equipment, recording medium, memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0169] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0170] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0171] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0172] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0173] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0174] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0175] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for controlling a device, characterized in that: The device includes an application processor, a baseband processor, an embedded subscriber identity module eSIM card and a card slot, wherein the card slot is used to insert a physical SIM card, and the method includes: Detecting a card event, wherein the card event includes inserting the physical SIM card into the card slot or removing the physical SIM card from the card slot; Acquire configuration information, where the configuration information is used to indicate a working mode of the SIM card; If the configuration information indicates to work with only the eSIM card, only the card event is notified to the application processor.
2. The method according to claim 1, characterized in that The configuration information includes non-volatile NV data stored in the kernel layer, and if the configuration information indicates that only the eSIM card is used to work, only the card event is notified to the application processor, including: If the NV data is the first value, only the application processor is notified of the card event.
3. The method according to claim 2, characterized in that The method further comprises: In response to a first setting operation, the NV data is set to the first value, and the first setting operation is used to set the SIM card working mode to only use the eSIM card.
4. The method according to any one of claims 1 to 3, characterized in that: The card event includes inserting the physical SIM card into the card slot, and the method further includes: Updating the status information of the physical SIM card so that the card slot includes the physical SIM card; In response to a second setting operation or a third setting operation, and the card slot includes the physical SIM card, the device is restarted, the second setting operation is used to set the SIM card working mode to only use the physical SIM card, and the third setting operation is used to set the SIM card working mode to preferentially use the physical SIM card.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If the configuration information indicates to use only the physical SIM card for operation or to use the physical SIM card for operation with priority, the card event is notified to the application processor and the baseband processor.
6. The method according to any one of claims 1 to 5, characterized in that: The notifying the application processor of the card event comprises: The application processor is notified of the card event via a system daemon.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the computer is powered on, the configuration information is obtained; Based on the configuration information, a power-on operation is performed on the eSIM card or the physical SIM card.
8. The method according to claim 7, characterized in that The card slot includes a first pin, the first pin is coupled to the application processor, when the card slot includes the physical SIM card, the first pin is at a first level, and when the card slot does not include the physical SIM card, the first pin is at a second level, and performing a power-on operation on the eSIM card or the physical SIM card based on the configuration information includes any one of the following: If the configuration information indicates that only the physical SIM card is to be used for operation, performing a power-on operation on the physical SIM card; If the configuration information indicates that only the eSIM card is to be used for operation, powering on the eSIM card; If the configuration information indicates that the physical SIM card is used preferentially, and the first pin is at the first level, performing a power-on operation on the physical SIM card; If the configuration information indicates that the physical SIM card is used preferentially and the first pin is at the second level, a power-on operation is performed on the eSIM card.
9. A device, characterized in that: include: A processor, an embedded user identity module eSIM card and a card slot, wherein the card slot is used to insert a physical SIM card and a memory, the processor includes an application processor and a baseband processor, and the memory is used to store programs; the processor is used to execute the method according to any one of claims 1 to 8 when calling the program.
10. A readable storage medium having a program stored thereon, characterized in that: When the program is executed by a device, the method according to any one of claims 1 to 8 is implemented.