A kind of wireless communication module is the method for identification automatically
Technical field
The present invention relates to the module recognition technology, be meant a kind of implementation method that the radio communication mold block type is discerned automatically especially.
Background technology
The develop rapidly of mobile communication technology is that mobile terminal device has brought huge development space, particularly mobile phone to become new consumption hotspot especially, and mobile phone market also becomes the focus that domestic and international large manufacturer competitively fights for.And the production of mobile phone exploitation is also developed gradually and two kinds of schemes:
A kind of solution that is based on chipset, this is the solution of conventional mobile phone exploitation, its feature is to form form to show as the integrated of software, hardware and structure, there are a lot of drawbacks in this form, such as: a mobile phone producer must take into account numerous technique directions and technological reserve simultaneously, the construction cycle index is risen, the industry characteristics short, flat, fast with mobile phone products misfit, make the user carry out autonomous selection and combination, make the higher and difficulty increasing of personalized cost communication, digital service, structural design.
Second kind is the solution of mobile moduleization, and modular mobile phone mainly is made up of wireless module and application end, and both are separate on software and hardware, even shows as physically and be separated from each other, and that is to say that mobile phone is separated from each other from software, hardware, structure.As shown in Figure 1, mobile phone separates with wireless communication module, is undertaken mutual by the AT order between mobile phone and the wireless communication module.Because this scheme has been avoided the shortcoming of conventional mobile phone preferably, thereby on market, obtain gradually paying attention to and approval, and in the industry cycle show up prominently.The progressively standardization of the interface of modular mobile phone can be finished the production and the exploitation of relevant portion respectively by producers at different levels, form good product ecological chain.In addition, modular arrangement can be simplified the threshold of going into of mobile phone producer, changes the mobile phone industrial pattern, make the user to communication, digital service, structure independently be combined into possibility, and reduce the cost and the difficulty of personalization.
The concrete hardware of modular mobile phone shown in Figure 1 is formed structure as shown in Figure 2, connector 201,211 by unified standard between wireless communication module 200 and the mobile phone 210 interconnects, multiple signal is provided between the connector 201 and 211, comprises: the power supply signal that mobile phone 210 provides to module (Power Supply), various additional control signals (System Ctrl) are provided, standard serial communication (UART) and audio signal (Audio) or the like are provided.So, included battery 212, microcontroller (MCU) 213 and the microphone (SPK﹠amp in mobile phone 210 inside; MIC) 214 just can to carry out signal by connector 201,211 and wireless communication module 200 mutual, or for wireless communication module 200 provides necessary signal, as: power supply signal.
The software architecture of modular mobile phone comprises in the wireless communication module 200 as shown in Figure 3: software modules such as interface drive program 301, CSD agreement 302, AT command interpreter 303, ppp protocol 304, IP relaying 305, GSM/GPRS protocol stack 306, physical layer 307; Corresponding with wireless communication module, comprise in the mobile phone 210: software modules such as AT command handling procedure 311, IP application program 312, ICP/IP protocol 313, ppp protocol 314, interface drive program 315.On software, wireless communication module and mobile phone externally provide the AT command interface of standard, as: the various interface standard that ETSI organizes to set up, this interface specification can be used for the wireless protocols interface of GSM, CDMA and 3G (Third Generation) Moblie.Wherein, the GSM/GPRS protocol stack in the wireless communication module can be realized the voice communications versus data communications function that moves, but man-machine interface and application program are in the mobile phone side; Contain the radio system of supporting mobile communication, the MCU and the corresponding baseband system of supporting protocol stack running software in the wireless communication module, and there is MCU and the base band ancillary equipment of supporting the application software operation in the mobile phone side, as LCD, keyboard, battery, SPK﹠amp; Therefore MIC etc., need mutual co-ordination between mobile phone and the wireless communication module.
When transmission command, the communication application program of mobile phone side and if network interaction, at first corresponding message is encapsulated as AT order by AT command processor 311, send by interface drive program 315 again.In the wireless communication module side, this module transfers actual protocol message to through AT command interpreter 303 and sends to protocol stack 306 after receiving the AT order by interface drive program 301.When transmission during data, data flow drives directly in mobile phone side and wireless communication module side transparent transmission by interface, and without the processing of AT interpretation layer, the user can select CSD or GPRS to carry out the transmission of data.Wherein, the AT order is transmitted on serial ports as data, meet RS232 serial communication interface standard, the communication application program of mobile phone side only needs to write corresponding AT command interpretation module by the standard AT command collection, can use wireless communication module to finish all functions of mobile communication.
Wireless communication module in the such scheme can adopt global system for mobile communications (GSM) module, GPRS (GPRS) module, code division multiple access (CDMA) module of second generation mobile communication technology, also can adopt the Wideband Code Division Multiple Access (WCDMA) (WCDMA), TD SDMA (TD-SCDMA) module etc. of 3G (Third Generation) Moblie technology even more.Using for mobile phone development and user, modularized design all becomes relative simple and convenient, for the mobile phone development person, only need to pay close attention to the exploitation of application end software and, can easily change another kind of standard over to from a kind of mobile communication standard to the renewal of module interface; And for the user, only need various wireless communication modules are connected on oneself the mobile phone and can use.
But, at present because all kinds of wireless communication modules that each manufacturer provided do not have unified device identification, can't discern different classes of wireless communication module automatically for same mobile phone, so, make the user can not change different wireless communication modules arbitrarily, even the user has changed the wireless communication module of current needs on hardware configuration, owing to can not discern, the same can not the realization communicated by letter, and brings a lot of inconvenience to the user.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of wireless communication module method of identification automatically, can discern different classes of wireless communication module automatically, thereby make things convenient for the user to change required wireless communication module at any time on same portable terminal.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of wireless communication module is the method for identification automatically, and this method may further comprise the steps:
A. after portable terminal inserted the wireless communication module start, mobile terminal side sent synchronization request to the wireless communication module of current insertion earlier, and the wireless communication module of current insertion returns confirmation after receiving this request;
B. after mobile terminal side was received affirmation, again to the wireless communication module transmitting apparatus identity request of current insertion, the wireless communication module of current insertion was received the EIC equipment identification code that returns self after this request;
C. mobile terminal side is determined the type of the wireless communication module of current insertion according to the EIC equipment identification code of being received.
Wherein, described EIC equipment identification code comprises type codes and device code two parts.Then step c determines that the radio communication mold block type further comprises: mobile terminal side extracts the type codes in the EIC equipment identification code, judge according to the type sign indicating number whether self supports the wireless communication module of current insertion, if support, then discern successfully, mobile terminal side is determined the type of the wireless communication module of current insertion according to the value of the type sign indicating number; If do not support, recognition failures then.Accordingly, this method further comprises: after mobile terminal side was successfully discerned the radio communication mold block type of current insertion according to EIC equipment identification code, the wireless communication module of the current insertion of portable terminal side direction sent the successful acknowledge message of identification; The wireless communication module of current insertion returns confirmation after receiving the recognition and verification that mobile terminal side sends.
In the such scheme, further comprise after the step c: portable terminal start self with step c the corresponding AT Command Set explanation module of definite type, communicate with the wireless communication module of current insertion.
In the such scheme, the wireless communication module of described current insertion is gsm module or GPRS module or CDMA module or WCDMA module or TD-SCDMA module.
Wireless communication module automatic identifying method provided by the present invention, when portable terminal and wireless communication module are shaken hands, increase the reciprocal process that a portable terminal obtains the wireless communication module EIC equipment identification code, and, portable terminal is judged the type of the wireless communication module of current insertion according to the type codes in the EIC equipment identification code that is obtained, so, can automatically identify wireless communication module, and then be connected and operate as normal with current mobile network with different systems mobile communication function.Like this, same portable terminal just can connect different wireless communication modules, so, the user can use same portable terminal and a plurality of wireless communication module and switch in various wireless networks freely, such as: GSM mobile handset can be the CDMA mobile phone also simultaneously, thereby makes the communication in wireless networks at different systems become free and relaxed.
Description of drawings
Fig. 1 is the isolating construction schematic diagram of modular mobile phone;
Fig. 2 is that the concrete hardware of modular mobile phone is formed structural representation;
Fig. 3 is that the concrete software of modular mobile phone is formed structural representation;
The realization flow figure that Fig. 4 discerns automatically for the present invention;
The signaling process figure that Fig. 5 discerns automatically for the present invention.
Embodiment
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments, in following explanation, is that mobile phone is an example with portable terminal all.
As shown in Figure 2, the interface that has unified standard between mobile phone and the wireless communication module, based on this prerequisite, can realize basic information interaction between wireless communication module and the mobile phone, so, just can utilize the identifying of shaking hands between wireless communication module and the mobile phone to finish the automatic identification of wireless module.
As shown in Figure 4, behind the mobile phone power-on, at first the serial ports to self carries out initialization; Then, serial line interface and the interface drive program of software and wireless communication module the shake hands identification of main frame by hardware; If shake hands successfully, it is the classification that handset identity goes out the wireless communication module of current insertion, just can be according to the classification of current wireless communication module, start mobile phone side corresponding application, such as: identifying the current wireless communication module is gsm module, then starts mobile phone side and gsm communication to corresponding application program.Afterwards, corresponding AT Command Set of mobile phone utilization and current wireless communication module communicate, and mobile phone enters normal operating state.
The process of finishing automatic identification by handshake procedure between wireless communication module and the mobile phone specifically may further comprise the steps as shown in Figure 5:
Whether step 501: behind the mobile phone power-on, the mobile phone side sends synchronization request to the wireless communication module of current insertion earlier, correctly connect to confirm wireless communication module.
Step 502: after wireless communication module is received this synchronization request, return confirmation signal, correctly connect to represent self to the mobile phone side.Because if can not correctly connect, wireless communication module is normally to receive signal that mobile phone is sent.
Step 503: after the mobile phone side is received the affirmation that wireless communication module sends, know that this wireless communication module normally connects, then again to current wireless communication module transmitting apparatus identity request, purpose is in order to obtain the identification information of current wireless communication module, with classification under the judgement current wireless communication module.
Step 504: after the current wireless communication module is received request, return the EIC equipment identification code of self to mobile phone.
Step 505: after mobile phone is received EIC equipment identification code, the current EIC equipment identification code that obtains is verified, to confirm its validity, judge the classification of current wireless communication module simultaneously according to EIC equipment identification code, in case checking is discerned successfully, mobile phone will send the successful acknowledge message of identification to the current wireless communication module, show that mobile phone correctly discerns the current wireless communication module.
Here, described checking validity is meant: whether checking the type sign indicating number belongs to the radio communication mold block type of self supporting, the type sign indicating number and the radio communication mold block type of self supporting can be mated, if on the coupling, promptly have consistent, illustrate that the type codes in the current device identification code is effective, simultaneously can know type under the current wireless communication module according to matching result.If unmatch, illustrate that then current phone do not support such wireless communication module.
Step 506: after the current wireless communication module is received recognition and verification, return confirmation signal equally, to confirm the knowing handset identity success, so far the automatic identifying of wireless communication module is finished.
In said process, described EIC equipment identification code is the Serial No. of a certain wireless communication module of unique identification, and it is made up of two parts: type codes and device code, as shown in Table 1.
Table one wherein, type codes is used to identify the type of current wireless communication module, such as: be gsm module, GPRS module, CDMA module, WCDMA module or TD-SCDMA module etc.; Device code is the random device sequence number that the type wireless communication module is distributed in expression.
Illustrate that with an instantiation certain user has GSM and two kinds of wireless communication modules of CDMA, the user can change corresponding module at any time according to the network condition or the hobby of oneself of there and then.In the present embodiment, the type of supposing gsm module is 01, the CDMA type of module is 02, supposes that this user enters cdma network from the GSM network, then this user at first shuts down, and gsm module is replaced by the CDMA module, then start, so, the concrete identification process after the start is like this:
1) mobile phone sends synchronization request to the CDMA module, and the CDMA module is received back answer confirmation.
2) mobile phone is sent out the EIC equipment identification code request to the CDMA module again, asks for device identification to the CDMA module, after the CDMA module is received request, is 02 EIC equipment identification code to mobile phone return type sign indicating number.
3) after mobile phone is received, the type codes in the EIC equipment identification code that obtains is verified judge whether it is effective earlier, after the checking, mobile phone returns identification success or failure information according to the checking result to wireless communication module.
In the present embodiment, after mobile phone is received the EIC equipment identification code of CDMA module, extract type codes 02 wherein, judge that the type sign indicating number is effective, after simultaneously judging the current wireless communication module and be the CDMA module according to type codes 02, mobile phone returns identification to the CDMA module and successfully confirms; Also return confirmation after the CDMA module is received, show and know the handset identity success.
After mobile phone was discerned successfully to the CDMA module of new insertion, handset starting self corresponding C DMA AT Command Set explanation module communicated with the CDMA module, finishes the communication function under the cdma network.So, mobile phone just can add when shaking hands with wireless communication module obtains EIC equipment identification code reciprocal process, differentiate the type of the wireless communication module of current insertion, and then finish the corresponding subsequent operation, make the active user between heterogeneous networks, switch easily by using same mobile phone.
Certainly, the present invention also goes for other portable terminal, such as: equipment such as palmtop PC, PDA.The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.