Summary of the invention
The present invention is for overcoming existing in prior technology technical problem and functional limitation, and the technical problem to be solved in the present invention provides a kind of double card double standby mobile phone and SIM card initial method thereof, can realize the standby simultaneously of two SIM card, does not increase the GSM communication module again.
For solving the problems of the technologies described above, technical scheme of the present invention is:
A kind of double card double standby mobile phone uses a cover GSM communicating circuit, antenna, a single memory, two to overlap SIM card interface circuit and analog switches, and other control circuits of cover,
Described GSM communicating circuit comprises radio circuit and baseband processor, described radio circuit comprises rf chip, radio-frequency power amplifier and duplexer, wherein this duplexer is integrated in the front-end module, and described baseband processor comprises GSM signal processor and general-purpose built-in type CPU
Described antenna is connected in turn with radio circuit, baseband processor; Described antenna is to be connected by impedance line with the front-end module of described radio circuit, this radiofrequency signal that impedance line transmission is accepted from the space or mobile phone is launched; It still is that the frequency range of sending mode and transmission is controlled that the radiofrequency signal that described front-end module adopts the impedance line transmission to accept to described rf chip, this front-end module control signal by control line is in receiving mode to mobile phone; Signal after carrying out in described rf chip inside will handling after the conversion of signal transfers to described general-purpose built-in type CPU by the I/O line; This general-purpose built-in type CPU carries out transfer of data by data/address bus and described GSM signal processor;
Described memory directly adopts the address to be connected with data/address bus with described general-purpose built-in type CPU, with transmission signals;
Described general-purpose built-in type CPU links to each other by described analog switch with described SIM card, and this analog switch switches to two-way with clock and the data-signal that this general-purpose built-in type CPU spreads out of, and offers described two SIM card respectively;
Described general-purpose built-in type CPU reads the keyboard operation situation by the raw column data that keyboard interface picks out,
Described general-purpose built-in type CPU links to each other with described voicefrequency circuit by differential data line;
Motor links to each other with described general-purpose built-in type CPU by conventional data input/output interface GPIO.
Described baseband processor adopts the SPREADTRUM 6600D chip of spreadtrum company.
Described rf chip adopts the SI 4210 of Silicon Labs Cp Inc., and described radio-frequency power amplifier adopts the SI 4300 of Silicon Labs Cp Inc..
Described memory adopts memory to adopt the NOR+SRAM FLASH of Samsung.
Described GSM signal processor adopts the PM+VC0529 of Vimicro company.
Described other control circuit comprises the T-flash card, links to each other by a spi bus data transmission interface between this T-flash card and the described general-purpose built-in type CPU.
Described other control circuit comprises the I/O interface circuit, this I/O interface circuit and the audio signal wire that comprises USB differential data line and earphone being connected of described general-purpose built-in type CPU.
Described LCD interface circuit comprises LCD MODULE, camera, and described GSM signal processor and this camera and LCD MODULE are all by the data/address bus transmission signals.
Described described other control circuit comprises power module, keyboard, voicefrequency circuit and LCD interface circuit.
A kind of SIM card initial method of above-mentioned double card double standby mobile phone comprises the following steps:
Step (1) start that powers on;
Step (2) application layer module reads the current standby mode information that the mobile phone fixed memory device is preserved;
(3) three kinds of user models of step are judged, if step 6 is changeed in the single standby of SIM1; If step 5 is changeed in the single standby of SIM2; If step 4 is changeed in the two standbies of SIM1 and SIM2;
Step (4) application layer module starts SIM1 protocol stack and SIM2 protocol stack;
Step (4.1) enters double-card dual-standby standby mode start flow process;
Step (4.2) is if receive SIM1 and the card state notifying of SIM2, simultaneously setting up procedure 5.2 and step 6.2; If not, repeating step 4.2 is waited for up to the card state notifying of receiving SIM1 and SIM2;
Step (5) application layer module starts the SIM2 protocol stack;
Step (5.1) enters single standby start flow process among the SIM2;
Step (5.2) protocol layer module judges whether SIM2 card state enables, if change step 5.4; If not, change step 5.3;
Step (5.3) prompting please be inserted the SIM2 card, changes step 7;
The data of preserving among the SIM2 task module initialization SIM2 of step (5.4) SIM card management level;
Step (6) application layer module starts the SIM1 protocol stack;
Step (6.1) enters single standby start flow process among the SIM1;
Step (6.2) protocol layer module judges whether SIM1 card state enables, if change step 6.4; If not, change step 6.3;
Step (6.3) prompting please be inserted the SIM1 card, changes step 7;
The data of preserving among the SIM1 task module initialization SIM1 of step (6.4) SIM card management level;
Step (7) finishes.
Compared with prior art, the invention has the beneficial effects as follows:
By the synchronous matching design of software and hardware, this GSM mobile termination can be supported two SIM card simultaneously having only under the independent GSM communication module, and two SIM standbies simultaneously.And this double card double standby mobile phone does not increase the GSM communication module, and does not increase new antenna, thereby less mobile phone volume is arranged, and has reduced the mobile phone cost.
Embodiment
Specific embodiments of the present invention are further described in detail below in conjunction with drawings and Examples, but should not limit protection scope of the present invention with this.
The present invention needs hardware designs and software design to cooperate synchronously, and the present invention will be described from the angle of hardware and software below.
See also Fig. 1 and hardware platform of the present invention shown in Figure 3.Use a cover GSM communicating circuit, antenna, a single memory, two to overlap the SIM card interface circuits on the mobile phone hardware of the present invention, and other control circuits of cover.The function of each several part is as follows:
Described GSM communicating circuit comprises radio circuit and baseband processor.
Baseband processor: comprise GSM signal processor and general-purpose built-in type CPU.Described baseband processor BBIC adopts the SPREADTRUM 6600D chip of spreadtrum company.This GSM signal processor is digital signal processing chip (Digital Signal Processing is hereinafter to be referred as DSP), selects the PM+VC0529 of Vimicro company for use.
The function that the GSM signal processor is finished:
Encoding and decoding speech is finished the conversion between voice signal and the digital signal;
Information encoding-decoding improves the error that is caused by noise and interference in the transmission course, improves system reliability;
The signal modulation and demodulation is finished the conversion between digital signal and the analog signal;
Adaptive equalization: the interference the when time delay that solution is caused by multipath fading is expanded the high-speed transfer that causes between code element.
Embedded type CPU:
Finish all Control work, comprise communication flow processing, mobile phone interface processing, attachment management etc.
Radio circuit: mainly comprise rf chip and radio-frequency power amplifier, duplexer etc., finish the modulation and demodulation between baseband signal and the radiofrequency signal.Wherein this duplexer is integrated among the front-end module FEM, and this front-end module also has some match circuits.Described rf chip adopts the SI 4210 of Silicon Labs Cp Inc., and described radio-frequency power amplifier adopts the SI 4300 of Silicon Labs Cp Inc..
Memory: comprise flash memory FLASH, deposit the cell phone software resource and the program running space is provided.When needs improved program operation speed, this memory also can also comprise RAM.This memory adopts the NOR+SRAM FLASH of Samsung.
Analog switch:, therefore need analog switch to switch because baseband chip only provides a SIM card interface.
Other control circuit: comprise power module, voicefrequency circuit, keyboard, I/O interface circuit and LCD (LCD) interface circuit etc.This power module comprises part and the power management module that cellular phone power supplies is provided.The LCD interface circuit comprises LCD MODULE and camera.
See also Fig. 5.Fig. 5 is hardware annexation figure of the present invention.Described antenna is connected in turn with radio circuit, baseband processor.
Described antenna ANT is connected by impedance line with pin sequence number 1 ANT of the front-end module FEM of described radio circuit, this radiofrequency signal that impedance line transmission is accepted from the space or mobile phone is launched.
The radiofrequency signal that the pin sequence number 28 of described front-end module FEM adopts the impedance lines transmission to accept to the pin sequence number 29 of described rf chip (hereinafter to be referred as Transceiver), it still is that the frequency range of sending mode and transmission is controlled that the control signal of this front-end module FEM by control line is in receiving mode to mobile phone.This pin sequence number 28 is receiving terminal DCS/RX, the GSM850/GSM900/RX of duplexer, connects transceiver Tranceiver behind radio-frequency filter RF Filter; Pin sequence number 29 goes up signaling interface RFIDP, RFIDN, RFIEP, the RFIEN of the output of reception antenna switch for Tranceiver, and this is four differential lines of radio frequency transmission.
Signal after carrying out in Transceiver inside will handling after the conversion of signal transfers to general-purpose built-in type CPU by 4 I/O lines, be baseband chip (Base Band, hereinafter to be referred as BB), the pin sequence number 6 of Transceiver and the pin sequence number 7 of BB link to each other, sequence number 6 is BQN, BQP, BIN, BIP, transmits four IQ line RX/TXQN, RX/TXQP, RX/TXIN, RX/TXIP.Sequence number 7 is RX/TXIN, RX/TXIP, RX/TXQP, RX/TQN, is the BB interface of four IQ line RX/TXQN, RX/TXQP, RX/TXIN, RX/TXIP.Wherein BQN, BQP, BIN, BIP are the pin label on the baseband chip, link to each other with pin label RX/TXIN, RX/TXIP, RX/TXQP, RX/TQN on the baseband chip.Wherein IQ quadratures synchronously, in-phasequadrature.
The pin sequence number 15 of BB is carried out transfer of data by the pin sequence number 23 of data/address bus and DSP.15 are the last data bus interface EMD0 ~ EMD15 that connects DSP of BB.23 are last data bus interface CPU_DO ~ CPU_D7 and the CPU_ADDRO ~ CPU_ADDR7 that connects BB of DSP.
Described memory has been done compatibility, promptly can adopt another memory, mainly is in order to prevent short supply.Its pin sequence number 16 directly adopts the address to be connected with data/address bus with the pin sequence number 8 of BB, with transmission signals.Pin sequence number 8 is 16 data/address bus D[00:15] interface, EMD0~EMD15.Pin sequence number 16 is 16 data/address bus D[00:15] interface, DQ0~DQ15.
The pin sequence number 10 of BB links to each other with the analog switch that passes through of SIM card interface circuit pin sequence number 18, and this analog switch switches to two-way with clock and the data-signal that BB spreads out of, and offers described two SIM card respectively.Pin sequence number 18 is an IO interface on the SIM card.Pin sequence number 10 goes up SIMDA0 with SIM card transmission data for BB, is connected with SIM card after passing through analog switch.This SIMDA0 is the pin label on the baseband chip.
BB reads the keyboard operation situation by the raw column data that keyboard interface picks out, and pin sequence number 13 goes up data-interface KEYOUTO ~ KEYOUT5 and the KEYIN0 ~ KEYIN3 that connects keyboard for BB.21 is the interface of keyboard.
Described other control circuit comprises the I/O interface circuit, this external interface with comprise two USB differential data line of DM, DP being connected of BB, use during download, and the microphone MIC of earphone and receiver Receiver audio signal wire.
19 is 13 on the 18PIN, 11PIN, and the reception of Receiver and Mic sends signal on the transmission earphone.The data connector of this 18PIN for adopting, 11,13 two central pins transmit receiver and Mike's signal.11 is pin U0RXD0, the U0TXD0 on the BB.
12 for BB goes up data transmission interface with receiver SPEAKER, i.e. pin EARP, EARN/HEAD-L are through audio frequency power amplifier driving Speaker; This 12 pin sequence number also connects pin AUXSPN/HEAD_R, the AUXSPP on the Receiver, and connects pin MICP, MICN on the Mic.
20 is IN+, the IN-of audio frequency power amplifier, drives 1 on Speaker and the Receiver, 2pin from VO+, VO-output after amplifying, and 1 on the Mic, 2pin.
Described other control circuit comprises the I/O interface circuit, this external interface with comprise two USB differential data line of DM, DP of downloading usefulness being connected of BB, and the microphone MIC of earphone and receiver Receiver audio signal wire.
BB is by two pairs of differential data line received audio signals of the transmission of the MIC on mobile phone and the earphone respectively, through driving five SPEAKER through three audio frequency power amplifiers respectively, and transmits data by a pair of differential lines to Receiver by a pair of differential lines.Wherein three parts that audio frequency power amplifier is a voicefrequency circuit are one of them chips.
Motor Motor links to each other with described general-purpose built-in type CPU by conventional data input/output interface GPIO.Pin sequence number 14 goes up the MTCK0 interface that connects MOTOR for BB.Pin sequence number 22 connects Motor through triode, diode.Described MTCK0 is the pin label on the BB, links to each other with motor.
Described other control circuit comprises the T-flash card, links to each other by a peripheral serial line interface (SPI) between this T-flash card and the BB.Pin sequence number 9 is the data-interface PA4/BOOT and the U2RXD of spi bus BB end.17 data-interface CMD and DAT0 for spi bus BB end.Described PA4/BOOT and U2RXD are the pin labels on the BB, are responsible for and the T-FLASH transmission signals; Described CMD and DAT0 are the pin labels on the FLASH, link to each other by spi bus with U2RXD with PA4/BOOT.
Described LCD interface circuit comprises LCD MODULE (LCD Module is hereinafter to be referred as LCM), camera, and BB and this camera and LCD MODULE are all by the data/address bus transmission signals.Pin sequence number 24 goes up the data bus interface CS_D0~CS_D7 that connects front camera and rear camera for DSP.Pin sequence number 25 goes up the data bus interface LCD_D0~LCD_D15 that connects LCM for DSP.Pin sequence number 26 is 19,21,22,20 of a back camera, 18,16,14, the flexible printed circuit board of 12pin and preposition camera (Flexible Printed Circuit, abbreviation FPC) Y0~Y7 on, this Y0~Y7 is the pin label on the FPC, data are from these several pins transmission.Pin sequence number 27 connects the pin DB1_DB17 on the FPC for the data bus interface that DSP connects LCM through four electromagnetic interference (Electromagnetic Interference is called for short EMI) filter.
Pin sequence number 2 is DCS/TX among the figure, GSM850/GSM900/TX.Pin sequence number 3 is RFOH, RFOL.Pin sequence number 4 is RFIH, RFIL.Pin sequence number 5 is RFOH, RFOL.Described DCS/TX is the output pin of digital communication system on the switch (Digital Communication System is called for short DCS) frequency range, and GSM850/GSM900/TX is the input pin of GSM frequency range on the switch.RFOH is the output pin of DCS on the power amplifier, and RFOL is the output pin of GSM end on the power amplifier.DCS/TX and RFOH, GSM850/GSM900/TX and RFOL link together by the radio-frequency (RF) impedance line.
More than be hardware components of the present invention, introduce software below and realize part.
See also Fig. 2 and Fig. 4, the function of each several part is as follows in the software frame:
Agreement ground floor Layer1: provide the interface between chip and high layer software, directly control chip.
Agreement second layer Layer2: finish transfer of data and flow control.
RRM (Radio Resources is called for short RR): finish RRM.
Task management module (Mobility Management is called for short MM): finish mobile phone identification and mobile management.
Call out control (Call control is called for short CC): the management relevant with handset call.
SMS: short message service management.
Supplementary service (Sup.Services is called for short SS): the supplementary service management, as calling transfer, number demonstration etc.
Because all GSM mobile handset must be observed the GSM international standard protocol that the European Telecommunication Standard committee (ETSI) formulates.And this agreement is only considered the mode of mobile phone one SIM card when working out, and therefore, support two SIM cards simultaneously online, and the present invention need do following change design:
1, network selecting: because of GSM is a global system for mobile telecommunications network, mobile phone can be in different countries, free-roaming between the different operators, therefore, after the mobile phone power-on, at first to select a suitable GSM network to carry out resident and accept the miscellaneous service that network provides.
In order to realize double-card dual-standby, two SIM cards all must be selected network and resident simultaneously, accept the network information separately.
2, cell selecting
Mobile phone is finished after the network selecting, just need to seek all Broadcast Control Channel (Broadcast Control Channel that network allows, below adhere to BCCH) frequency, and select one only carry out resident, cell selecting is in order to allow mobile phone under current network, select an only Serving cell, and, carry out communication by this sub-district and other people the main Serving cell of this sub-district as oneself.
According to two SIM card operator situations, be divided into two kinds of situations:
A two SIM cards belong to same operator, can only search and select one time BCCH, and two cards are all resident in same sub-district.But if the sub-district does not allow second SIM resident, can select to switch to adjacent cells simultaneously, or two resident different districts of card difference, switch to optimum subdistrict proper time more simultaneously.
Two SIM of B belong to different operators respectively, then need independently to finish respectively cell selecting and resident.
3, sub-district gravity treatment: the sub-district gravity treatment is that mobile phone is under idle pulley, because the process of reselecting Serving cell that factors such as signal variation cause is moved in the position.
According to two SIM operator situations, be divided into two kinds of situations:
A two SIM cards belong to same operator, can finish neighbor cell measurement work by any SIM card, and an other SIM shares measurement data.If need gravity treatment, handed over service sub-district jointly then, if the temporary transient SIM card of admitting in new sub-district, an other SIM then initiates the sub-district switching at the appropriate time once more.
Two SIM of B belong to different operators respectively, then need independently to finish respectively sub-district gravity treatment work
4, location area updating
When mobile phone moves to another lane place from a lane place, at this moment, mobile phone finds that the lane place identification code (LAI, Location Area Identity) in its memory changes, and need set up new registration procedure to network.
According to two SIM operator situations, be divided into two kinds of situations:
A two SIM cards belong to same operator, can finish surveying work by any SIM card, and an other SIM card is shared measurement data.If need location area updating, then can switch jointly.
B two SIM cards belong to different operators respectively, because the definition of the lane place of two networks is different, location area updating will independently be finished.
In addition, upgrade,, all have and independently finish network and set up new registration procedure work no matter be the SIM card of same operator or the SIM card of different operators by the periodical location area of cell parameter T3212 definition.Cell parameter T3212 is that the period position in the gsm wireless parameter upgrades timer.The occurrence positions reason for renewing mainly contains two classes in the gsm system, a kind of is that travelling carriage finds that the lane place at its place changes, another kind is that network regulation travelling carriage carries out the position renewal periodically, the frequency that period position upgrades is by network control, and Cycle Length is then determined by parameter T3212.
5, caller
When sticking into capable normal call for one, an other card is in resting state.Finish in case call out, the dormancy card begins to look for again the net flow process.If the netting twine state does not change, then do not do any operation; If network state changes (moving signal drift, efflux etc.)) then need gravity treatment, switch or registration.
6, called
Two cards all need monitors (PCH, Paging Channel), according to two SIM card operator situations, are divided into two kinds of situations:
A two SIM cards belong to same operator, owing to can monitor same BCCH, therefore, only need directly monitor corresponding paging window according to the IMSI calculated case.
International mobile subscriber identity (international mobile subscriberidentity is called for short IMSI) is to be number that the mobile subscriber distributed of unique identification in the world, all has so globally unique mark number in every SIM card.
Two SIM of B belong to different operators respectively, need monitor two BCCH channels respectively.If the paging window can stagger, then accept paging information separately respectively; If the paging window is just consistent, then wherein a SIM card will start cell re-selection procedure, up to the paging window stagger and signal good.If condition of appeal can not satisfy, then adopt the ping-pong procedure timesharing to receive.
7: short message
The short message data amount is less, and real-time is less demanding, so two kinds of SIM independently finish.
Key problem in the above-mentioned software design is management two SIM cards.Three kinds of patterns of software aspect control standby.Between two SIM cards, switch by an analog switch at hardware aspect.
See also Fig. 6.Fig. 6 is the SIM card initialization flowchart of double-card dual-standby start of the present invention.
The SIM card initial method of double card double standby mobile phone of the present invention comprises the following steps:
Step (1) start that powers on;
Step (2) application layer module reads the current standby mode information that the mobile phone fixed memory device is preserved,
Described mobile phone fixed memory device can be a mobile phone FLASH etc.
(3) three kinds of user models of step are judged, if step 6 is changeed in the single standby of SIM1; If step 5 is changeed in the single standby of SIM2; If step 4 is changeed in the two standbies of SIM1 and SIM2;
Step (4) application layer module starts SIM1 protocol stack and SIM2 protocol stack;
Step (4.1) enters double-card dual-standby standby mode start flow process;
Step (4.2) is if receive SIM1 and the card state notifying of SIM2, simultaneously setting up procedure 5.2 and step 6.2; If not, repeating step 4.2 is waited for up to the card state notifying of receiving SIM1 and SIM2;
Step (5) application layer module starts the SIM2 protocol stack;
Step (5.1) enters single standby start flow process among the SIM2;
Step (5.2) protocol layer module judges whether SIM2 card state enables, if change step 5.4; If not, change step 5.3;
Step (5.3) prompting please be inserted the SIM2 card, changes step 7;
The data of preserving among the SIM2 task module initialization SIM2 of step (5.4) SIM card management level;
Step (6) application layer module starts the SIM1 protocol stack;
Step (6.1) enters single standby start flow process among the SIM1;
Step (6.2) protocol layer module judges whether SIM1 card state enables, if change step 6.4; If not, change step 6.3;
Step (6.3) prompting please be inserted the SIM1 card, changes step 7;
The data of preserving among the SIM1 task module initialization SIM1 of step (6.4) SIM card management level;
Step (7) finishes.
See also Fig. 7.Fig. 7 is a double-card dual-standby SIM card management flow chart of the present invention.Applicaton Layer: i.e. application layer, finish man-machine interaction.Realized the demonstration and the management of the information that reads in SIM1 card and the SIM2 card are comprised phone directory, short message, message registration, operator's informaiton etc.The startup of protocol stack also is to finish in opening initialization in application layer.
During the opening initialization application layer, control two SIM1 task and the dynamic creation of SIM2 task and corresponding initialization process of protocol layer that card is corresponding by the current standby mode information of preserving in the visit mobile phone fixed memory device.
Protocol Layer: protocol layer comprises the protocol interface layer.Offer the interface of application layer visit SIM1 and SIM2 card protocol layer on this course, handle the request of application layer visit SIM1 and SIM2; By transmitting SIM1 information and the data relevant with SIM2 to application layer transmitting system message.The access interface that provides by the SIM card management level visits SIM1 and SIM2 downwards, obtains corresponding information and data.
Protocol layer is finished the coding to the application layer request message, and the message content that the SIM card management level send over is decoded, and will pass to application layer by signal behind decoded data and the finish message.
Protocol layer is also finished the switching and the control of SIM1 and SIM2 state.
SIM Manager Layer:SIM card management level mainly drive (being driver) by SIM1 task, SIM2 task and SIM and form.During protocol layer desire visit SIM1 card, send signal to the SIM1 task, request visit SIM1 card, the SIM1 task is controlled the information of reading and writing in the SIM1 card by SIM driver after receiving request signal; When the protocol layer desire is visited the SIM2 card equally, send signal to the SIM2 task, request visit SIM2 card, the SIM2 task is controlled the information of reading and writing in the SIM2 card by SIM driver after receiving request signal.
Card of SIM1 shown in Fig. 7 and SIM2 card are represented two cards physically respectively: SIM card 1 and SIM card 2.
After powering on, when the application layer initialization, start or close SIM1 and SIM2 corresponding protocol stack by reading current standby mode that the mobile phone fixed memory device preserves.With the double-card dual-standby pattern is example: can create SIM1 task and SIM2 task when starting protocol stack, after creating SIM1 task and SIM2 task, protocol layer can send the request of initialization SIM card for respectively SIM1 task and SIM2 task, SIM1 task and SIM2 task read data among SIM1 and the SIM2 by control SIM driver after receiving initialization request, and report state and the data message of SIM1 and SIM2 to protocol layer, protocol layer is after the state of receiving SIM1 and SIM2 and data message, data message is resolved, and according to the state that obtains to application layer reporting system message informing application layer SIM1 and SIM2 state; The different message that application layer is sent according to protocol layer is initiated to send out request to protocol layer and read data such as short message, phone directory, message registration with the relevant application initializes of SIM card.
In sum, the present invention realizes a kind of new GSM communicating terminal, and this portable terminal has only an independent GSM communication module, but supports two SIM card simultaneously, and two SIM card standbies simultaneously.
The above is preferred embodiment of the present invention only, is not to be used for limiting practical range of the present invention.Be that all equivalences of doing according to the content of the present patent application claim change and modification, all should be technology category of the present invention.