CN103874054B - Data transmission method and mobile terminal, SIM card - Google Patents

Data transmission method and mobile terminal, SIM card Download PDF

Info

Publication number
CN103874054B
CN103874054B CN201210526471.7A CN201210526471A CN103874054B CN 103874054 B CN103874054 B CN 103874054B CN 201210526471 A CN201210526471 A CN 201210526471A CN 103874054 B CN103874054 B CN 103874054B
Authority
CN
China
Prior art keywords
apdu
sim card
transparent transmission
instructions
parameter values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210526471.7A
Other languages
Chinese (zh)
Other versions
CN103874054A (en
Inventor
朱本浩
郭漫雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201210526471.7A priority Critical patent/CN103874054B/en
Publication of CN103874054A publication Critical patent/CN103874054A/en
Application granted granted Critical
Publication of CN103874054B publication Critical patent/CN103874054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of data transmission method and mobile terminal, SIM card, belongs to field of data service.Wherein, the data transmission method, the first APDU instructions of client are transferred into SIM card, methods described includes:The first APDU instructions are packaged according to the transparent transmission APDU parameter values of acquisition;The 2nd APDU after encapsulation is instructed SIM card is sent to by Modem;When receiving the success response message that the SIM card is returned, the success response message is carried out to parse the reply data for obtaining SIM card, to result is sent into client after reply data progress logical process.Technical scheme can realize the communication between the client and SIM card of different industry users.

Description

Data transmission method and mobile terminal, SIM card
Technical field
The present invention relates to field of data service, a kind of data transmission method, device and mobile terminal are particularly related to.
Background technology
SIM(Subscriber Identity Module, client identification module)Card is the important composition in mobile communication Part, can realize the Core Features such as mobile communication ability authentication, and mobile terminal utilizes 3GPP(The3rd Generation Partnership Project, third generation partner program)/ETSI((EuropeanTelecommunications Standards Institute, ETSI)Standard agreement realizes the communication with SIM card.
With NFC(Near Field Communication, near field communication (NFC))Technology and mobile-phone payment should With the development in market, occur in that and the different industries applicable cases such as bank, public transport are loaded in SIM card.There was only electricity in SIM card before When letter is applied, mobile terminal only has Modem(Modem)One channel communicates with SIM card, adds now in SIM card Carry after other application, in addition it is also necessary to which mobile terminal gets through the data communication channel with SIM card, to realize the visitor of different industry users Family end software can have access to SIM card.
At present, International Organization for standardization SIM Alliance define Open Mobile API(Open mobile applications Interface)To realize above-mentioned functions.As shown in figure 1, Open Mobile API definitions mechanism utilize SIM logical channel, with The telecommunications application of main channel makes a distinction, and on the one hand provides foundation/closing SIM card logical channel, interaction APDU to upper layer application (Application Protocol Data Unit, Application Protocol Data Unit)Standard APDU, on the other hand downwards utilize Defined in 3GPP23.007 CGLA standards AT instruction, expect using CGLA instruct realize client send APDU instruction from Modem is pass-through to SIM card.It can be seen that, this set framework is to be carried out using mobile phone is functional, it is necessary to be completely dependent on Modem with SIM card Communication.
But it is due to that Modem is primarily used to move communication in design so that Modem is difficult by logical channel Used completely as a pass-through channel to other industries, therefore, Modem transparent transmission APDU abilities in logical channel are not Very well.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of data transmission method and mobile terminal, SIM card, it can realize Communication between the client and SIM card of different industry users.
In order to solve the above technical problems, embodiments of the invention offer technical scheme is as follows:
On the one hand there is provided a kind of data transmission method, the first APDU instructions of client are transferred into SIM card, institute The method of stating includes:
The first APDU instructions are packaged according to the transparent transmission APDU parameter values of acquisition;
The 2nd APDU after encapsulation is instructed SIM card is sent to by Modem;
When receiving the success response message that the SIM card is returned, the success response message is parsed The reply data of SIM card, to result is sent into client after reply data progress logical process.
Further, before the transparent transmission APDU parameter values according to acquisition are packaged to the first APDU instructions also Including:
Obtain the Modem of mobile terminal ability information;
Judge whether the Modem supports the instruction of logical channel transparent transmission completely according to the ability information;
When the Modem not exclusively supports that logical channel transparent transmission is instructed, the corresponding transparent transmission APDU ginsengs of the SIM card are obtained Numerical value.
Further, the corresponding transparent transmission APDU parameter values of the SIM card that obtain include:
Step a:Obtain the APDU parameter value recommendation lists that Modem logical channels are capable of transparent transmission;
Step b:APDU parameter values construction APDU is selected to consult sign on from the APDU parameter values recommendation list;
Step c:Send the APDU and consult sign on to SIM card, wherein the APDU consults in sign on P1P2 is preset value;
Step d:The return value of the SIM card is received, builds and confirms APDU instructions, during the confirmation APDU is instructed P1P2 is set to the return value;
Step e:Send and confirm that APDU is instructed to SIM card;
Step f:The success response that the SIM card is returned is being received, it is the transparent transmission to determine selected APDU parameter values APDU parameter values;Receiving the failure response that the SIM card is returned, return to step b.
Further, methods described also includes:
When not receiving the success response message of SIM card return, transparent transmission APDU parameter values are reacquired, to utilize The transparent transmission APDU parameter values for stating reacquisition are packaged to the first APDU instructions.
The embodiment of the present invention additionally provides a kind of data transmission method, the first APDU instructions of client to be transferred to SIM card, methods described includes:
Receive the 2nd APDU instructions that mobile terminal is sent;
The 2nd APDU instructions are parsed according to the transparent transmission APDU parameter values of preservation, the first APDU instructions are obtained;
The success response message that the reply data of the first APDU instructions will be carried is sent to the mobile terminal.
Further, also include before the 2nd APDU instructions for receiving mobile terminal transmission:
Consult to determine the transparent transmission APDU parameter values with the mobile terminal.
The embodiment of the present invention additionally provides a kind of mobile terminal, including:
Transparent transmission APDU package modules, are sealed for the transparent transmission APDU parameter values according to acquisition to the first APDU instructions Dress, the 2nd APDU after encapsulation is instructed and is sent to SIM card by Modem;
Parsing module is responded, for receiving the success response message that the SIM card is returned, the success response message is entered Row parsing obtains the reply data of SIM card, and the reply data is sent into standard Open Mobile API modules;
The standard Open Mobile API modules, for being carried out to the reply data after logical process, processing is tied Fruit is sent to client.
Further, the mobile terminal also includes:
Modem ability acquisition modules, the ability information of the Modem for obtaining mobile terminal, according to the ability information Judge whether the Modem supports the instruction of logical channel transparent transmission completely;
Transparent transmission APDU acquisition modules, for when the Modem not exclusively supports that logical channel transparent transmission is instructed, obtaining described The corresponding transparent transmission APDU parameter values of SIM card.
Further, the transparent transmission APDU acquisition modules are specifically for performing following steps:
Step a:Obtain the APDU parameter value recommendation lists that Modem logical channels are capable of transparent transmission;
Step b:APDU parameter values construction APDU is selected to consult sign on from the APDU parameter values recommendation list;
Step c:Send the APDU and consult sign on to SIM card, wherein the APDU consults in sign on P1P2 is preset value;
Step d:The return value of the SIM card is received, builds and confirms APDU instructions, during the confirmation APDU is instructed P1P2 is set to the return value;
Step e:Send and confirm that APDU is instructed to SIM card;
Step f:The success response that the SIM card is returned is being received, it is the transparent transmission to determine selected APDU parameter values APDU parameter values;Receiving the failure response that the SIM card is returned, return to step b.
Further, the mobile terminal also includes:
Transparent transmission APDU negotiation modules, the success response for not receiving SIM card return in the response parsing module disappears During breath, transparent transmission APDU parameter values are reacquired, so that the transparent transmission APDU package modules utilize the transparent transmission of the reacquisition APDU parameter values are packaged to the first APDU instructions.
The embodiment of the present invention additionally provides a kind of SIM card, including:
Transparent transmission APDU modules, the 2nd APDU instructions for receiving mobile terminal transmission, join according to the transparent transmission APDU of preservation Numerical value is parsed to the 2nd APDU instructions, obtains the first APDU instructions, will carry answering for the first APDU instructions The success response message of answer evidence is sent to the mobile terminal.
Further, the transparent transmission APDU modules are additionally operable to consult to determine the transparent transmission APDU parameters with the mobile terminal Value.
Embodiments of the invention have the advantages that:
In such scheme, the APDU for being actually needed transmission is instructed and is encapsulated in transparent transmission APDU instructions, will be saturating by Modem Pass APDU instruction is sent to SIM card so that realize by APDU instruction be sent to SIM card, need not to client carry out it is any On the premise of change, the success rate communicated between client and SIM card is improved.
Brief description of the drawings
Fig. 1 is the schematic diagram of Open Mobile API mechanisms in the prior art;
Fig. 2 is the schematic flow sheet of the data transmission method of the embodiment of the present invention;
Fig. 3 is another schematic flow sheet of the data transmission method of the embodiment of the present invention;
Fig. 4 is the mobile terminal of the embodiment of the present invention and the structured flowchart of SIM card;
Fig. 5 is the starting procedure schematic diagram of the mobile terminal of the embodiment of the present invention;
Fig. 6 is the idiographic flow schematic diagram of the data transmission method of the embodiment of the present invention;
Fig. 7 consults schematic flow sheet for the transparent transmission instruction of the embodiment of the present invention.
Embodiment
To make embodiments of the invention technical problem, technical scheme and the advantage to be solved clearer, below in conjunction with Drawings and the specific embodiments are described in detail.
Existing Open Mobile API definition mechanism is the ability using Modem transparent transmission APDU in logical channel, though What is so utilized is that logical channel between Modem and SIM card rather than main channel communicate, but is due to following two reasons, is caused Modem is difficult to use logical channel to other industries as a pass-through channel completely:
1st, be all at the beginning of all Modem designs in the world for moving communication, what Modem was supported 3GPP11.11,11.14, ETSI102.221,102.225 are all the specification in field of telecommunications without exception, so far majority Modem Producer does not know bank, public transport and Global Platform standards, and requirements of the Modem to logical channel is much from main channel Inherit or share with main channel, and telecommunications, bank, public transport before is all constituting criterion in respective field, wherein having unavoidably Conflict and inconsistent place;Such as 6310 return codes are very common in Bank application, but telecommunications is using from being not directed to, many Modem can be limited 6310 return codes;
2nd, ETSI102.221 also specify logical channel, and telecommunications is applied also many requirements in logical channel(Such as VerifyPIN, Get Response etc. is instructed), therefore Modem logical channel is not full through without any limitation
In view of Modem above-mentioned design architecture, Modem transparent transmission APDU abilities in logical channel are not fine.
In order to solve the above problems, embodiments of the invention provide a kind of data transmission method and mobile terminal, SIM card, The communication between the client and SIM card of different industry users can be realized.
The embodiment of the present invention provides a kind of data transmission method, the first APDU instructions of client are transferred into SIM Card, as shown in Fig. 2 methods described includes:
Step 201:The first APDU instructions are packaged according to the transparent transmission APDU parameter values of acquisition;
Step 202:The 2nd APDU after encapsulation is instructed SIM card is sent to by Modem;
Step 203:When receiving the success response message of SIM card return, success response message is parsed The reply data of SIM card, to result is sent into client after reply data progress logical process.
Further, also include before step 201:
Obtain the Modem of mobile terminal ability information;
Judge whether Modem supports the instruction of logical channel transparent transmission completely according to ability information;
When Modem not exclusively supports that logical channel transparent transmission is instructed, the corresponding transparent transmission APDU parameter values of SIM card are obtained.
Further, obtaining the corresponding transparent transmission APDU parameter values of SIM card includes:
Step a:Obtain the APDU parameter value recommendation lists that Modem logical channels are capable of transparent transmission;
Step b:APDU parameter values construction APDU is selected to consult sign on from the APDU parameter values recommendation list;
Step c:Send the APDU and consult sign on to SIM card, wherein the APDU consults in sign on P1P2 is preset value;
Step d:The return value of the SIM card is received, builds and confirms APDU instructions, during the confirmation APDU is instructed P1P2 is set to the return value;
Step e:Send and confirm that APDU is instructed to SIM card;
Step f:The success response that the SIM card is returned is being received, it is the transparent transmission to determine selected APDU parameter values APDU parameter values;Receiving the failure response that the SIM card is returned, return to step b.
Further, methods described also includes:
When not receiving the success response message of SIM card return, transparent transmission APDU parameter values are reacquired, to utilize The transparent transmission APDU parameter values for stating reacquisition are packaged to the first APDU instructions.
Such scheme is the operation performed by mobile terminal side in the data transmission method of the present invention, correspondingly, the present invention Embodiment additionally provides a kind of data transmission method, and the first APDU instructions of client are transferred into SIM card, the data are passed Transmission method is the operation performed by SIM card side, as shown in figure 3, methods described includes:
Step 301:Receive the 2nd APDU instructions that mobile terminal is sent;
Step 302:The 2nd APDU instructions are parsed according to the transparent transmission APDU parameter values of preservation, the first APDU is obtained and refers to Order;
Step 303:The success response message that the reply data of the first APDU instructions will be carried is sent to mobile terminal.
Further, also include before step 301:Consult to determine transparent transmission APDU parameter values with mobile terminal.
The data transmission method of the present invention, the APDU for being actually needed transmission is instructed and is encapsulated in transparent transmission APDU instructions, is led to Cross Modem and transparent transmission APDU instructions are sent to SIM card, APDU instructions are sent to SIM card so as to realize, need not be to client On the premise of end makes any change, the success rate communicated between client and SIM card is improved.
The embodiment of the present invention additionally provides a kind of mobile terminal, as shown in figure 4, mobile terminal includes:
Transparent transmission APDU package modules 44, are sealed for the transparent transmission APDU parameter values according to acquisition to the first APDU instructions Dress, the 2nd APDU after encapsulation is instructed and is sent to SIM card by Modem;
Parsing module 45 is responded, the success response message for receiving SIM card return is parsed to success response message The reply data of SIM card is obtained, and reply data is sent to standard Open MobileAPI modules;
Standard Open Mobile API modules 40, for being carried out to reply data after logical process, result is sent To client.
Further, mobile terminal also includes:
Modem abilities acquisition module 41, the ability information of the Modem for obtaining mobile terminal, sentences according to ability information Whether disconnected Modem supports the instruction of logical channel transparent transmission completely;
Transparent transmission APDU acquisition modules 42, for when Modem not exclusively supports that logical channel transparent transmission is instructed, obtaining SIM card Corresponding transparent transmission APDU parameter values.
Further, transparent transmission APDU acquisition modules 42 are specifically for performing following steps:
Step a:Obtain the APDU parameter value recommendation lists that Modem logical channels are capable of transparent transmission;
Step b:APDU parameter values construction APDU is selected to consult sign on from the APDU parameter values recommendation list;
Step c:Send the APDU and consult sign on to SIM card, wherein the APDU consults in sign on P1P2 is preset value;
Step d:The return value of the SIM card is received, builds and confirms APDU instructions, during the confirmation APDU is instructed P1P2 is set to the return value;
Step e:Send and confirm that APDU is instructed to SIM card;
Step f:The success response that the SIM card is returned is being received, it is the transparent transmission to determine selected APDU parameter values APDU parameter values;Receiving the failure response that the SIM card is returned, return to step b.
Further, mobile terminal also includes:
Transparent transmission APDU negotiation modules 43, the success response message for not receiving SIM card return in response parsing module When, transparent transmission APDU parameter values are reacquired, so that transparent transmission APDU package modules utilize the transparent transmission APDU parameter values pair reacquired First APDU instructions are packaged.
The embodiment of the present invention additionally provides a kind of SIM card, as shown in figure 3, the SIM card includes:
Transparent transmission APDU modules 46, the 2nd APDU instructions for receiving mobile terminal transmission, according to the transparent transmission APDU of preservation Parameter value is parsed to the 2nd APDU instructions, obtains the first APDU instructions, will carry the reply data of the first APDU instructions Success response message be sent to mobile terminal.
Further, transparent transmission APDU modules 46 are additionally operable to consult to determine transparent transmission APDU parameter values with mobile terminal.
In technical scheme, the APDU for being actually needed transmission is instructed and is encapsulated in transparent transmission APDU instructions by mobile terminal In, transparent transmission APDU instructions are sent to by SIM card by Modem, APDU instructions are sent to SIM card so as to realize, are not being needed On the premise of being made any change to client, the success rate communicated between client and SIM card is improved.
4-7 is further introduced the data transmission method of the present invention below in conjunction with the accompanying drawings:
In the embodiment of the present invention, the structure to mobile terminal and SIM card is improved, and standard is added in the terminal Open Mobile API modules 40, Modem abilities acquisition module 41, transparent transmission APDU acquisition modules 42, transparent transmission APDU negotiation modules 43rd, transparent transmission APDU package modules 44 and response parsing module 45, with the addition of transparent transmission APDU modules 46 in SIM card.
Wherein, the instruction interacted with SIM card that all clients are issued by standard Open MobileAPI modules by Reason, determines to use standard API processing modes or the transparent transmission mode of extension during by starting shooting to the configuration of the module;Modem energy Power acquisition module can obtain Modem ability information, and judge whether the Modem of this mobile terminal has according to the ability information Ability directly uses the Open MobileAPI modules of standard;It is corresponding that transparent transmission APDU acquisition modules 42 can obtain SIM card APDU parameter values are passed, transparent transmission APDU parameter values include the CLS that can pass through Modem APDU instructions(Classification byte)And INS(Instruction Byte)Value, both together decides on the type of message of machine card interface.Current embodiment require that being the configuration of transparent transmission APDU package modules CLS and INS, such transparent transmission APDU package modules can refer to the APDU that APDU instructions are encapsulated as being capable of transparent transmission according to CLS and INS Order;When transparent transmission APDU negotiation modules can obtain the failure of transparent transmission APDU parameter values in transparent transmission APDU acquisition modules, consult with SIM card Transparent transmission APDU parameter values are obtained again;Response parsing module can be parsed to the data that SIM card is returned.
The starting procedure figure of mobile terminal is illustrated in figure 5, is comprised the following steps:
Step 51:Mobile terminal-opening, uploads the IMEI of SIM card(International MobileEquipment Identity, International Mobile Equipment Identity code)And the version of mobile terminal is to the background system of mobile terminal, such as DM systems;
Step 52:Judge background system whether be stored with mobile terminal Modem ability information, if so, turn to step 53;If it is not, turning to step 54., can be in API because Modem module version is numerous, it is impossible to be managed in the terminal (Application Programming Interface, application programming interface)Middle extension Modem ability acquisition modules are borrowed Background system is helped, Modem ability is obtained;
Step 53:Modem abilities acquisition module obtains Modem ability information, and this movement is judged according to the ability information Whether the Modem of terminal has the ability directly to use the Open MobileAPI modules of standard, if so, then standard Open Mobile API module need not do any change, can directly invoke AT instructions and be communicated with Modem;If Modem is not supported or indefinite branch Open MobileAPI mechanism is held, then needs notice standard Open Mobile API modules to need to encapsulate by transparent transmission APDU Module turns to step 54 to Modem transmission APDU instructions;
Step 54:The APDU that what all clients were issued interact with SIM card is instructed by standard OpenMobile API Module is accepted, therefore it is using standard API processing modes or extension to need in start to configure the module to determine Transparent transmission mode.Modem do not support or indefinite support OpenMobile API mechanism when, it is necessary to notify standard Open The encapsulation and response that Mobile API modules need to carry out APDU by transparent transmission APDU modules are parsed;
Step 55:SIM card IMSI is obtained, by transparent transmission APDU acquisition modules, the corresponding transparent transmission APDU ginsengs of the SIM card are obtained Numerical value, transparent transmission APDU parameter values include the CLS that can pass through Modem APDU instructions(Classification byte)And INS(Command byte)'s Value, both together decides on the type of message of machine card interface.Current embodiment require that for transparent transmission APDU package modules configuration CLS and APDU can be instructed and is encapsulated as the APDU for being capable of transparent transmission instructions by INS, such transparent transmission APDU package modules according to CLS and INS;
Step 56:Judge whether to obtain in transparent transmission APDU parameter values, the step and to be looked into by transparent transmission APDU acquisition modules Ask whether SIM card has variation, whether can obtain above successfully transparent transmission APDU parameter values, if so, turning to step 57;If it is not, Turn to step 58;
Step 57:CLS, INS of the transparent transmission instruction of previous Successful transmissions are obtained, and notifies transparent transmission APDU wind revolving die blocks to make With.
Step 58:Call transparent transmission APDU negotiation modules to obtain CLS, INS of the transparent transmission instruction that can be used, and notify transparent transmission APDU wind revolving die blocks are used.
Because the APDU transmitted in logical channel is instructed for all trades and professions, each industry defines also phase not to the utmost to APDU Together, instructed it is difficult to define fixed CLS, an INS for transparent transmission APDU, it is therefore desirable to which a set of negotiation mechanism is dynamically found out Modem and SIM card Applet can be passed through at present(Applet)Transparent transmission APDU instruction CLS, INS, as shown in fig. 6, The negotiations process comprises the following steps:
Possible transparent transmission in the Modem logical channels is obtained from background system by Modem abilities acquisition module first CLS, INS recommendation list.When forming CLS, INS recommendation list, it is necessary to by the strength of platform side, remove sector application obvious APDU, the APDU of specific Modem products refusal CLS, the INS used, CLS, the INS for forming a transparent transmission APDU recommend List.In each consult, by Modem ability acquisition modules background system can be gone to obtain this recommendation list, this recommendation The content of list can change with deepening continuously for sector application.
Transparent transmission APDU acquisition modules select to plan to transmit CLS, the INS used from CLS, INS recommendation list, utilize selection CLS, INS build transparent transmission APDU as instruction head and consult sign on, in the instruction, P1P2 is default particular value, Len= 0, transparent transmission APDU negotiations sign on is sent to SIM card afterwards.
If there is Applet to recognize that transparent transmission APDU consults sign in SIM card, define and return according to Applet;Such as There is no Applet to recognize that transparent transmission APDU consults sign in fruit SIM card, then pass at transparent transmission APDU modules Reason, because now transparent transmission APDU negotiations sign on has been able to normally pass through Modem, therefore transparent transmission APDU modules can be recorded One state and the return code for returning to the non-9XXX/6XXX defined in an ETSI102.221 at random(This is able to success Transparent transmission crosses Modem).
Mobile terminal is received after the return code, and return code is inserted into P1P2, is continued to use a transparent transmission APDU and is consulted to start CLS, INS in instruction, which are built, confirms APDU instructions, and will confirm that APDU instructions are sent to SIM card.
If there is Applet to recognize that confirmation APDU is instructed in SIM card, error code is returned;If do not had in SIM card Applet recognizes that confirmation APDU is instructed, then passes to transparent transmission APDU modules and handled, transparent transmission APDU modules can be entered after receiving Row is compared, if CLS, INS of confirmation APDU instructions consult CLS, INS mono- in sign on a upper transparent transmission APDU Cause, and this P1P2 value confirmed in APDU instructions is the return code of last time, it is determined that CLS, the INS are instructed as APDU transparent transmissions Modem and SIM card Applet can be passed through, can subsequently be used, 9000 mobile terminals are returned.
If the return value that mobile terminal is received is 9000, illustrate that CLS, INS for currently selecting can be used in transparent transmission APDU is instructed;If the return value that mobile terminal is received is not 9000, mobile terminal need repeat the above steps, from CLS, CLS, the INS for planning to transmit and using are reselected in INS recommendation lists.
After acquisition can be used in CLS, INS of transparent transmission APDU instructions, you can realize logical between client and SIM card Letter, as shown in fig. 7, the data transmission method of the present invention specifically includes following steps:
Step 701:Client call standard Open Mobile API modules transmit data, all clients to SIM card The APDU interacted with SIM card the instructions issued are accepted by standard Open Mobile API modules;
Step 702:Judge whether to need to call transparent transmission APDU modules to carry out data transmission, if so, turning to step 704;If It is no, turn to step 703;
By mobile terminal-opening when may decide that it is to use standard API to the configurations of standard Open Mobile API modules The transparent transmission mode that processing mode still extends.If the module be configured to use standard API processing modes, turn to step 703;If using the transparent transmission mode of extension, turning to step 704;
Step 703:Notice standard Open Mobile API modules directly invoke AT instructions and communicated with Modem;
Step 704:The APDU transmitted instructions are needed to be sent to transparent transmission APDU package modules client;
Step 705:Transparent transmission APDU package modules be sealed with CLS, the INS that can pass through Modem to original APDU instructions Dress;
In the transparent transmission mode using extension, it is necessary to call transparent transmission APDU package modules to be used to APDU instructions to be passed Under mode encapsulate
Wherein, CLS, INS are the CLS, the INS that can be used in transparent transmission APDU instructions obtained by step shown in Fig. 6.
Step 706:Transparent transmission APDU package modules call AT+CGLA to instruct, and the APDU after encapsulation is transmitted to Modem and is instructed;
Step 707:The APDU instructions whether Modem is delivered successfully after encapsulation are judged, if so, turning to step 708;If it is not, Turn to step 709;
For the APDU instructions after encapsulation, instructed and issued to Modem by 3GPP27.007AT+CGLA, if Modem is not Successfully issue the instruction or SIM card have rejected the instruction(Return code non-9000), that is, prove CLS, INS used in transparent transmission APDU Modem or SIM card can not successfully be passed through(For example this transmission still uses CLS, INS of last time success transparent transmission, but during this period It is new in SIM card that application is installed, and the application conflicts with CLS, INS of last time success transparent transmission, so as to cause this to fail), it is necessary to CLS, INS that transparent transmission APDU negotiation modules consult a set of transparent transmission that can succeed again are re-called, step 708 is turned to.
If the APDU instructions after encapsulation can successfully be pass-through to SIM card, when SIM card Applet does not recognize CLS, the INS After need to call transparent transmission APDU modules in SIM card to be parsed, transparent transmission APDU modules compare itself current storage be used for it is transparent CLS, INS of transmission, if unanimously, removing CLS, INS, P1, P2, the data in Data only being returned into SIM card Applet Carry out subsequent treatment;If it is inconsistent, thinking to be not intended to transparent transmission, return to SIM card Applet and carry out error handle (Such as return to the CLS/INS mistakes do not supported).
After SIM card Applet terminates to instruction processing, reply data is still given transparent transmission APDU modules in SIM card and sealed Dress, regardless of Applet results, transparent transmission APDU modules all add 9000 success status words after original reply data Return, to pass through Modem.
Step 708:Judge whether SIM card successfully returns to 9000 yards and reply data, if so, turning to step 711;If it is not, Turn to step 709;
Step 709:Transparent transmission APDU negotiation modules are called, is reacquired by step shown in Fig. 6 and can be used in transparent transmission APDU CLS, INS of instruction;
Step 710:Transparent transmission APDU package modules are notified using CLS, the INS newly consulted, to turn to step 705;
Step 711:Response parsing module is called, the reply data that SIM card is returned is sent to standard OpenMobile API module;
9000 status words that Modem returns to Applet+response is the response parsing mould that data are sent in mobile terminal Block, is removed after 9000 status words by response parsing module, reply data is sent into standard OpenMobile API modules.
Step 712:Standard Open Mobile API modules carry out logical process to reply data and return to result To client.
The data transmission method of the present invention, the APDU for being actually needed transmission is instructed and is encapsulated in transparent transmission APDU instructions, is led to Cross Modem and transparent transmission APDU instructions are sent to SIM card, APDU instructions are sent to SIM card so as to realize, need not be to client On the premise of end makes any change, the success rate communicated between client and SIM card is improved.With existing Open Mobile API standards are compared, and enhance the adaptability to different industries, and the client of different industries may have access to the card of SIM card Using in the absence of any compatibility issue
This many functional part described in this description is all referred to as module, specifically to emphasize its realization side The independence of formula.
In the embodiment of the present invention, module can be realized with software, so as to by various types of computing devices.Citing comes Say, the executable code module of a mark can include the one or more physics or logical block of computer instruction, illustrate For, it can be built as object, process or function.Nevertheless, the executable code of institute's mark module is without physically It is located together, but can includes being stored in different different instructions physically, is combined together when in these command logics When, its regulation purpose for constituting module and realizing the module.
In fact, executable code module can be the either many bar instructions of individual instructions, and it can even be distributed On multiple different code segments, it is distributed among distinct program, and is distributed across multiple memory devices.Similarly, grasp Making data can be identified in module, and can be realized according to any appropriate form and be organized in any appropriate class In the data structure of type.The peration data can be collected as individual data collection, or can be distributed on diverse location (It is included in different storage device), and only can be present at least in part as electronic signal in system or network.
When module can be realized using software, it is contemplated that the level of existing hardware technique, it is possible to implemented in software Module, in the case where not considering cost, those skilled in the art can build corresponding hardware circuit realize correspondence Function, the hardware circuit includes conventional ultra-large integrated(VLSI)Circuit or gate array and such as logic core The existing semiconductor of piece, transistor etc either other discrete elements.Module can also use programmable hardware device, such as Field programmable gate array, programmable logic array, programmable logic device etc. are realized.
In each method embodiment of the present invention, the priority that the sequence number of each step can not be used to limit each step is suitable Sequence, for those of ordinary skill in the art, on the premise of not paying creative work, the priority to each step changes Within protection scope of the present invention.
Described above is the preferred embodiment of the present invention, it is noted that for those skilled in the art For, on the premise of principle of the present invention is not departed from, some improvements and modifications can also be made, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (12)

1. a kind of data transmission method, the first APDU instructions of client are transferred into SIM card, it is characterised in that described Method includes:
The first APDU instructions are packaged according to the transparent transmission APDU parameter values of acquisition;
The 2nd APDU after encapsulation is instructed SIM card is sent to by Modem;
When receiving the success response message that the SIM card is returned, the success response message parse to obtain SIM card Reply data, result is sent to client after carrying out logical process to the reply data.
2. data transmission method according to claim 1, it is characterised in that the transparent transmission APDU parameter values according to acquisition Also include before being packaged to the first APDU instructions:
Obtain the Modem of mobile terminal ability information;
Judge whether the Modem supports the instruction of logical channel transparent transmission completely according to the ability information;
When the Modem not exclusively supports that logical channel transparent transmission is instructed, the corresponding transparent transmission APDU parameters of the SIM card are obtained Value.
3. data transmission method according to claim 2, it is characterised in that the corresponding transparent transmission of the acquisition SIM card APDU parameter values include:
Step a:Obtain the APDU parameter value recommendation lists that Modem logical channels are capable of transparent transmission;
Step b:APDU parameter values construction APDU is selected to consult sign on from the APDU parameter values recommendation list;
Step c:Send the APDU and consult sign on to SIM card, wherein the P1P2 that the APDU consults in sign on is Preset value;
Step d:The return value of the SIM card is received, builds and confirms APDU instructions, the P1P2 during the confirmation APDU is instructed is set For the return value;
Step e:Send and confirm that APDU is instructed to SIM card;
Step f:The success response that the SIM card is returned is being received, it is the transparent transmission APDU to determine selected APDU parameter values Parameter value;Receiving the failure response that the SIM card is returned, return to step b.
4. data transmission method according to claim 1, it is characterised in that methods described also includes:
When not receiving the success response message of SIM card return, transparent transmission APDU parameter values are reacquired, it is described heavy to utilize The transparent transmission APDU parameter values newly obtained are packaged to the first APDU instructions.
5. a kind of data transmission method, the first APDU instructions of client are transferred into SIM card, it is characterised in that described Method includes:
Receive the 2nd APDU instructions that mobile terminal is sent;
The 2nd APDU instructions are parsed according to the transparent transmission APDU parameter values of preservation, the first APDU instructions are obtained;
The success response message that the reply data of the first APDU instructions will be carried is sent to the mobile terminal.
6. data transmission method according to claim 5, it is characterised in that the second of the reception mobile terminal transmission Also include before APDU instructions:
Consult to determine the transparent transmission APDU parameter values with the mobile terminal.
7. a kind of mobile terminal, it is characterised in that including:
Transparent transmission APDU package modules, are packaged to the first APDU instructions for the transparent transmission APDU parameter values according to acquisition, will seal The 2nd APDU instructions after dress are sent to SIM card by Modem;
Parsing module is responded, for receiving the success response message that the SIM card is returned, the success response message is solved Analysis obtains the reply data of SIM card, and the reply data is sent into standard Open Mobile API modules;
The standard Open Mobile API modules, for being carried out to the reply data after logical process, result is sent out Give client.
8. mobile terminal according to claim 7, it is characterised in that the mobile terminal also includes:
Modem ability acquisition modules, the ability information of the Modem for obtaining mobile terminal judges according to the ability information Whether the Modem supports the instruction of logical channel transparent transmission completely;
Transparent transmission APDU acquisition modules, for when the Modem not exclusively supports that logical channel transparent transmission is instructed, obtaining the SIM Block corresponding transparent transmission APDU parameter values.
9. mobile terminal according to claim 8, it is characterised in that the transparent transmission APDU acquisition modules are specifically for performing Following steps:
Step a:Obtain the APDU parameter value recommendation lists that Modem logical channels are capable of transparent transmission;
Step b:APDU parameter values construction APDU is selected to consult sign on from the APDU parameter values recommendation list;
Step c:Send the APDU and consult sign on to SIM card, wherein the P1P2 that the APDU consults in sign on is Preset value;
Step d:The return value of the SIM card is received, builds and confirms APDU instructions, the P1P2 during the confirmation APDU is instructed is set For the return value;
Step e:Send and confirm that APDU is instructed to SIM card;
Step f:The success response that the SIM card is returned is being received, it is the transparent transmission APDU to determine selected APDU parameter values Parameter value;Receiving the failure response that the SIM card is returned, return to step b.
10. mobile terminal according to claim 7, it is characterised in that the mobile terminal also includes:
Transparent transmission APDU negotiation modules, for it is described response parsing module do not receive SIM card return success response message when, Transparent transmission APDU parameter values are reacquired, so that the transparent transmission APDU package modules utilize the transparent transmission APDU parameters of the reacquisition Value is packaged to the first APDU instructions.
11. a kind of SIM card, it is characterised in that including:
Transparent transmission APDU modules, the 2nd APDU instructions for receiving mobile terminal transmission, according to the transparent transmission APDU parameter values of preservation 2nd APDU instructions are parsed, the first APDU instructions are obtained, the answer number of the first APDU instructions will be carried According to success response message be sent to the mobile terminal.
12. SIM card according to claim 11, it is characterised in that
The transparent transmission APDU modules are additionally operable to consult to determine the transparent transmission APDU parameter values with the mobile terminal.
CN201210526471.7A 2012-12-07 2012-12-07 Data transmission method and mobile terminal, SIM card Active CN103874054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210526471.7A CN103874054B (en) 2012-12-07 2012-12-07 Data transmission method and mobile terminal, SIM card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210526471.7A CN103874054B (en) 2012-12-07 2012-12-07 Data transmission method and mobile terminal, SIM card

Publications (2)

Publication Number Publication Date
CN103874054A CN103874054A (en) 2014-06-18
CN103874054B true CN103874054B (en) 2017-09-15

Family

ID=50912103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210526471.7A Active CN103874054B (en) 2012-12-07 2012-12-07 Data transmission method and mobile terminal, SIM card

Country Status (1)

Country Link
CN (1) CN103874054B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10003959B2 (en) * 2015-07-30 2018-06-19 Qualcomm Incorporated Subscriber identity module (SIM) access profile (SAP)
CN109219038B (en) * 2018-09-27 2022-06-10 努比亚技术有限公司 eSIM card operation method, mobile terminal and eSIM card device
CN109257739B (en) * 2018-09-27 2022-02-22 努比亚技术有限公司 eSIM card operation method, mobile terminal and eSIM card device
CN111818510B (en) * 2020-06-16 2022-02-11 郑州信大捷安信息技术股份有限公司 Multi-channel communication system and method based on safe intelligent thin film card
CN113518341B (en) * 2021-04-13 2022-05-10 武汉天喻信息产业股份有限公司 eSIM code number management method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000594A (en) * 2007-01-08 2007-07-18 中国信息安全产品测评认证中心 Smart card and USB combined equipment and method for communication with computer
CN101384037A (en) * 2007-09-07 2009-03-11 凤凰微电子(中国)有限公司 Establishing method for special data channel between mobile application and intelligent card
CN101400164A (en) * 2007-09-29 2009-04-01 凤凰微电子(中国)有限公司 Smart card, system and method for realizing deployment customized service
CN102547661A (en) * 2011-12-16 2012-07-04 北京握奇数据系统有限公司 Method and device for establishing communication between Android system and telecommunications smart card

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120114116A1 (en) * 2010-11-09 2012-05-10 RetailGreen Apparatus and method for storing electronic receipts on a unified card

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000594A (en) * 2007-01-08 2007-07-18 中国信息安全产品测评认证中心 Smart card and USB combined equipment and method for communication with computer
CN101384037A (en) * 2007-09-07 2009-03-11 凤凰微电子(中国)有限公司 Establishing method for special data channel between mobile application and intelligent card
CN101400164A (en) * 2007-09-29 2009-04-01 凤凰微电子(中国)有限公司 Smart card, system and method for realizing deployment customized service
CN102547661A (en) * 2011-12-16 2012-07-04 北京握奇数据系统有限公司 Method and device for establishing communication between Android system and telecommunications smart card

Also Published As

Publication number Publication date
CN103874054A (en) 2014-06-18

Similar Documents

Publication Publication Date Title
CN103460756B (en) Handling method of switching downlink packet transmission between two different PLMN on multiple USIM UE
CN103874054B (en) Data transmission method and mobile terminal, SIM card
US9332577B2 (en) Method and system for implementing smart card remote operation
CN103108311B (en) A kind of MTC device and the method, apparatus and system of UICC bindings
CN102724315B (en) The remote-operated method and system of smart card are realized based on smart card web page server
CN104685958B (en) The RRC connection improved in mobile communication terminals is established
MXPA02007601A (en) Method and apparatus for providing configurable layers and protocols in a communications system.
CN102792648A (en) Congestion level indication with explicit congestion notification in communication systems
WO2007058241A1 (en) (u)sim card in server mode, and communication method with client
WO2003090433A1 (en) Method and system for providing authentication of a mobile terminal in a hybrid network for data and voice services
CN109756951A (en) Method and user equipment for network selection
CN104205933A (en) Seamless transition of a cellular telephone from cellular to Wi-Fi communication
CN105578450A (en) Flow control method and apparatus thereof
TW200526055A (en) Sessions in a communication system
CN110324808A (en) Switching method, device and the mobile terminal of configuration file
CN101743766A (en) Method and apparatus for data transmission in an unlicensed mobile access network
CN109246690A (en) Method for network access, device, storage medium and processor
CN104769906A (en) Data transmission method, user device and proxy device
CN100399846C (en) Data access method for mobile communication terminal
CN116614172A (en) Satellite communication method, nonvolatile storage medium, and electronic device
CN105554729A (en) Data transmission unit based on embedded UICC card
CN102438273B (en) Method and relevant device for Internet protocol (IP) communication among cluster network elements as well as communication system
US20140177575A1 (en) Method for establishing an application session, device and corresponding notification
CN108986828A (en) Call establishment method and device, storage medium, electronic device
CN108307522B (en) Method and device for processing radio bearer, terminal and base station

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant