CN112217936A - Dual-card switching method and device, electronic device and computer readable storage medium - Google Patents
Dual-card switching method and device, electronic device and computer readable storage medium Download PDFInfo
- Publication number
- CN112217936A CN112217936A CN202011237767.8A CN202011237767A CN112217936A CN 112217936 A CN112217936 A CN 112217936A CN 202011237767 A CN202011237767 A CN 202011237767A CN 112217936 A CN112217936 A CN 112217936A
- Authority
- CN
- China
- Prior art keywords
- level
- card slot
- card
- slot module
- switching
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/02—Terminal devices
- H04W88/06—Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Sources (AREA)
Abstract
The application discloses a double-card switching method, which is applied to an electronic device, wherein the electronic device comprises a control pin, a first card slot module and a second card slot module, and the method comprises the following steps: when a switching instruction for switching the SIM card is received, switching the level of the control pin from a first level to a second level; powering off the first card slot module and powering on the second card slot module so that the electronic device is accessed to a first operator network through an SIM card arranged on the second card slot module; when the level of the control pin is a first level, the first card slot module is in a power-on state, the second card slot module is in a power-off state, and the electronic device is accessed to a second operator network through an SIM card installed on the first card slot module. The application also provides a dual-card switching device, an electronic device and a computer readable storage medium. The dual-card single-standby function can be realized, and the dual-card single-standby function has the advantages of low cost and low power consumption.
Description
Technical Field
The present invention relates to the field of electronic communications technologies, and in particular, to a method and an apparatus for dual card switching, an electronic apparatus, and a computer-readable storage medium.
Background
With the development of the mobile internet, the more functions supported on the terminal, the higher the cost thereof, and the greater the power consumption. The existing dual card technology can be roughly divided into dual card dual standby dual pass and dual card dual standby single pass, the dual card dual standby dual pass generally has two receiving antennas, and the cost and the power consumption are both high. Although the existing dual-card dual-standby single-pass uses a single antenna, the cost and the power consumption are still higher. And the application scenes which need low power consumption and low cost cannot be met.
Disclosure of Invention
In view of the above, the present invention provides a dual-card switching method, a dual-card switching apparatus, an electronic apparatus, and a computer-readable storage medium, which can implement a dual-card single-standby function and have the advantages of low cost and low power consumption.
First, to achieve the above object, the present invention provides a dual card switching method.
Further, to achieve the above object, the present invention further provides a dual card switching method, applied to an electronic device, where the electronic device includes a control pin, a first card slot module and a second card slot module, and the dual card switching method includes: when a switching instruction for switching the SIM card is received, switching the level of the control pin from a first level to a second level; powering off the first card slot module and powering on the second card slot module so that the electronic device is accessed to a first operator network through an SIM card arranged on the second card slot module; when the level of the control pin is a first level, the first card slot module is in a power-on state, the second card slot module is in a power-off state, and the electronic device is accessed to a second operator network through an SIM card installed on the first card slot module.
In some embodiments, the method further comprises: when the electronic device is in a power-on state, setting the level of the control pin to be the first level so as to power on the first card slot module; judging whether an SIM card is detected within a first preset time after the first card slot module is powered on; if the SIM card is not detected within the first preset time, switching the level of the control pin from a first level to a second level; powering down the first card slot module and powering up the second card slot module.
In some embodiments, the method further comprises: when the electronic device is detected to be offline, counting the current offline time of the electronic device; judging whether the current offline time exceeds a second preset time or not; and if the current off-line time exceeds the second preset time, changing the level of the control pin.
In some embodiments, said changing the level of said control pin comprises: if the current level of the control pin is the first level, switching the level of the control pin from the first level to the second level; and if the current level of the control pin is the second level, switching the level of the control pin from the second level to the first level.
In some embodiments, the control pin is a GPIO pin.
In some embodiments, the first operator network and the second operator network are the same operator network, or the first operator network and the second operator network are different operator networks.
In some embodiments, the first level is a high level and the second level is a low level; or, the first level is a low level, and the second level is a high level.
Further, to achieve the above object, the present invention further provides a dual card switching device, which is applied to an electronic device, where the electronic device includes a control pin, a first card slot module and a second card slot module, and the dual card switching device includes: the switching module is used for switching the level of the control pin from a first level to a second level when receiving a switching instruction for switching the SIM card; the control module is used for powering off the first card slot module and powering on the second card slot module when the level of the control pin is the second level, so that the electronic device is accessed to a first operator network through an SIM card arranged on the second card slot module; the control module is further configured to power down the second card slot module and power up the first card slot module when the level of the control pin is the first level, so that the electronic device accesses a second operator network through a SIM card installed in the first card slot module.
Further, to achieve the above object, the present invention further provides an electronic device, where the electronic device includes a first card slot module, a second card slot module, a processor and a memory, the processor includes a control pin, the memory stores a plurality of computer programs, and the processor is configured to implement the steps of the dual card switching method when executing the computer programs stored in the memory.
Further, to achieve the above object, the present invention also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is configured to implement the steps of the above dual card switching method when executed by a processor.
Compared with the prior art, the dual-card switching method, the dual-card switching device, the electronic device and the computer readable storage medium provided by the invention can realize the dual-card single-standby function, can provide stable network service, and have the advantages of low cost and low power consumption.
Drawings
FIG. 1 is a diagram of an alternative hardware architecture of the electronic device of the present invention;
FIG. 2 is a block diagram of a dual card switch device according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of a dual card switching method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating steps of a dual card switching method according to another embodiment of the present invention;
fig. 5 is a flowchart illustrating steps of a dual card switching method according to another embodiment of the present invention.
Reference numerals:
electronic device 1
Communication bus 11
First card slot module 15
Second card slot module 16
Dual card switching device 100
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an alternative hardware architecture of the electronic device according to the present invention.
In an embodiment, the electronic device 1 may include, but is not limited to, a memory 12, a processor 13, a network interface 14, a first card slot module 15, a second card slot module 16, and a power supply module 17, which may be communicatively connected through a communication bus 11. It is noted that fig. 1 only shows the electronic device 1 with components 11-17, it being understood that not all shown components need to be implemented, that more or less components may be implemented instead, or that some components may be combined, or that there is a different arrangement of components, e.g. the electronic device 1 may also comprise components like a touch screen.
The memory 12 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 12 may be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 12 may also be an external storage device of the electronic apparatus 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the electronic apparatus 1. Of course, the memory 12 may also comprise both an internal memory unit of the electronic apparatus 1 and an external memory device thereof. In this embodiment, the memory 12 is generally used for storing an operating system and various application software installed in the electronic device 1, such as program codes of the dual card switching device 100. The memory 12 may also be used to temporarily store various types of data that have been output or are to be output.
The network interface 14 may comprise a wireless network interface or a wired network interface, and the network interface 14 is generally used for establishing communication connections between the electronic apparatus 1 and other devices, such as a base station.
Both the first card slot module 15 and the second card slot module 16 can be installed with a SIM card, so that the electronic device 1 can support dual-card dual-standby function.
In one embodiment, the processor 13 may include a control pin (not shown). The control pin may control the power module 17 to power up the first card slot module 15 or power up the second card slot module 16. When the level of the control pin is the first level, the power module 17 is only powered on the first card slot module 15, and at this time, the second card slot module 16 is powered off (i.e. the second card slot module 16 is in a power-off state, and the second card slot module 16 does not consume power), and the electronic device 1 is accessed to the operator network through the SIM card installed in the first card slot module 15. When the level of the control pin is the second level, the power module 17 is only powered on the second card slot module 16, and at this time, the first card slot module 15 is powered off (i.e. the first card slot module 15 is in a power-off state, and the first card slot module 15 does not consume power), and the electronic device 1 is accessed to the operator network through the SIM card installed in the second card slot module 16.
In one embodiment, the first level may be a high level (greater than a first predetermined voltage, such as greater than 3.3V), and the second level may be a low level (less than a second predetermined voltage, such as less than 0.4V). In other embodiments, the first level may be a low level, and the second level may be a high level.
In an embodiment, the control pin may not be disposed on the processor 13, and the control pin is a signal pin of another chip of the electronic device 1. The control pin is preferably a GPIO pin.
Fig. 2 is a functional block diagram of a dual card switching device 100 according to a first embodiment of the present invention.
In this embodiment, the dual card switching apparatus 100 includes a series of computer program instructions stored on the memory 12, and when the computer program instructions are executed by the processor 13, the dual card switching operation of the embodiments of the present invention can be implemented, for example, the dual card switching apparatus 100 can be operated in the electronic apparatus 1. In some embodiments, the dual card switching apparatus 100 may be divided into one or more modules based on the particular operations implemented by the portions of the computer program instructions. For example, in fig. 2, the dual card switching apparatus 100 may be divided into a switching module 101, a control module 102 and a determining module 103. Wherein:
the switching module 101 is configured to switch the level of the control pin from a first level to a second level when receiving a switching instruction for switching the SIM card.
In an embodiment, the switching instruction for switching the SIM card may be generated by a user performing a SIM switching operation on the electronic apparatus 1, such as clicking a SIM switching icon. The user may also notify the electronic apparatus 1 to perform the SIM card switching operation through an at (attention) command or other network data command. Assuming that the level of the control pin is a first level before a switching instruction for switching the SIM card is received, when the switching instruction for switching the SIM card is received, the switching module 101 switches the level of the control pin from the first level to a second level.
It can be understood that, if the level of the control pin is the second level before the switching instruction for switching the SIM card is received, the switching module 101 switches the level of the control pin from the second level to the first level when the switching instruction for switching the SIM card is received.
The control module 102 is configured to power down the first card slot module 15 and power up the second card slot module 16 when the level of the control pin is the second level, so that the electronic device 1 accesses the first operator network through the SIM card installed in the second card slot module 16.
In one embodiment, when the level of the control pin is a second level, the control module 102 powers down the first card slot module 15 and powers up the second card slot module 16. At this time, the first card slot module 15 is in a power-off state, the second card slot module 16 is in a power-on state, and the electronic device 1 accesses the first operator network through the SIM card installed in the second card slot module 16.
For example, the first card slot module 15 is equipped with a first SIM card, and the second card slot module 16 is equipped with a second SIM card. When the level of the control pin is the second level, the first card slot module 15 is in a power-down state, the second card slot module 16 is in a power-up state, and the electronic device 1 accesses the first operator network through the second SIM card installed in the second card slot module 16. The first card slot module 15 corresponding to the first SIM card which is not used temporarily is powered off, so that the power of the electronic device 1 can be saved, and the operation power consumption of the electronic device 1 can be reduced.
The control module 102 is further configured to, when the level of the control pin is a first level, power up the first card slot module 15 and power down the second card slot module 16, so that the electronic device 1 accesses the second operator network through the SIM card installed in the first card slot module 15.
In one embodiment, when the level of the control pin is a first level, the control module 102 powers up the first card slot module 15 and powers down the second card slot module 16. At this time, the first card slot module 15 is in a power-on state, the second card slot module 16 is in a power-off state, and the electronic device 1 accesses the second operator network through the SIM card installed in the first card slot module 15. That is, the electronic device 1 accesses the second carrier network through the first SIM card installed in the first card slot module 15. The second card slot module 16 corresponding to the second SIM card which is not used temporarily is powered off, so that the power of the electronic device 1 can be saved, and the operation power consumption of the electronic device 1 can be reduced
In an embodiment, the first operator network and the second operator network may be the same operator network or different operator networks.
The control module 102 is further configured to set the level of the control pin to the first level when the electronic apparatus 1 is in a power-on state, so as to power on the first card slot module 15.
In an embodiment, when the electronic device 1 is in the power-on state, a card slot module needs to be selected for the electronic device 1 first, and at this time, the control module 102 sets the level of the control pin to the first level, so as to power on the first card slot module 15, that is, the first card slot module 15 is used as an initial card slot module. At this time, the first card slot module 15 is in a power-on state, the second card slot module 16 is in a power-off state, and the electronic device 1 accesses the second operator network through the SIM card installed in the first card slot module 15.
It can be understood that, when the electronic device 1 is in the power-on state, the control module 102 may also set the level of the control pin to be the second level, so as to power on the second card slot module 16, that is, the second card slot module 16 is used as the initial card slot module.
The determining module 103 is configured to determine whether the SIM card is detected within a first preset time after the first card slot module 15 is powered on.
In one embodiment, when the electronic device 1 is powered on and the first card slot module 15 is powered on, the determining module 103 determines whether the SIM card is detected within a first preset time after the first card slot module 15 is powered on. If the SIM card is detected within the first preset time, it indicates that the electronic apparatus 1 may attempt to access the carrier network through the SIM card installed in the first card-slot module 15. If the SIM card is not detected within the first preset time, it indicates that the first card slot module 15 may not have the SIM card installed or cannot read the SIM card installed in the first card slot module 15, and at this time, a card slot module switching operation needs to be performed, so that the electronic device 1 may attempt to access the operator network through the SIM card installed in the second card slot module 16. The first preset time may be set according to an actual requirement, for example, the first preset time is 10 seconds.
The control module 102 is further configured to switch the level of the control pin from a first level to a second level when the SIM card is not detected within the first preset time.
In an embodiment, since the SIM card is not detected within the first preset time, the control module 102 switches the level of the control pin from the first level to the second level, the first card slot module 15 becomes the power-down state, the second card slot module 16 becomes the power-up state, and the electronic device 1 attempts to access the carrier network through the SIM card installed in the second card slot module 16.
In an embodiment, after the electronic device 1 accesses the operator network through an SIM, a network disconnection state (network disconnection occurs) may occur, and at this time, the electronic device 1 may try to switch the card slot module, try to access the operator network through SIM cards installed in other card slot modules, and avoid that the electronic device 1 is always in the network disconnection state. For example, the first card slot module 15 is configured to install a SIM card of a first operator, the second card slot module 16 is configured to install a SIM card of a second operator, and at a certain location, there may be no signal from the first operator and a signal from the second operator, and at this time, if the electronic device 1 selects the SIM card of the first operator to access the operator network, a network disconnection situation may occur, and the electronic device 1 may attempt to select the SIM card of the second operator to access the operator network.
When the electronic device 1 is detected to be offline, the control module 102 is further configured to count a current offline time of the electronic device 1. The time of each offline of the electronic device 1 is not accumulated, i.e. each offline time is counted from zero.
The judging module 103 is further configured to judge whether the current offline time exceeds a second preset time.
In an embodiment, when the current offline time exceeds a second preset time, the electronic device 1 may attempt to switch the card slot module, and attempt to access the carrier network through the SIM card installed in another card slot module. The second preset time may be set according to an actual requirement, for example, the second preset time is 12 seconds.
The control module 102 is further configured to change the level of the control pin when the current offline time exceeds the second preset time.
In an embodiment, if the electronic device 1 is disconnected from the network, the level of the control pin is the first level, that is, the first card slot module 15 is in a power-on state, the electronic device 1 accesses to the operator network through the SIM card installed in the first card slot module 15, and when the disconnection time exceeds the second preset time after the electronic device 1 is disconnected from the network, the control module 102 switches the level of the control pin from the first level to the second level, that is, powers down the first card slot module 15, powers up the second card slot module 16, and the electronic device 1 attempts to access to the operator network through the SIM card installed in the second card slot module 16.
In an embodiment, if the electronic device 1 is disconnected from the network, the level of the control pin is the second level, that is, the second card slot module 16 is in a power-on state, the electronic device 1 accesses to the operator network through the SIM card installed in the second card slot module 16, and when the disconnection time exceeds the second preset time after the electronic device 1 is disconnected from the network, the control module 102 switches the level of the control pin from the second level to the first level, that is, the first card slot module 15 is powered on, the second card slot module 16 is powered off, and the electronic device 1 attempts to access to the operator network through the SIM card installed in the first card slot module 15.
In addition, the invention also provides a double-card switching method.
Fig. 3 is a schematic diagram illustrating an implementation flow of the dual card switching method according to an embodiment of the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 3 may be changed and some steps may be omitted according to different requirements.
In step S300, when a switching instruction for switching the SIM card is received, the level of the control pin is switched from the first level to the second level.
In an embodiment, the switching instruction for switching the SIM card may be generated by a user performing a SIM switching operation on the electronic apparatus 1, such as clicking a SIM switching icon. The user may also inform the electronic apparatus 1 to perform the SIM card switching operation by an AT (command or other network data instruction) assuming that the level of the control pin is a first level before receiving a switching instruction for switching the SIM card, and switching the level of the control pin from the first level to a second level when receiving the switching instruction for switching the SIM card.
Step S302 is to power down the first card slot module 15 and power up the second card slot module 16, so that the electronic device 1 accesses the first operator network through the SIM card installed in the second card slot module 16.
In one embodiment, when the level of the control pin is the second level, powering down the first card slot module 15 and powering up the second card slot module 16 are performed. At this time, the first card slot module 15 is in a power-off state, the second card slot module 16 is in a power-on state, and the electronic device 1 accesses the first operator network through the SIM card installed in the second card slot module 16.
Fig. 4 is a schematic diagram illustrating an implementation flow of the dual card switching method according to an embodiment of the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 4 may be changed and some steps may be omitted according to different requirements.
In step S400, when the electronic apparatus 1 is in the power-on state, the level of the control pin is set to the first level, so as to power on the first card slot module 15.
In an embodiment, when the electronic device 1 is in the power-on state, a card slot module needs to be selected for the electronic device 1 first, and the level of the control pin may be set to the first level, so as to power up the first card slot module 15, that is, the first card slot module 15 is used as an initial card slot module. At this time, the first card slot module 15 is in a power-on state, the second card slot module 16 is in a power-off state, and the electronic device 1 accesses the second operator network through the SIM card installed in the first card slot module 15. In other embodiments, when the electronic apparatus 1 is in the power-on state, the level of the control pin may also be set to the second level, so as to power on the second card slot module 16, that is, the second card slot module 16 is used as an initial card slot module, and the electronic apparatus 1 accesses the second operator network through the SIM card installed in the second card slot module 16.
Step S402, determine whether the SIM card is detected within a first preset time after the first card slot module 15 is powered on.
In an embodiment, after the electronic device 1 is powered on and the first card slot module 15 is powered on, it may be determined whether the SIM card is detected within a first preset time after the first card slot module 15 is powered on. If the SIM card is detected within the first preset time, it indicates that the electronic apparatus 1 can access the carrier network through the SIM card installed in the first card-slot module 15. If the SIM card is not detected within the first preset time, it indicates that the first card slot module 15 may not have the SIM card installed or cannot read the SIM card installed in the first card slot module 15, and at this time, a card slot module switching operation needs to be performed, so that the electronic device 1 may attempt to access the operator network through the SIM card installed in the second card slot module 16. The first preset time may be set according to an actual requirement, for example, the first preset time is 10 seconds.
Step S404, if the SIM card is not detected within the first preset time, switching the level of the control pin from a first level to a second level. Otherwise, the control pin is not switched in level.
In an embodiment, when the SIM card is not detected within the first preset time, which indicates that the first card slot module 15 may not mount the SIM card or cannot read the SIM card mounted in the first card slot module 15, the card slot module switching operation may be performed to switch the level of the control pin from the first level to the second level.
In step S406, the first card slot module 15 is powered off, and the second card slot module 16 is powered on.
In one embodiment, when the level of the control pin is switched from the first level to the second level, the first card slot module 15 is powered down, and the second card slot module 16 is powered up. The first card slot module 15 becomes a power-down state, the second card slot module 16 becomes a power-up state, and the electronic apparatus 1 attempts to access the carrier network through the SIM card installed in the second card slot module 16.
Fig. 5 is a schematic diagram illustrating an implementation flow of the dual card switching method according to an embodiment of the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 5 may be changed and some steps may be omitted according to different requirements.
Step S500, when the electronic device 1 is detected to be offline, counting the current offline time of the electronic device 1.
In an embodiment, the electronic device 1 may be disconnected after accessing the operator network through an SIM, and at this time, the electronic device 1 may attempt to switch the card slot module, and attempt to access the operator network through the SIM cards installed in other card slot modules, so as to prevent the electronic device 1 from being in a disconnected state all the time. For example, the first card slot module 15 is configured to install a SIM card of a first operator, the second card slot module 16 is configured to install a SIM card of a second operator, and at a certain location, there may be no signal from the first operator and a signal from the second operator, and at this time, if the electronic device 1 selects the SIM card of the first operator to access the operator network, a network disconnection situation may occur, and the electronic device 1 may attempt to select the SIM card of the second operator to access the operator network. The time of each offline of the electronic device 1 is not accumulated, i.e. each offline time is counted from zero.
Step S502, judging whether the current offline time exceeds a second preset time.
In an embodiment, the current offline time counted is compared with a second preset time, and when the current offline time exceeds the second preset time, the electronic device 1 may attempt to switch the card slot, and attempt to access the operator network through the SIM card installed in the other card slot module. The second preset time may be set according to an actual requirement, for example, the second preset time is 12 seconds.
Step S504, if the current offline time exceeds the second preset time, changing the level of the control pin.
In an embodiment, if the electronic device 1 is disconnected from the network, the level of the control pin is the first level, that is, the first card slot module 15 is in a power-on state, the electronic device 1 accesses to the operator network through the SIM card installed in the first card slot module 15, and when the disconnection time exceeds the second preset time after the electronic device 1 is disconnected from the network, the level of the control pin may be switched from the first level to the second level, that is, the first card slot module 15 is powered off, the second card slot module 16 is powered on, and the electronic device 1 attempts to access to the operator network through the SIM card installed in the second card slot module 16.
If before electronic device 1 takes place to take off the net, the level of control pin is the second level, and second card slot module 16 is the power-on state promptly, and electronic device 1 inserts the operator network through the SIM card that second card slot module 16 installed, and after electronic device 1 takes place to take off the net and the time of taking off the net exceeded when the second is preset time, can with the level of control pin is switched into first level by the second level, carries out the power-on promptly to first card slot module 15, carries out the outage to second card slot module 16, and electronic device 1 attempts to insert the operator network through the SIM card that first card slot module 15 installed
The dual-card switching device and the dual-card switching method can realize dual-card single-standby function, not only can provide stable network service, but also can realize selection of different card slot modules for power supply only by controlling the level of the GPIO pin, can adopt the original GPIO pin of the electronic equipment, and have the advantages of low cost and low power consumption.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, may carry out the steps of a dual card switching method of:
when a switching instruction for switching the SIM card is received, switching the level of the control pin from a first level to a second level; and
powering down the first card slot module 15 and powering up the second card slot module 16, so that the electronic device 1 accesses the first operator network through the SIM card installed in the second card slot module 16.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A dual card switching method is applied to an electronic device, and is characterized in that the electronic device comprises a control pin, a first card slot module and a second card slot module, and the dual card switching method comprises the following steps:
when a switching instruction for switching the SIM card is received, switching the level of the control pin from a first level to a second level; and
powering off the first card slot module and powering on the second card slot module so that the electronic device is accessed to a first operator network through a SIM card arranged on the second card slot module;
when the level of the control pin is a first level, the first card slot module is in a power-on state, the second card slot module is in a power-off state, and the electronic device is accessed to a second operator network through an SIM card installed on the first card slot module.
2. The dual card switching method of claim 1, wherein the method further comprises:
when the electronic device is in a power-on state, setting the level of the control pin to be the first level so as to power on the first card slot module;
judging whether an SIM card is detected within a first preset time after the first card slot module is powered on;
if the SIM card is not detected within the first preset time, switching the level of the control pin from a first level to a second level;
powering down the first card slot module and powering up the second card slot module.
3. The dual card switching method of claim 1, wherein the method further comprises:
when the electronic device is detected to be offline, counting the current offline time of the electronic device;
judging whether the current offline time exceeds a second preset time or not; and
and if the current offline time exceeds the second preset time, changing the level of the control pin.
4. The dual card switching method of claim 3, wherein said changing the level of the control pin comprises:
if the current level of the control pin is the first level, switching the level of the control pin from the first level to the second level; and
and if the current level of the control pin is the second level, switching the level of the control pin from the second level to the first level.
5. The dual-card switching method according to any one of claims 1 to 4, wherein the control pin is a GPIO pin.
6. The dual-card handover method according to any one of claims 1 to 4, wherein the first operator network and the second operator network are the same operator network, or the first operator network and the second operator network are different operator networks.
7. The dual card switching method according to any one of claims 1 to 4, wherein the first level is a high level, and the second level is a low level; or, the first level is a low level, and the second level is a high level.
8. The utility model provides a double cassette switching device, is applied to among the electron device, its characterized in that, electron device includes control pin, first draw-in groove module and second draw-in groove module, double cassette switching device includes:
the switching module is used for switching the level of the control pin from a first level to a second level when receiving a switching instruction for switching the SIM card; and
the control module is used for powering off the first card slot module and powering on the second card slot module when the level of the control pin is the second level, so that the electronic device is accessed to a first operator network through a SIM card installed on the second card slot module;
the control module is further configured to power down the second card slot module and power up the first card slot module when the level of the control pin is the first level, so that the electronic device accesses a second operator network through a SIM card installed in the first card slot module.
9. An electronic device comprising a first card slot module, a second card slot module, a processor and a memory, wherein the processor comprises a control pin, and the memory stores a plurality of computer programs thereon, wherein the processor is configured to implement the steps of the dual card switching method according to any one of claims 1 to 7 when executing the computer programs stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the dual card switching method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011237767.8A CN112217936A (en) | 2020-11-09 | 2020-11-09 | Dual-card switching method and device, electronic device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011237767.8A CN112217936A (en) | 2020-11-09 | 2020-11-09 | Dual-card switching method and device, electronic device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112217936A true CN112217936A (en) | 2021-01-12 |
Family
ID=74056630
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011237767.8A Pending CN112217936A (en) | 2020-11-09 | 2020-11-09 | Dual-card switching method and device, electronic device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112217936A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101184293A (en) * | 2007-12-13 | 2008-05-21 | 展讯通信(上海)有限公司 | Dual-card intelligent switch method for mobile phone |
CN104683549A (en) * | 2013-11-28 | 2015-06-03 | 上海斐讯数据通信技术有限公司 | Method and system for switching SIM (Subscriber Identity Module) card |
CN105472599A (en) * | 2015-11-11 | 2016-04-06 | 中国联合网络通信集团有限公司 | Method for accessing SIM cards and double-card mobile terminal |
WO2016183916A1 (en) * | 2015-05-20 | 2016-11-24 | 中兴通讯股份有限公司 | Dual card switching method and device |
WO2017166678A1 (en) * | 2016-03-29 | 2017-10-05 | 乐视控股(北京)有限公司 | Method and apparatus for monitoring mobile data usage amount, mobile phone, and electronic device |
CN111050310A (en) * | 2019-11-22 | 2020-04-21 | 深圳市宏电技术股份有限公司 | Network switching method, device, terminal equipment and medium |
-
2020
- 2020-11-09 CN CN202011237767.8A patent/CN112217936A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101184293A (en) * | 2007-12-13 | 2008-05-21 | 展讯通信(上海)有限公司 | Dual-card intelligent switch method for mobile phone |
CN104683549A (en) * | 2013-11-28 | 2015-06-03 | 上海斐讯数据通信技术有限公司 | Method and system for switching SIM (Subscriber Identity Module) card |
WO2016183916A1 (en) * | 2015-05-20 | 2016-11-24 | 中兴通讯股份有限公司 | Dual card switching method and device |
CN105472599A (en) * | 2015-11-11 | 2016-04-06 | 中国联合网络通信集团有限公司 | Method for accessing SIM cards and double-card mobile terminal |
WO2017166678A1 (en) * | 2016-03-29 | 2017-10-05 | 乐视控股(北京)有限公司 | Method and apparatus for monitoring mobile data usage amount, mobile phone, and electronic device |
CN111050310A (en) * | 2019-11-22 | 2020-04-21 | 深圳市宏电技术股份有限公司 | Network switching method, device, terminal equipment and medium |
Non-Patent Citations (2)
Title |
---|
本书编写组 编: "《新型移动电话机原理与维修 上》", 31 May 2000, 成都:西南交通大学出版社 * |
王斌,熊谷辉,曹琳峰编著: "《TMS320C6748 DSP 原理与实践》", 31 August 2018, 北京:北京航空航天大学出版社 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103425506B (en) | Closedown method and starting-up method and communication terminal | |
CN103250144B (en) | The system and method for radio communication is convenient to during the pre-boot phase of calculation element | |
CN105517081B (en) | Method for processing business, device and mobile terminal under a kind of hybrid network standard | |
CN1650265A (en) | System management controller negotiation protocol | |
US8452330B2 (en) | Mobile terminal and method for providing terminal related information in power-off state | |
CN104349304A (en) | Information processing method and electronic equipment | |
CN112947734B (en) | Server power consumption control method, system, terminal and storage medium | |
CN103116801A (en) | Wireless secure digital (SD) card and implementation method of working mode switch thereof | |
CN105357049A (en) | Network communication functional abnormity processing method, application processor and mobile terminal | |
CN106537956B (en) | User identification card control method and mobile terminal | |
CN113242542B (en) | Network searching control method and device of mobile terminal and mobile terminal | |
CN105407461A (en) | Processing method for network communication function abnormality, application processor and mobile terminal | |
CN108712764A (en) | signal interference processing method, device, electronic device and storage medium | |
CN112217936A (en) | Dual-card switching method and device, electronic device and computer readable storage medium | |
CN117331423A (en) | Power supply method and device of PCIE equipment, storage medium and electronic device | |
KR101572060B1 (en) | Apparatus and method for power saving using predictive polling in portable terminal | |
CN109996319B (en) | Beacon signal processing device | |
CN114189471B (en) | Cross-equipment link aggregation group active-standby configuration method, system, terminal and storage medium | |
CN105376775A (en) | Processing method of network communication function abnormity, application processor and mobile terminal | |
CN112290639B (en) | Interface circuit and electronic equipment charge | |
CN111918317B (en) | AP control method and device, wireless controller and storage medium | |
CN111132097B (en) | Wireless module driving method and device, wireless module, terminal and storage medium | |
CN110177364B (en) | Bluetooth device pairing connection method and device, storage medium and electronic device | |
CN109857469B (en) | Display screen control method and related product | |
CN107708188B (en) | Method for reducing power consumption, mobile terminal and device with storage function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210112 |