Summary of the invention
The technical problem to be solved in the present invention provides a kind of real-time Simulation development approach of subscriber identification module tool kit, to realize real-time, the real net simulative debugging of SIM card STK function, UIM card UTK function etc.The present invention also will provide a kind of realization system for carrying out said process.
In order to solve the problems of the technologies described above, the invention provides a kind of real-time Simulation development approach of subscriber identification module tool kit, may further comprise the steps:
(a) set up an analog development system, comprise artificial card, simulated operation module and the network interaction module of the subscriber identification module tool kit of realizing on computers, and the mobile phone and the communication network that are inserted with subscriber identification module;
(b) described subscriber identification module is carried out in the initialization procedure it at mobile phone, sets up setting the monitoring of incident; Also finish the initialization of subscriber identification module tool kit menu between described simulated operation module and the described artificial card by data interaction;
(c) wait for that the commissioning staff operates described menu, after the operation, described simulated operation module sends to described artificial card with operational order by interface, and the data that described artificial card returns described simulated operation module are handled, and result data is sent it back described simulated operation module;
(d) described simulated operation module is upgraded the modeling interface demonstration according to return data, and judges whether to relate to network operation, if do not relate to, returns step (c), if relate to, operation information is sent to described network interaction module, carries out next step;
(e) described network interaction module sends to operation information described mobile phone again, finishes corresponding operation by this mobile phone and subscriber identification module;
Can notify described subscriber identification module when (f) described mobile phone has corresponding monitor event to take place, described subscriber identification module sends the information of event result mobile phone to and sends to described simulated operation module by mobile phone through the network interaction module again;
(g) described simulated operation module shows on screen according to event result information, and is sent back to described artificial card processing by interface, returns step (c).
Further, above-mentioned real-time Simulation development approach can have following characteristics: the setting incident of setting up monitoring in the described step (b) comprise MT call out, call out connect, call out disconnect, a kind of or combination in any in the location status, in the described step (f) corresponding monitor event be included as MT call out, call out connect, call out disconnect, a kind of or combination in any in the location status.
Further, above-mentioned real-time Simulation development approach can have following characteristics: described subscriber identification module is set up an incident buffer area when initialization, to be stored in this buffer area from the event result that mobile phone is received earlier, behind the query statement of receiving described network interaction module, take out event result from this buffer area again and send to described network interaction module.
Further, above-mentioned real-time Simulation development approach can have following characteristics: undertaken mutual by the AT instruction between described network interaction module and mobile phone, instruct unsupported operation information for AT, by described network interaction module with its code conversion for after the standard A T instruction, send to described subscriber identification module by its decoding processing through mobile phone; Instruct unsupported event result information for AT, by described subscriber identification module its code conversion is the AT repeat-back of standard after, send to described network interaction module by its decoding processing through mobile phone again.
Further, above-mentioned real-time Simulation development approach can have following characteristics: carry out information interaction by the communication interface between process between described network interaction module and the described simulated operation module, carry out information interaction according to standard ISO 7816 agreements by sockets interface between described simulated operation module and the described artificial card.
Further, above-mentioned real-time Simulation development approach can have following characteristics: also comprise an aerial Download Server of simulation on computers in the analog development system of described foundation, in the described step (c), if the commissioning staff has carried out the operation of aerial download, directly give this aerial Download Server, organize downlink data by this aerial Download Server according to predetermined protocol, send to described simulated operation module through the network interaction module and show, re-send to described artificial card.
In order to solve the problems of the technologies described above, artificial card, mobile phone and the communication network of the subscriber identification module tool kit of used software debugging environment structure when the real-time Simulation development system of subscriber identification module tool kit provided by the invention comprises exploitation, it is characterized in that, also comprise simulated operation module, network interaction module and subscriber identification module, described artificial card, simulated operation module and network interaction module realize on computers, described subscriber identification module is inserted in the described mobile phone, wherein:
Described artificial card comprises that the subscriber identification module tool kit that will debug reaches and the interface of described simulated operation inter-module communication;
Described simulated operation module is used to realize using on the real handset simulation of subscriber identification module tool kit business, operational order is handed down to described artificial card and receives return results, the information that wherein relates to network operation is submitted to described network interaction module and received the event result information that it issues, re-send to described artificial card;
It is the instruction that mobile phone can be discerned that described network interaction module is used for described simulated operation module is sent information organization, sends to described mobile phone and receives the event result information that it returns, and this object information is sent to described simulated operation module again;
Described subscriber identification module is on the basis of Standard User identification module, also the object information of the setting incident that described mobile phone is sent is organized as the desired form of replying that described network interaction module sends instruction, sends to described network interaction module through described mobile phone.
Further, above-mentioned real-time Simulation development system can have following characteristics: described simulated operation module further comprise protocal analysis processing unit, instruction display unit, instruction manipulation unit, and described artificial card between communication interface and with the communication interface of described network interaction intermodule, wherein:
It is but that described artificial card recognition instruction is handed down to this artificial card through interface according to protocol translation that described protocal analysis processing unit is used for user's operation, the data that described artificial card is returned, analyze its whether compliant, and processing be converted into can the recognition data structure;
Described instruction display unit is used to provide operation required graphical interfaces, and shows the information of returning after receiving the data that described protocal analysis processing unit processes on screen;
Described instruction manipulation unit is used to accept user's valid function, calls to be handed down to described artificial card after described protocal analysis processing unit changes into discernible instruction with user's operation;
And the communication interface between described artificial card is used to realize the bi-directional of information between described simulated operation module and the described artificial card;
With the communication interface of described network interaction intermodule, be used for the bi-directional of the information between simulated operation module and the network interaction module that realizes by the communication between process.
Further, above-mentioned real-time Simulation development system can have following characteristics: the interface between described artificial card and the described simulated operation module comprises the ISO7816 logic interfacing of directly carrying out exchanges data, and with socket that realize with universal data interface this logic interfacing co-ordination.
Further, above-mentioned real-time Simulation development system can have following characteristics: described simulated operation module also comprises note logic interfacing, is used for by socket open SMS passage.
Further, above-mentioned real-time Simulation development system can have following characteristics: the ISO7816 logic interfacing that all also comprises an opening on described simulated operation module and the described artificial card.
Further, above-mentioned real-time Simulation development system can have following characteristics: described network interaction module comprises that further Inter-Process Communication interface, instruction send receiving element, information translation unit and information query unit, wherein:
Described Inter-Process Communication interface is used to realize the bi-directional with described simulated operation intermodule information;
It is the AT instruction that described instruction transmission receiving element is used for the information organization that described simulated operation module is sent, finish and described mobile phone between the transmission and the reception of AT instruction, and after will being converted into the APDU form from the AT instruction that described mobile phone receives, be sent to described simulated operation module again;
Described information translation unit is used for instructing unsupported operation information code conversion to be standard A T instruction AT, and the AT instruction of the expansion that described mobile phone is returned is decoded;
Described information query unit is used for sending the AT instruction to described mobile phone, inquires about the event result information that current state of described mobile phone and described subscriber identification module receive.
Further, above-mentioned real-time Simulation development system can have following characteristics: described instruction sends the two cover message queues that receiving element inside also comprises the uplink and downlink direction, is used for carrying out when data passes certain coordination.
Further, above-mentioned real-time Simulation development system can have following characteristics: described subscriber identification module further comprises information temporary storage unit, instruction codec unit and instruction monitoring unit, wherein:
Described information temporary storage unit is used for the information of the monitoring notice of setting incident that described mobile phone is sent and carries out record, is temporarily stored in the incident buffer area;
Described instruction codec unit is used for the information of buffer area is encoded, and makes it the structure of conformance with standard AT instruction, and the AT instruction of the expansion of sending is decoded;
Described instruction monitoring unit is used for all are issued the instruction of described subscriber identification module to be monitored, and when receiving the monitoring notice of setting incident, notifies described information temporary storage unit temporary; When finding the query statement that described network interaction module is sent, call described instruction codec unit coding and issue; When receiving other instructions, change the normal handling flow process over to.
Further, above-mentioned real-time Simulation development system can have following characteristics: the aerial Download Server that also comprises a simulation in the described network interaction module, be used for the relevant value-added service of that is virtually reality like reality and aerial download when virtual network is moved, adopt the mode of function call to realize exchanges data.
Further, above-mentioned real-time Simulation development system can have following characteristics: also be embedded with a data monitoring module in the described simulated operation module, be used for after finding that the relevant operation information of aerial download is arranged, judge whether to be in real network operation, if send to described mobile phone and wait for the response of real network with AT instruction; If described aerial Download Server is then directly given in the virtual network operation, this server is organized downlink data according to predetermined protocol, sends to described simulated operation module.
As from the foregoing, the present invention has realized the real-time uniting and adjustment of artificial card and system end having reduced the dependence to mobile phone and data acquisition unit by the instruction of special-purpose COS (CPU card operation system) and expansion AT.Can be used as STK/UTK exploitation, the demonstration platform of various SIM/UIM cards.This scheme provides semi-automatic solution for the smart card software test, by some test events that at present must rely on mobile phone to carry out, transfer on the computer and finish, thereby simplified smart card development process, improved development efficiency.
Embodiment
Present embodiment is developed as example with the real-time Simulation of SIM card STK, and shown in Figure 1 is the schematic diagram of development system.As shown in the figure, this system is by STK artificial card 1, simulated operation module 2, network interaction module 3, SIM card 4, mobile phone 5 and communication network 6 are formed, wherein STK artificial card 1, simulated operation module 2 and network interaction module 3 realize on computers with form of software, the SIM card 4 of special COS is contained in the mobile phone 5, is to realize with entity.
Among the figure, used STK software debugging environment when STK artificial card 1 is promptly developed, be equivalent to realize the soft simulation virtual card of STK function, this cartoon is crossed the Simulation execution that the coupled simulated operation module 2 of universal data interface that ISO7816 logic interfacing and windows socket realize realizes mobile phone STK menu operation on computers, when operation does not relate to network function, only between these two modules, carry out information interaction, in the STK menu operation, relate to network function (as calling out, the transmitting-receiving note, download etc.) time, simulated operation module 2 by the communication between process with information informing network interactive module 3, the network interaction module passes to mobile phone 5 by the AT instruction again, by mobile phone 5 (interior plug sim card 4) information is sent on GSM or other communication networks 6.
SIM card 4 adopts special COS, be equivalent to be used to realize the address card of network function, and set up between the mobile phone 5 note, the monitoring of incidents such as speech, in case there is corresponding event to take place, as incoming call, receive note or data download etc., mobile phone 5 can be notified the SIM card 4 in the mobile phone immediately, 4 pairs of information of the SIM card of special COS are carried out buffer memory, after the AT instruction of receiving the inquiry that network interaction module 3 regularly sends, with the information via in the buffer area according to the call format of AT repeat-back encode the AT of expansion (can be understood as instruction), then information is sent to network interaction module 3, the information that network interaction module 3 obtains also sends back simulated operation module 2 by the communication between process, the event result that simulated operation module 2 becomes SIM card to monitor information reverting shows on screen and also finally sends STK artificial card 1 back to.
By above process, realized real-time, the real net simulative debugging of SIM card STK function.
The specific implementation structure of each functional module of present embodiment is described below in conjunction with Fig. 2:
The STK artificial card except that the STK functional software that comprises debugging, also comprises: with the interface of simulation operational module, one is ISO7816 logic interfacing, and one is the universal data interface that realizes by windows socket.The former uses Inter-Process Communication to realize, and have higher efficient but need write the corresponding interface program, be the passage that directly carries out exchanges data with the simulation operational module.The latter realizes that by socket the developer need not to understand concrete inside implementation procedure, only needs socket by appointment just can finish the mutual of data, but has the relatively low shortcoming of efficient.This two-part co-ordination makes the simulated operation module to carry out the mutual of information with a selected development environment.Seen a real SIM card external seemingly from the angle of simulated operation module, seen a real mobile phone external seemingly from general development environment angle.
The simulated operation module mainly comprises protocal analysis processing unit, STK instruction display unit, STK instruction manipulation unit, ISO7816 logic interfacing and universal data interface, Inter-Process Communication interface and note logic interfacing, wherein:
Described protocal analysis processing unit is used for the APDU instruction that user's operation can be discerned for the STK artificial card according to the GSM11.14 protocol translation is handed down to the STK artificial card through interface.In addition, whether compliant is analyzed also to be used for data that the STK artificial card is returned, and the data of returning can the recognition data structure be processed conversion according to its purpose according to the simulated operation module.
Described STK instruction display unit, be used to provide operation required graphical interfaces, and after receiving the data that the protocal analysis processing unit processes, on indicator screen, show the STK artificial card information of return data just now, for example, what one was returned on the STK artificial card is Get Input instruction, then shows input prompt frame wait user input on screen.If what return is Display Text instruction, then on screen, show one section information.
Described STK instruction manipulation unit, behind the simulated operation module invokes STK instruction display unit, just be in and wait for that the user carries out the pattern of next-step operation, in case the user has carried out once effectively operation, STK instruction manipulation unit is with regard to the invocation protocol analysis and processing unit, APDU instruction with user's operation can be discerned for the STK artificial card according to protocol translation is handed down to the SIM artificial card then.
Described ISO7816 logic interfacing and universal data interface realize that with Win Socket socket the interface as between simulated operation module and the STK artificial card carries out data interaction by Win Socket socket with the STK artificial card.
Described Inter-Process Communication interface is used for the bi-directional by information between realization simulated operation module of the communication between process and the network interaction module.
Described note logic interfacing: by Win Socket socket the short message channel opening is come out, carry out secondary development under the prerequisite that makes other developers need not development environment is made any change.
The simulated operation module of forming based on above structure is the message scheduling center of whole development system, realized using on the real handset simulation of STK/UTK business with software, the function that will be referred to network operation is simultaneously submitted to the network interaction module by the Inter-Process Communication interface with information, also is to obtain the information that network issues by the Inter-Process Communication interface.
In addition, can also on STK artificial card and simulated operation module, increase the ISO7816 Logic Interface Unit of an opening, this cover real-time simulation debugging system is bundled on the software development environment, but the input interface of a plurality of data can be arranged, for example it can receive the tune-up data of Vc development environment, can connect intelligent card read/write device and use a real SIM card, can be with the development environment co-ordination of Keil etc.
The network interaction module comprises that mainly Inter-Process Communication interface, AT instruction send receiving element, information translation unit and information query unit.Wherein:
Described Inter-Process Communication interface is used for realizing by the communication between process the bi-directional of network interaction module and simulated operation intermodule information.
The information organization that AT instruction transmission receiving element is used for that the data structure that the simulated operation module is sent is comprised is the AT instruction, adds the upstream message formation; Finish and mobile phone between the transmission and the reception of AT instruction, and will be converted into the APDU form from the AT instruction that mobile phone receives, the formation of adding downstream message.This unit internal maintenance the uplink and downlink directions two the cover message queues, need carry out certain coordination with the transmission of between network operation module and simulated operation module, carrying out data.In the present embodiment, the AT instruction interaction between network interaction module and the mobile phone realizes that by wired mode interface is USB interface or serial data interface commonly used, in fact also can be by interfaces such as infrared rays.
The information translation unit is used for being responsible for the simulated operation module is interested and the unsupported information of standard A T instruction (wishing to obtain the secondary short message that mobile phone receives as the Simulation execution module) becomes standard A T instruction according to standard A T code conversion, make it is to have received a discernible AT instruction for mobile phone, and the expansion AT instruction that is used for mobile phone is returned is decoded.
Information query unit is used for sending the AT instruction to mobile phone termly, the information that state that the inquiry mobile phone is current and the SIM card of special COS receive.
SIM card 4 adopts special COS, has increased information temporary storage unit, AT instruction codec unit and instruction monitoring unit on the basis of the SIM card unit of standard, wherein:
The information that the event-monitoring that the information temporary storage unit is used for that mobile phone is sent is notified is carried out record, is temporarily stored in the incident buffer area of SIM card, waits for the inquiry of network interaction module.
AT instruction codec unit is used for the information of buffer area is encoded, and makes it the structure of conformance with standard AT instruction, and the AT instruction that is used for expansion that information translation unit coding is obtained is decoded.In this way, for mobile phone the return results of the AT instruction of a standard with original some information of not discerned on the SIM card by standard A T instruction.
Usually, employing is carried out new coding to ADN on the SIM card and SMS, why the content of ADN and SMS being carried out new coding mainly is that their effect is more special, the function that couple ADN and SMS operation are arranged in the AT instruction, the AT instruction that sends downwards by computer is for example read ADN and finally can be delivered on the SIM card like this, and the information that SIM card will be blocked buffer memory returns to mobile phone according to specific coding as the result that reads of ADN.It thinks it is an ADN for mobile phone, so again content is sent back to computer.
The instruction monitoring unit, the instruction that is used for all are issued SIM card is monitored, and after finding that the incident that need return the STK artificial card is arranged, they is deposited in the incident buffer area; When finding that the network interaction module is inquired about the information of current SIM card by the AT instruction, the call instruction codec unit; When the APDU instruction that issues does not belong to above-mentioned situation, change the normal handling flow process over to.
Correspondingly, the flow process of present embodiment SIM card STK real-time Simulation exploitation may further comprise the steps:
Step 1 is set up an analog development system, comprises the STK artificial card, simulated operation module and the network interaction module that realize on computers, and the mobile phone and the communication network that insert SIM card (adopting special COS);
Step 2, behind the mobile phone power-on, the SIM card of special COS receives mobile phone and sends and return Terminal Profile after the Terminal Profile instruction of getting off and reply, propose then to comprise the incident that needs the information used from now on (as MT call out, call out connect, call out disconnections, location status etc.) request of proposition event-monitoring, mobile phone returns event-monitoring foundation and replys, and finishes initialization; Simultaneously, the SIM card of this special COS resetting power on after, in card, open up an incident buffer area, the incident that is used for mobile phone is issued is carried out buffer memory, because the network interaction module can not guarantee immediately this incident to be taken away after incident is downloaded;
Step 3, the simulated operation module is according to carrying out data interaction according to standard ISO 7816 agreements by sockets interface between the start process of real handset and the STK artificial card, comprise reading of the reading of critical file, network authentication, ADN and SMS, send Terminal Profile instruction at last, finish the initialization of STK menu;
Step 4, wait for that the commissioning staff operates the STK menu on the screen, after the operation, the simulated operation module sends to the STK artificial card with operational order, the data that described artificial card returns described simulated operation module are handled, and the result gives back the simulated operation module by above-mentioned interface again;
Step 5, the data that simulated operation module analysis STK artificial card returns are upgraded the demonstration of modeling interface, and are judged whether to relate to network operation, if do not relate to, return step 4, if, send associative operation information to the network interaction module, carry out next step;
Step 6, the instruction of associative operation is joined the upstream message formation of network interaction module, carry out code conversion in case of necessity, wait for suitable opportunity and call that the AT instruction sends to mobile phone (being inserted with SIM card), the SIM card of mobile phone and special COS is finished function corresponding by normal flow, as sending note, calling out or the like;
On down direction:
Step 7, mobile phone after having corresponding monitor event (call out, call out connection, call out disconnection, location status or the like as MT) can notify SIM card when taking place are got up this chain of events buffer memory;
Regularly by the response of AT instruction inquiry monitoring mobile phone incident, mobile phone is converted to the SIM card that is handed down to special COS after APDU instructs for step 8, network interaction module;
Step 9, after SIM card is received inquiry AT instruction, in the incident buffer area, search, if have, then with incident by the requirement of the AT repeat-back form packing of encoding, return data is given mobile phone, makes data behind the coding think the response of AT instruction that previous transmission is got off to mobile phone, and mobile phone sends to the network interaction module by inquiry AT repeat-back again;
Step 10, the return results that the network interaction module is instructed AT is reduced to the APDU instruction, and (this conversion also can be finished by the unit of simulated operation module, effect is equal to), add the downstream message formation, send to the simulated operation module on suitable opportunity by the communication interface between process;
Step 11, simulated operation module show on screen according to return information, and finally are sent back to the processing of STK artificial card by sockets interface.
In sum, the present invention is the address card of realization network function and the soft simulation virtual card of STK function with the SIM card of a reality according to Function Decomposition.SIM card COS to routine transforms, it has been possessed special event is managed, stores, and utilize special coding to make it the structure of conformance with standard AT instruction, has realized that computer can visit customizing messages in the SIM card by standard A T instruction.And utilize Windows system multiplex characteristic, between the debugging enironment of simulated operation module and developer's use, set up the data interaction passage.Thereby realized " in real time " of SIM card STK function real net debugging emulation.System and method of the present invention also is applicable to the real-time debug of subscriber identification module tool kits such as UIM card UTK function fully, only need SIM card correspondingly is replaced by the UIM card and is adopted special COS, the STK artificial card is replaced with UTK soft simulation card, mobile phone changes the CDMA mobile phone into by GSM mobile handset, and the function of other functional module is identical.
For OTA related services such as (aerial download technologies), the analog development system of embodiment adopts real network operation, but also can adopt the virtual network operation or select a kind of from dual mode according to configuration.Under the situation of selecting the virtual network operation, can be in the simulated operation module an embedded data monitoring module, after finding that the relevant data of OTA operation are arranged, judge whether to be in real network operation, if, send to the destination by embodiment process invocation AT instruction, and wait for the response of real network.If the OTA emulating server is then directly given in the virtual network operation, server is organized downlink data according to predetermined protocol, and joining awaits a favorable opportunity in the downstream message formation sends to the demonstration of simulated operation module, sends to the STK artificial card again by it.This OTA emulating server is as the part in the network interaction module, and it is responsible for simulating the relevant value-added service of some true and aerial downloads when virtual network is moved, adopt the mode of function call to carry out exchanges data.
A lot of modules and unit are realized with software in the foregoing description system, so have the link of a lot of conversion, for example each module can merge or split the interface between the module again, used instruction also can be adopted other type, as long as guarantee reliable data communication.