Summary of the invention
The present invention has overcome the shortcoming that wireless terminal can't be expanded arbitrarily in the prior art, and a kind of wireless terminal that can set up expansion module arbitrarily is provided, and the method that realizes the expansion module plug and play also further is provided.In order to achieve the above object, the technical solution adopted in the present invention is: a kind of method that the plug and play expansion module is set on the wireless terminal main frame is that expansion module directly is plugged on the main frame of wireless terminal.
As the preferred version of above technical scheme, described expansion module is arranged at wireless terminal bonnet inboard, in the wireless terminal bonnet that closes, expansion module directly is plugged on the main frame of wireless terminal.
As the preferred version of above technical scheme, this method can also comprise step:
Send the connection application information with the expansion module that main frame has been connected to institute's main frame; Main frame receives the application information that expansion module sends, and according to application information, the communication pattern with expansion module is set, between connect.
As the preferred version of above technical scheme, also comprise step: expansion module sends the category IDs application of this module to main frame;
Main frame receives the category IDs application of expansion module, judges whether have agreement and/or the application program that is suitable for such expansion module on the main frame; If not this quasi-protocol and/or application program, then main frame sends the message of this quasi-protocol not and/or application program to expansion module;
Expansion module sends the URL address that can download this agreement to main frame;
The URL address that main frame sends according to expansion module is from the OTA download server and this agreement and/or application program are installed; And send the message that agreement and/or application program exist to expansion module.
As the preferred version of above technical scheme, also comprise step:
Expansion module is consulted application to the main frame transmittability;
Main frame receives this application, according to the transmission of the content control data of application, and returns confirmation to expansion module;
Through negotiation, the data transmission between main frame and the expansion module is descending greater than up asymmetric transmission.
A kind of main frame that the wireless terminal of plug and play expansion module is set of the present invention is provided with communication bus interface, is used for pegging graft with the communication bus interface of expansion module.
Preferred version as above technical scheme, the described communication bus interface that is arranged on the main frame is the female seat connector that is welded on the host bus, the female seat connector is vertically installed on the mainboard of main frame, the structure of described female seat connector is: be provided with a plurality of female seat pins, the bus welding of female seat pin one end and main frame, the other end of female seat pin is a spring needle, be arranged in the plastic housing of injection moulding of female seat connector, be surrounded by metal shell at the plastic housing lateral surface, this metal shell is connected with the ground wire of main frame.
As the preferred version of above technical scheme, other pin height of the aspect ratio that power pins is established in the described spring needle.The metal shell of female seat connector is outwards routed up at the edge of insertion end, is shaped on lead angle, is shaped on a plurality of metallic elastic compressing tablets that inwardly are pressed on the housing of the side surface of female seat connector.
Preferred version as above technical scheme also is provided with:
Receiving element is used to receive the connection application information that expansion module sends;
The unit is set, is used for, the communication pattern with expansion module is provided with according to application information;
Described receiving element also receives the category IDs application information that expansion module sends; And/or the URL address that can download this agreement and/or application program of reception expansion module transmission; And/or receive from this agreement of OTA download server and/or application program; And/or the reception expansion module proposes the capability negotiation application;
Judging unit is set, is used to judge whether main frame has the agreement and/or the application program of such expansion module;
Transmitting element is set, sends information to expansion module and/or OTA Download Server;
Storage unit is set, is used to store this agreement and/or application program;
Installation unit is set, is used to automatically perform the installation of this agreement and/or application program;
The capability negotiation unit also is set, is used for capability negotiation application, bipartite data transmission is controlled according to expansion module.
A kind of expansion module that the wireless terminal of plug and play expansion module is set of the present invention is provided with communication bus interface on it, be used for main frame on communication bus interface plug.
Preferred version as above technical scheme, described expansion module is fixed in wireless terminal bonnet inboard, the position of the communication bus interface of expansion module is: in the wireless terminal bonnet that closes, the expansion module communication bus interface directly and the communication bus interface on the main frame of wireless terminal plug.
Preferred version as above technical scheme, described communication bus interface is the male seat connector that is welded on the expansion module bus, the male seat connector is vertically installed on the expansion module, the structure of described male seat connector is: be provided with a plurality of male seat pins, the bus welding of male seat pin one end and expansion module, the contact pin of the male seat pin other end is arranged on the other end of plastic housing of the injection moulding of male seat connector, described contact pin is used for the expansion module communication bus interface and electrically contacts mutually, and the metal shell of male seat connector is connected with the ground wire of expansion module.
As the preferred version of above technical scheme, can also be provided with:
Transmitting element is used for sending the connection application information to main frame;
Receiving element is used to receive the information that main frame sends;
Described transmitting element can send the category IDs application of this expansion module to main frame; And/or to the URL address that the main frame transmission can be downloaded this agreement and/or application program, and/or to main frame transmission application protocol information;
Installation unit is set, is used on expansion module, installing agreement;
The capability negotiation unit also is set, is used for proposing the capability negotiation application by transmitting element to main frame, control is to the data transmission of main frame.
As the preferred version of above technical scheme, described expansion module is provided with mobile communication module, POS module, barcode scanner module and/or card reader module.
Wireless terminal and the method thereof that the plug and play expansion module is set of the present invention, has following beneficial effect: because wireless terminal main frame and expansion module are directly to peg graft, so use easily, can on a main frame, use or change different expansion modules, be used for difference in functionality, same main frame when different expansion modules is set, can be used as dual-mode handset, portable POS machine, portable bar code scanner or portable card reader etc.So the function of extended wireless terminal greatly, thus satisfy the different requirement of each side, for existing wireless terminal has been opened up more vast potential for future development.
Preferred version of the present invention especially directly is fixed on expansion module on the wireless terminal bonnet, when covering bonnet, just expansion module can be connected with main frame, and institute is so that connect, and form unified standard, thereby makes the compatibility of each expansion module stronger.
Preferred version of the present invention, can be automatically by main frame from OTA download server this expansion module agreement and/or application program, thereby make the expansion module that is inserted can plug and play.
Embodiment
With reference to drawings and the specific embodiments, will be described in detail the specific embodiment of the present invention.
The wireless terminal that the plug and play expansion module is set (Wpnp) of present embodiment, wireless terminal configurations block scheme as shown in Figure 1, at first on common wireless terminal main frame 1 (hereinafter to be referred as main frame), communication bus interface be set, communication bus interface also correspondingly is set on expansion module 3, above-mentioned two communication bus interface can directly be pegged graft, and also can be connected by the connector (not being data line) that establish in addition the centre.Power pins and ground wire pin will be set in described communication bus interface, and several serial communication pins.
Because wireless terminal itself is to the singularity of volume requirement, expansion module 3 is preferably disposed on the bonnet inboard of wireless terminal, preferred especially, expansion module 3 is fixed on the inner surface of bonnet of wireless terminal, in the bonnet that closes, two communication bus interface are plugged, so use very convenient.
This communication bus interface can be usually the serial communication interface of design.
Also can plug in order to make that expansion module 3 in the bonnet is charged, and has superior switching performance, so present embodiment has designed as Fig. 2, communication bus interface shown in Figure 3, wherein Fig. 2 illustrates the perspective view of disassembled form of two communication bus interface of present embodiment, Fig. 3 (a) illustrates female seat connector side-looking structural representation, Fig. 3 (b) illustrates the A-A side of Fig. 3 (a) and cuts open structural representation, Fig. 3 (c) illustrates the side-looking structural representation of male seat connector, Fig. 3 (d) illustrates the B-B side of Fig. 3 (c) and cuts open structural representation, female seat connector 4 is vertically installed on the wireless terminal main frame mainboard, male seat connector 6 is vertically installed in the relevant position on the expansion module, described female seat connector 4 can directly be pegged graft with male seat connector 6, as shown in Figure 2.
Female seat connector 4 is provided with a plurality of required female seat pins 41, the outer pin 411 of female seat pin 41 1 ends welds with the bus of wireless terminal main frame 1, the interior pin 412 of female seat pin 41 other ends is by Fig. 3 nb) illustrate, interior pin 412 is arranged in the plastic housing 42 of injection moulding of female seat connector, interior pin is provided with spring 412 times, pin 412 can compress vertically, eject in making, and forms the unidirectional spring pin, and plastic housing 42 lateral surfaces are surrounded by metal shell 43.
Correspondingly, male seat connector 6 also is provided with a plurality of and female seat pin 41 corresponding male seat pins 61, the outer pin 611 of male seat pin 61 1 ends welds with the bus of expansion module, and male seat connector 6 is vertically installed on the expansion module, can obviously find out by Fig. 3 (d), the contact pin 612 of male seat pin 61 other ends is arranged on the other end of plastic housing 62 of the injection moulding of male seat connector, and the surface is equal with the end face of plastic housing, and plastic housing 62 lateral surfaces are surrounded by metal shell 63.When connecting, male seat connector 6 inserts in the female seat connector 4, and two relative interior pins 412 form with contact pin 612 relative contacts and are electrically connected.
Above female seat connector 4 and male seat connector 6 are provided with metal shell 43,63, so inner signal is shielded in the metal shell, guarantee Electro Magnetic Compatibility.
And the metal shell of female seat connector 4 and male seat connector 6 is spared multiple spot (such as: 16 points) be welded and connected, thereby guarantee the ground connection that it can be good with the circuit board ground that is connected.It is more firm, tight for female seat connector 4 is connected with male seat connector 6, on the housing of the upper surface of female seat connector 4, be shaped on a plurality of metallic elastic compressing tablets 44 that inwardly are pressed into, when this elastic pressuring plate 44 inserts at male seat connector 6, be pressed on metal shell 63 surfaces of male seat connector 6, it is tightr so on the one hand two connectors to be connected, and makes the metal shell on both sides unify ground connection on the other hand.
The pin of interior pin 412 1 ends in female seat connector 4 is designed to power pins, and this pin is than other interior pin height, such as high 0.2mm, like this, when male seat connector 6 inserts, the pin of power supply is contact earlier, contact behind other pins, when male seat connector 6 was extracted, other pins separated earlier, and separate after the power pins, can realize the charged plug of expansion module like this.
Because bonnet is when covering usually, can not be fully over against covering, so can cause female seat connector 4 and male seat connector 6 when plug, can have an appointment 15 ° angle of the vertical axis of two connectors, so this example is outwards routed up at the edge of the insertion end of male seat connector 6 at the metal shell 43 of female seat connector 4, have lead angle 45, thereby make the expansion module that is fixed in bonnet more easily, when bonnet covers, male seat connector 6 inserts in the female seat connector 4, and expansion module 3 is plugged on the wireless terminal main frame 1.
During specific design, bonnet is because of the industrial design difference of mobile phone, but they can install this routine expansion module, and the thickness of bonnet and profile are decided according to the requirement of mobile phone and expansion module.
According to one embodiment of the present of invention, usually wireless terminal be provided with can the phase disassembly and assembly the fuselage protecgulum, keyboard, mainboard, battery, bonnet (also can claim: battery cover) etc., in the present embodiment, for this expansion module 3 is set, battery cover suitably can be thickeied 2-3mm, different type of machines and dissimilar expansion modules 3, the size that increases can be different, the mode that this bonnet is connected with wireless terminal can be a usual manner, such as matching by modes such as buckle engagings, expansion module 3 sizes are little than bonnet, can be bonded on the surface of bonnet indent, thereby fix this expansion module, and the communication bus interface of fixing back expansion module (such as: above-mentioned male seat connector 6) outwards be provided with, when its position covers at bonnet 5, require corresponding with the communication bus interface of main frame.In order accurately to locate the position of expansion module 3 on bonnet 5, a plurality of pilot holes preferably are set on expansion module, in bonnet 5, on the correct position corresponding spacer is set, when on bonnet 5, expansion module 3 being set, as long as pilot hole is inserted on the reference column, with regard to the expansion module position position of requirement.
In order to make the wireless terminal of different platform, all can support plug and play wireless terminal expansion module, above-mentioned serial communication bus all needs to support: UART, SPI, I2C, USB.
The pin of above-mentioned serial communication bus can define as shown in table 1:
Table 1 serial communication bus pinout
|
Signal name |
Specifically describe |
Pin 1 |
VBAT |
Power supply 3.8V |
Pin 2 |
TX/D+ |
UART pattern, signal are TX; USB pattern, signal are D+ |
Pin |
3 |
RX/D- |
UART pattern, signal are RX; USB pattern, signal are D- |
Pin 4 |
RDY |
The detection signal that Wpnp inserts or pulls up |
Pin 5 |
MISO/SDA/RCV+ |
Simulation model, audio frequency output+; The I2C pattern, SDA; The SPI pattern, MISO; |
Pin 6 |
MOSI/RCV- |
Simulation model, audio frequency output-; The SPI pattern, MOSI; |
Pin 7 |
SCLK/MIC |
Simulation model, the MIC input; The I2C pattern, SCLK; |
Pin 8 |
GND |
Ground connection |
In the pin of WPnP, except VBAT and GND, other pin all is multiplexing.
When expansion module 3 is connected by described communication bus interface with main frame 1, the application of carrying out expansion module 3 by flow process as shown in Figure 4 be connected: may further comprise the steps:
S10: expansion module inserts, to the connection application information of main frame transmission;
S20: main frame receives the application information that expansion module sends, and according to application information, determines the communication pattern with expansion module, between connect.
Specifically, the detection of expansion module signal and setting, concrete detailed process may further comprise the steps as shown in Figure 5:
S101: expansion module inserts;
S102: expansion module detects main frame RDY, if RDY is low, then not start of main frame can't connect;
S103: if the RDY height, then main frame start, it is low that expansion module is established RDY;
S104: main frame detects the insertion of expansion module, by main communication pin, and expansion module or the main frame language that rises, both sides set up soft shaking hands;
S105: expansion module is to the pattern of main frame application from the communication pin, because expansion module difference, so the communication pattern that requires also might be different, so application information according to expansion module, main frame is provided with the pattern of each communication pin, this pattern can comprise: analog form, I2C, SPI isotype.
By above step, set expansion module and main frame from communication pattern, both sides set up the connection of physical signalling layer.
The WPnP data link layer is used for guaranteeing that data transmit accurately between main frame and expansion module.Data link layer in the position of WPnP protocol stack as shown in Figure 6, the WPnP data link layer is followed the industry member standard of general serial communication protocol basically.But the different main frames of WPnP and the ability to communicate of different expansion modules, computing power and memory size have very big difference again, the WPnP data link layer can have the ability to consult the function that adapts to flow, so after the connection of both sides' physical signalling layer is set up, carry out method that capability negotiation and flow adapt between expansion module and the main frame as shown in Figure 7, may further comprise the steps:
S30: expansion module is consulted application to the main frame transmittability, and wherein negotiate content can comprise the size of transmits data packets, the size of data buffer, the method for data integrity check, and/or the parameter setting from communicating by letter;
S31: main frame receives this application, according to the transmission of the content control data of application, and returns confirmation to expansion module.
Illustrate, because the data transmission capabilities of the expansion module that has is low than the transmittability of main frame, so in the process of above capability negotiation, capabilities setting according to main frame and expansion module, can negotiate the transmission of asymmetric uplink and downlink packet as shown in Figure 8: promptly: main frame is big to the expansion module data packets for transmission, and expansion module is little to the main frame data packets for transmission, and the result of negotiation is optimized both data transmission capabilities.
Because expansion module of the present invention may be diversified, such as being the another kind of wireless terminal module different with main frame, it also may be magnetic stripe reader, or barcode scanner, or smart card reader or the like, so require main frame to be provided with the application corresponding agreement, as: the telephone type agreement, the magnetic stripe reader quasi-protocol, scanner quasi-protocol, smart card quasi-protocol.So require on main frame, to be provided with and the expansion module corresponding protocol of inserting, therefore, carry out the management of expansion module agreement according to flow process as shown in Figure 9, step is as follows:
S21: expansion module sends the category IDs application of this module to main frame;
S22: main frame receives the category IDs application of expansion module, judges whether main frame has this quasi-protocol;
S23: if this quasi-protocol is arranged, then main frame sends the already present message of this quasi-protocol to expansion module, turns to the S27 step;
S24: if this quasi-protocol not, then main frame sends the not message of this quasi-protocol to expansion module; Expansion module sends the URL address that can download this agreement to main frame;
S25: the URL address that main frame sends according to expansion module, send the download application to the OTA Download Server, begin to download this agreement after meeting with a response, this download can be that J2ME downloads or local the download;
S26: after agreement was downloaded, main frame was installed this agreement automatically, and sent the message that agreement exists to expansion module;
S27: expansion module sends the message of service beginning to main frame.
Through above process, no matter on main frame, add any expansion module, all can download related protocol automatically, make the expansion module can proper communication.
If on expansion module, there is not the expansion module quasi-protocol of relevant expansion module, can send the application of this quasi-protocol of request to main frame, after main frame receives, flow process according to Fig. 9 is downloaded related protocol by main frame, by main frame the agreement of downloading is sent to expansion module again, expansion module receives this agreement, installs automatically, certainly, also can answer requirement of client to carry out the unloading of agreement.
Equally, the application program of different expansion modules is also inequality, also can be about to agreement and be replaced by application program by carrying out the download and the installation of application program with the similar process of above flow process.
It is the method for download service agreement and application that Figure 10 illustrates module promptly slotting.Figure 11 illustrates the structure of WPnP protocol layer.
Above method is to realize by hardware or software and hardware phase structure.
So, according to one embodiment of the present of invention, the wireless terminal that the plug and play expansion module is set of the present invention as shown in figure 12, is provided with main frame 1, expansion module 3, communication bus interface 2a is set on the main frame 1, communication bus interface 2b also correspondingly is set on expansion module 3, above-mentioned two communication bus interface 2a, 2b can be connected by Bussing connector 4, also can directly peg graft.When expansion module 3 is connected with main frame 1, expansion module 3 powers on, and the transmitting element 310 in the expansion module 3 sends application information to main frame 1, after the receiving element 110 in the main frame 1 receives this application information, by unit 120 is set, the communication pattern with expansion module is provided with; Then, transmitting element 310 in the expansion module 3 sends the category IDs application of this module to main frame 1, after receiving element 110 in the main frame 1 receives this application information, whether have the agreement and/or the application program of such expansion module by judging unit 130 main frames, if have, just send confirmation to expansion module,, send the information of this quasi-protocol not and/or application program to expansion module by transmitting element 140 if do not have by transmitting element 140; After receiving element 320 in the expansion module 3 receives above-mentioned information, if there is not the information of agreement and/or application program, then send the URL address that to download this agreement and/or application program by transmitting element 310, the URL address that main frame sends according to expansion module, cross transmitting element 140 and send the download application to the OTA Download Server, begin to download this agreement and/or application program by receiving element 110 after meeting with a response, this agreement and/or application program are downloaded to storage unit 160, after agreement and/or application program are downloaded, main frame automatically performs the installation of this agreement and/or application program by installation unit 170, and sends the message of agreement and/or application program existence to expansion module by transmitting element 140.
If there is not the agreement of respective class on the expansion module 3, also can file an application to main frame by transmitting element 310, and provide the URL that can download this agreement the address, after downloading this quasi-protocol by main frame, the transmitting element 140 by main frame sends to expansion module 3 again, after the receiving element 320 of expansion module 3 receives these agreements, on the storage unit 350 that is stored thereon, install by the installation unit on it 330, after the successful installation, expansion module 3 can use.
In addition, in order to carry out above capability negotiation process, on the expansion module 3 capability negotiation unit 340 can also be set, be used for proposing the capability negotiation application to main frame by transmitting element 310, after the receiving element 110 of main frame receives this application, also control by the 180 pairs of bipartite data transmission in its capability negotiation unit, main frame and will determine by 140 transmitting elements after the data transmission situation send it back expansion module.
Described expansion module 3 can be all kinds of modules that need be connected with existing wireless terminal and use, now for several typical examples:
1, integrated wireless POS machine:
This Wpnp integrated wireless POS machine is that mobile phone and the magnetic strip reading backboard by standard constitutes.Its block diagram as shown in figure 13, the POS expansion module 3a that wireless terminal main frame 1 plugs with it is set, this POS expansion module 3a is provided with each expansion module unit in the aforesaid expansion module 3, also be provided for the magnetic card Card Reader parts of Card Reader, this POS expansion module 3a also can directly be installed in cell phone rear cover or the enclosing cover, make things convenient for the user to carry, by the magnetic card Card Reader parts business of swiping the card whenever and wherever possible, communicate transmission by main frame 1, this is for certain customers: such as insurance agent etc., wish and can carry out the bank transfer business with the client whenever and wherever possible, use will be very easily.
2, integrated wireless scanner:
WPnP integrated wireless POS machine is that mobile phone and the bar code reading backboard by standard constitutes.Its block diagram as shown in figure 14, the scanner expansion module 3b that wireless terminal main frame 1 plugs with it is set, this scanner expansion module 3b is provided with each expansion module unit in the aforesaid expansion module 3, also be provided for the bar code scan parts of scanning barcode, this scanner expansion module 3b also can directly be installed in cell phone rear cover or the enclosing cover, make things convenient for the user to carry, can scan product portablely, by main frame 1 telecommunication, the management of realization remote centralized, thus can optimize logistics management greatly.
3, integrated wireless card reader
WPnP integrated wireless card reader is to be made of the mobile phone of standard and contact card or contactless card reader, its block diagram as shown in figure 15, the card reader expansion module 3c that wireless terminal main frame 1 plugs with it is set, this card reader expansion module 3c is provided with each expansion module unit in the aforesaid expansion module 3, also be provided for distinguishing the Card Reader parts of contact or contactless card, this card reader expansion module 3c also can directly be installed in cell phone rear cover or the enclosing cover, make things convenient for the user to carry, use, combine common the use with main frame 1, realize portable card reader.
4, dual-mode handset
Existing dual-mode handset is that the mobile module with two kinds of patterns is solidificated in the physical module, so can't change the mobile phone of other patterns easily, so a lot of users have to carry a plurality of mobile phones, the dual-mode handset that this is routine, block diagram as shown in figure 16, the bimodulus expansion module 3d that wireless terminal main frame 1 plugs with it is set, bimodulus expansion module 3d is provided with each expansion module unit in the aforesaid expansion module 3, also be provided with the be used for wireless communication module different with the wireless terminal main frame, such as: main frame is CDMA or GSM mobile handset, and bimodulus expansion module 3d is a Personal Handyphone System, like this, can answer user's requirement, the pattern of switch mobile phone is easy to use at any time.