[go: up one dir, main page]

CN101483939B - Method and device for identifying terminal card - Google Patents

Method and device for identifying terminal card Download PDF

Info

Publication number
CN101483939B
CN101483939B CN2008100558421A CN200810055842A CN101483939B CN 101483939 B CN101483939 B CN 101483939B CN 2008100558421 A CN2008100558421 A CN 2008100558421A CN 200810055842 A CN200810055842 A CN 200810055842A CN 101483939 B CN101483939 B CN 101483939B
Authority
CN
China
Prior art keywords
card
terminal
pps
card type
suggested
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
CN2008100558421A
Other languages
Chinese (zh)
Other versions
CN101483939A (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.)
Leadcore Technology Co Ltd
Original Assignee
Leadcore Technology 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 Leadcore Technology Co Ltd filed Critical Leadcore Technology Co Ltd
Priority to CN2008100558421A priority Critical patent/CN101483939B/en
Publication of CN101483939A publication Critical patent/CN101483939A/en
Application granted granted Critical
Publication of CN101483939B publication Critical patent/CN101483939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for identifying a terminal card, which comprises the following steps: the terminal card sends a reset response ATR to the terminal, and bytes used for indicating the card type suggested by the terminal card are preset in the reset response ATR; and the terminal sends the instruction corresponding to the suggested card type to the terminal card, judges whether the information on the terminal card is the application information corresponding to the instruction, and determines the suggested card type as the card type of the terminal card if the information on the terminal card is the application information corresponding to the instruction. The invention also discloses a device for identifying the terminal card. The invention can ensure that the terminal directly obtains the card type supported by the terminal card.

Description

Method and device for identifying terminal card
Technical Field
The present invention relates to mobile communication technologies, and in particular, to a method and an apparatus for identifying a terminal card.
Background
The conventional Universal Integrated Circuit Card (UICC) for mobile communication may be classified into: subscriber Identity Module (SIM) card and Universal Subscriber Identity Module (USIM) card; the SIM card may include a User Identity Module (UIM) card of Code-Division Multiple Access (CDMA).
After the dual-mode terminal is inserted into the UICC card, the dual-mode terminal is powered on, sends a reset request to the terminal card and waits for a reset response ATR sent by the terminal card. The ATR may carry some electrical characteristic parameters supported by the terminal card, such as clock rate conversion factor FI, baud rate adjustment factor DI, programming current I voltage value U, extra protection time N, clock stop mode X, and transmission protocol parameter T.
After the dual-mode terminal obtains the ATR, the dual-mode terminal may determine whether to perform a Protocol Parameter Selection (PPS) process according to parameters carried by the ATR, so as to further determine specific parameters used in communication with the terminal card, such as a transmission Protocol type, a clock rate conversion factor FI, a baud rate adjustment factor DI, and an extra protection time N. The PPS process is an optional process, and the PPS process is further executed only when a preset condition for triggering the PPS process in the prior art is satisfied. The preset conditions may include: the terminal card supports more than 2 transmission protocol types; or the frequency and the baud rate supported by the terminal card are different from the default frequency and the baud rate of the transmission protocol; alternatively, the protection time of the terminal card is FF.
However, after the initial communication ATR and PPS is completed, the card type of the terminal card corresponding to the dual mode terminal cannot be determined. Therefore, in the prior art, the dual-mode terminal usually tries to send different commands to the terminal card so as to identify the card type of the terminal card, specifically: and sending a USIM instruction or SIM instruction terminal card, and further judging whether the terminal card has a correct response, namely identifying the card type of the terminal card by the USIM response or SIM response corresponding to the USIM instruction or SIM instruction. In addition, the dual-mode terminal needs to determine, in combination with the application characteristics of the terminal card, for example, if the terminal card is an SIM, it needs to determine whether the terminal card contains global system for mobile communications (GSM) service related files and whether other related critical files exist and are valid. As for how to judge, each terminal manufacturer can design a corresponding judgment rule according to the capability of the terminal, and no unified standard or principle exists.
Normally, the SIM card must respond to the SIM command and must contain GSM service related files (such as DF _7F20 or DF _7F 21); the USIM card must respond to the USIM command and must contain a 3G application (admuisim). However, the 3GPP protocol does not enforce a one-to-one correspondence between the terminal card and the command, for example, the SIM card may also support the USIM command, the USIM card may also support the SIM command, the USIM card may also include the GSM application, and the like. Thus, the method of the prior art which attempts to send different commands to identify the type of the terminal card has the following problems:
first, there is a possibility that an abnormality may occur by way of an instruction attempt, resulting in erroneous determination. Early versions of the USIM cards on the market today, which communicate with the ATR using the rates supported in the ATR, are prone to respond for long periods of time or fail to respond properly within the validity time specified by the protocol. This phenomenon, which is the same as some SIM cards failing to respond to USIM commands, makes it difficult for the dual-mode terminal to correctly distinguish whether the SIM card or the USIM card is used in such abnormal situations.
Second, trying different commands may affect the state of the terminal card. For example, some terminal cards can support SIM and USIM commands, but once one command is selected, there is typically no response to the other command, subject to the first attempted command. Thus, if there are different types of command switching, the terminal card may not respond correctly, and the terminal card may not be identified and used normally.
Third, trying different instructions places additional burden. Some terminal cards must be reset in different types of command switching, otherwise the commands cannot be responded correctly. Thus, these additional operations such as resetting may not be compatible with the consistency test of the terminal network access, thereby bringing an irreconcilable contradiction to the compatibility and the standardization of the dual-mode terminal.
Disclosure of Invention
The embodiment of the invention provides a method and a device for identifying a terminal card, so that a terminal can directly obtain a card type supported by the terminal card.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of identifying a terminal card, comprising:
the terminal card sends a reset response ATR to the terminal, and bytes used for indicating the card type suggested by the terminal card are preset in the reset response ATR;
and the terminal sends the instruction corresponding to the suggested card type to the terminal card, judges whether the information on the terminal card is the application information corresponding to the instruction, and determines the suggested card type as the card type of the terminal card if the information on the terminal card is the application information corresponding to the instruction.
Preferably, when the preset byte specifically indicates the card type suggested by the terminal card, it is further determined whether the terminal enforces a protocol parameter selection PPS process with the terminal card, and if so, before the terminal sends an instruction corresponding to the suggested card type to the terminal card, the method further includes:
the terminal sends a PPS request to the terminal card;
the terminal card sends a PPS response corresponding to the PPS request to the terminal, and bytes used for indicating the terminal card to suggest the preferred card type of the terminal are preset in the PPS response;
and when the preferred card type is consistent with the suggested card type, further verifying the suggested card type of the terminal card.
Preferably, when the preset byte does not specifically indicate the card type suggested by the terminal card, it is further determined whether the terminal enforces the PPS process with the terminal card, and if so, before the terminal sends an instruction corresponding to the suggested card type to the terminal card, the method further includes:
the terminal sends a PPS request to the terminal card;
the terminal card sends a PPS response corresponding to the PPS request to the terminal, and bytes used for indicating the terminal card to suggest the preferred card type of the terminal are preset in the PPS response;
and determining the preferred card type as the card type suggested by the terminal card.
Preferably, when the preset byte does not specifically indicate the card type suggested by the terminal card, further determining whether a preset condition for triggering the PPS process is satisfied, and if so, before the terminal sends an instruction corresponding to the suggested card type to the terminal card, further including:
the terminal sends a PPS request to the terminal card;
the terminal card sends a PPS response corresponding to the PPS request to the terminal, and bytes used for indicating the terminal card to suggest the preferred card type of the terminal are preset in the PPS response;
and determining the preferred card type as the card type suggested by the terminal card.
Preferably, when the information on the terminal card is not the application information corresponding to the instruction, the method further includes:
trying to use other UICC instructions except the instruction, and if the information on the terminal card is application information corresponding to the other UICC instructions, determining the card type corresponding to the other UICC instructions as the card type of the terminal card.
An apparatus for identifying a terminal card, comprising: the terminal card, the card type suggestion unit and the card type determination unit; wherein,
the terminal card is used for carrying preset bytes indicating the card type suggested by the terminal card in a reset response ATR and sending the bytes to the card type suggestion unit;
the card type suggesting unit is used for determining the card type suggested by the terminal card according to a preset byte indicating the card type suggested by the terminal card in the answer-to-reset ATR after receiving the answer-to-reset ATR, and sending a first determination message to the card type determining unit;
the card type determining unit is used for sending the instruction corresponding to the suggested card type to the terminal card after receiving the first determination notification, and determining the suggested card type as the card type of the terminal card when the information on the terminal card is the application information corresponding to the instruction.
Preferably, the device further comprises a judging unit and a PPS requesting unit; wherein,
the judging unit is used for judging whether to enforce the PPS process with the terminal card when the card type suggested by the terminal card is specifically determined by the card type suggesting unit, and if so, sending a PPS notification to the PPS requesting unit;
the PPS request unit sends a PPS request to the terminal card after receiving the PPS notification;
the terminal card is used for sending a PPS response corresponding to the PPS request to the card type suggesting unit after receiving the PPS request, and bytes used for indicating the preferred card type of the terminal suggested by the terminal card are preset in the PPS response;
and the card type suggesting unit is used for further verifying the card type suggested by the terminal card when the preferred card type is consistent with the suggested card type after receiving the PPS response.
Preferably, the determining unit is further configured to determine whether to enforce a PPS process with the terminal card when the card type suggested by the card type suggesting unit does not specifically determine the card type suggested by the terminal card, and if so, send a PPS notification to the PPS requesting unit;
the PPS request unit sends a PPS request to the terminal card after receiving the PPS notification;
the terminal card is used for sending a PPS response corresponding to the PPS request to the card type suggesting unit after receiving the PPS request, and bytes used for indicating the preferred card type of the terminal suggested by the terminal card are preset in the PPS response;
and the card type suggesting unit is used for determining the preferred card type as the card type suggested by the terminal card after receiving the PPS response.
Preferably, the determining unit is further configured to determine whether a preset condition for triggering a PPS process is met when the card type suggested by the terminal card is not specifically determined by the card type suggesting unit, and if so, send a PPS notification to the PPS requesting unit; judging whether the PPS response is consistent with the PPS request according to a judgment notice from the terminal card, if so, indicating that the PPS process is successful, and sending a suggestion notice to the card type suggestion unit;
the PPS request unit sends a PPS request to the terminal card after receiving the PPS notification;
the terminal card is also used for sending a PPS response corresponding to the PPS request to the card type suggesting unit, presetting bytes used for indicating the preferred card type of the terminal suggested by the terminal card in the PPS response, and sending a judgment notice to the judgment unit;
the card type suggesting unit is further configured to determine the preferred card type as the card type suggested by the terminal card after receiving the suggestion notification.
Preferably, the judging unit is further configured to send a third determination notification to the card type determining unit when the information on the terminal card is not the application information corresponding to the instruction;
the card type determining unit is further configured to try other UICC instructions except the instruction, and determine a card type corresponding to the other UICC instruction as a card type of the terminal card when the information on the terminal card is application information corresponding to the other UICC instruction.
According to the technical scheme, the terminal card sends the reset response ATR to the terminal, and bytes for indicating the card type suggested by the terminal card are preset in the reset response ATR; the terminal sends an instruction corresponding to the card type suggested by the terminal card to the terminal card, judges whether the information on the terminal card is the application information corresponding to the instruction, and if so, determines the suggested card type as the card type of the terminal card. Compared with the prior art, the embodiment of the invention can directly obtain the card type supported by the terminal card without trying different instructions, so that the embodiment of the invention can reduce the risk of misjudging the terminal card to the maximum extent, can also reduce extra burden, greatly improves the coupling degree of the terminal and the terminal card and the application information in the terminal and the terminal card, and further improves the compatibility of the terminal and the terminal card.
Drawings
FIG. 1 is a diagram illustrating a structure of a byte TD (i) in the prior art;
FIG. 2 is a block diagram of an interface byte TB (i +1) according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for identifying a terminal card according to an embodiment of the present invention;
fig. 4 is a flowchart of a specific method for identifying a terminal card according to an embodiment of the present invention;
fig. 5 is a structural diagram of a device for identifying a terminal card according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples.
The embodiment of the invention mainly comprises the following steps: the terminal card sends a reset response ATR to the dual-mode terminal, and bytes used for indicating the card type suggested by the terminal card are preset in the reset response ATR; the dual-mode terminal sends the instruction corresponding to the card type suggested by the terminal card to the terminal card, judges whether the information on the terminal card is the application information corresponding to the instruction, and if so, determines the suggested card type as the card type of the terminal card, which can ensure that the dual-mode terminal directly obtains the card type supported by the terminal card instead of obtaining the card type supported by the terminal card in an attempt mode, thereby reducing the risk of misjudgment to the maximum extent and reducing the extra burden.
In the embodiment of the present invention, the byte preset in the ATR for indicating the card type suggested by the terminal card should not be specific to a certain transmission protocol, so that this byte should appear in the global interface byte, i.e., in the next group of interface bytes indicated by interface bytes td (i) (i > 1) where T ═ 15.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a byte td (i) in the prior art. As shown in fig. 1, bits b8 through b5 are used to indicate whether the next set of interface bytes exists, for example, b5 ═ 1, which indicates that TA (i +1) exists; b5 is 0, indicating that TA (i +1) is not present. Bits b4 through b1 are used to indicate the value of the transport protocol parameter T, where T15 is used to indicate that the next set of interface bytes is global, otherwise it indicates that the next set of interface bytes is specific to a certain transport protocol. Specifically, in TD (1), T is generally prohibited from being 15. When TD (1) does not exist, it is determined that the next set of interface bytes does not exist, and the transmission protocol parameter T is determined to be 0. In fact, only two transmission protocols, T-0 and T-1, are in practical use. Of course, if TD (i) does not exist, interface bytes TA (i +1), TB (i +1), TC (i +1), and TD (i +1) also do not exist.
It can be seen that the number of interface bytes meeting the above condition is 3: TA (i +1), TB (i +1), TC (i + 1). However, TA (i +1) has been used in the 3GPP protocol for indicating the clock stop mode and class. Therefore, the embodiment of the present invention may use the byte TB (i +1) or TC (i +1) to indicate the preferred card type suggested by the terminal card. In the embodiment of the present invention, TB (i +1) (i > 1) is taken as an example, and how to express the embodiment is shown in fig. 2.
FIG. 2 is a schematic structural diagram of an interface byte TB (i +1), i > 1 in the embodiment of the present invention. As shown in fig. 2, when TB (i +1) is equal to 00, TB (i +1) indicates that the terminal card does not suggest what type of command the dual mode terminal employs, so that the dual mode terminal can identify the card type of the terminal card according to the prior art method. When TB (i +1) is equal to 01, TB (i +1) indicates that the current terminal card is a UICC supporting USIM instructions, so that the card type suggested by the terminal card is a USIM card. When TB (i +1) is equal to 10, TB (i +1) indicates that the current terminal card is a UICC supporting SIM command, so the proposed card type of the terminal card is a SIM card. When TB (i +1) (i > 1) is equal to 11, indicating that the current terminal card is a UICC card supporting USIM or SIM instructions, so that the suggested card types of the terminal card are as follows: USIM card or SIM card.
In addition, in the embodiment of the present invention, in addition to three preset conditions for triggering the PPS process in the prior art, a condition for triggering the PPS process, that is, a terminal forced triggering, is added. The terminal is forced to trigger whether the card type of the terminal card can be determined according to the information in the ATR or not, and the PPS process is executed as long as the terminal is forced to perform the PPS process with the terminal card.
The PPS process specifically comprises the following steps: the terminal sends a PPS request to the terminal card, the terminal card sends a PPS response corresponding to the PPS request to the terminal, and when the PPS request is consistent with the PPS response, the PPS is indicated to be successful. In the embodiment of the present invention, the card type indicating the terminal card to suggest the terminal is preset in the PPS response, and in a general case, the card type indicating the terminal card to suggest the terminal may be indicated by using the idle PPS 3. For example, when the PPS3 is 01, the terminal card is instructed to suggest that the card type of the terminal is a USIM card. In general, bits b1 and b2 will not be set to 1 or 0 at the same time.
The method for identifying a terminal card provided by the embodiment of the invention is described below.
Referring to fig. 3, fig. 3 is a flowchart of a method for identifying a terminal card according to an embodiment of the present invention. The process comprises the following steps:
in step 301, the terminal card sends a reset response ATR to the terminal, where a byte indicating the card type suggested by the terminal card is preset in the reset response ATR.
In this embodiment, the terminal determines the card type suggested by the terminal card according to the byte preset in the reset response ATR and used for indicating the card type suggested by the terminal card. For example, if TB (i +1) is equal to 01, TB (i +1) indicates that the card type proposed by the current terminal card is a USIM card.
Step 302, the terminal sends an instruction corresponding to the card type suggested by the terminal card to the terminal card, and determines whether the information on the terminal card is the application information corresponding to the instruction, if so, step 303 is executed, otherwise, step 304 is executed.
In this embodiment, if the card type suggested by the terminal card is a USIM card, in this step, the terminal sends a USIM instruction to the terminal card, and determines whether information on the terminal card is valid information corresponding to the USIM instruction, that is, valid 3G application information, if so, step 303 is executed, otherwise, step 304 is executed.
Step 303, determining the proposed card type as the card type of the terminal card.
In this embodiment, if the information on the terminal card is valid 3G application information corresponding to the USIM command, the card type of the terminal card is determined to be the USIM card,
at step 304, additional instructions are attempted.
In this embodiment, if the information on the terminal card is not valid information corresponding to the USIM instruction, that is, valid 3G application information, then, an SIM instruction may be further sent to the terminal card, and if the information on the terminal card is not valid information corresponding to the SIM instruction, that is, valid GSM-related file information, it is determined that the terminal card is faulty, and of course, if the information on the terminal card is valid information corresponding to the SIM instruction, that is, valid GSM-related file information, it is determined that the card type of the terminal card is the SIM card.
The following describes in detail a flow of identifying a terminal card in the embodiment of the present invention.
Referring to fig. 4, fig. 4 is a flowchart of a specific method for identifying a terminal card in the embodiment of the present invention. If the transmission protocol type is the type corresponding to T ═ 0, as shown in fig. 4, the process includes the following steps:
step 401 is the same as step 301, i.e. the terminal card sends a reset answer ATR to the terminal, in which a byte is preset indicating the card type suggested by the terminal card.
In this embodiment, if the bytes of ATR are as follows:
3B 97 95 80 2F 01 80 31 AO 73 BE 21 00 51
wherein each byte is represented as follows:
TS:3B;
TO: 97, indicating that there is an interface byte TA1 TD1, the number of history bytes is 7;
TA 1: 95, indicating FI 512, DI 16;
TD 1: 80 indicating that the presence interface byte TD2 supports the T-0 protocol
TD 2: 2F, indicating that interface byte TB3 is present and is a global interface byte;
TB 3: 01, indicating the preferred UICC card type as a USIM card;
80-00 are history bytes;
TCK:51。
it can be seen that the present embodiment can determine the card type suggested by the terminal card according to the interface byte TB 3; thus, the terminal already knows what kind of command needs to be sent to the terminal card, and does not need to perform the PPS process.
Step 402, judging whether the preset bytes can specifically determine the card type suggested by the terminal card, if so, executing step 403, otherwise, executing step 405.
In this embodiment, under the condition that the terminal enforces the PPS process with the terminal card, if the interface byte TB3 can determine the card type suggested by the terminal card, then step 403 is executed, otherwise, step 405 is executed.
Step 403, judging whether the terminal enforces the PPS process with the terminal card, if so, executing step 404, otherwise, omitting the PPS process and directly executing step 407.
In the present embodiment, although the card type suggested by the terminal card can be determined based on the ATR described above, the PPS process must be executed as long as the terminal forces the PPS process with the terminal card.
In this embodiment, if the card type suggested by the terminal card can be determined according to the interface byte TB 3; then, if the terminal does not force the PPS process with the terminal card, the terminal already determines what kind of command needs to be sent to the terminal card, and directly executes step 407 without executing the PPS process.
Step 404, the PPS process is performed and the card type suggested by the terminal card is further verified.
In this embodiment, the PPS process is executed, and the card type suggested by the terminal card is further verified as follows:
A. the terminal sends a PPS request to the terminal card.
In this embodiment, the PPS request may include: and the clock rate conversion factor FI, the baud rate adjustment factor DI, the extra protection time N and other preset request parameters.
B. And the terminal card sends a PPS response corresponding to the PPS request to the terminal, and bytes used for indicating the preferred card type of the terminal suggested by the terminal card are preset in the PPS response.
In this embodiment, the PPS response may include a parameter consistent with the PPS request, and a format of the PPS response may be the same as a format of the PPS request.
The bytes preset in the PPS response for indicating the terminal card to suggest the card type preferred by the terminal may be: the terminal card is instructed to suggest a preferred card type for the terminal based on the PPS3 in the PPS response. For example, when the PPS3 is 01, the terminal card is indicated to suggest that the preferred card type of the terminal is a USIM card; the PPS3 is 10, indicating that the terminal card suggests that the preferred card type for the terminal is a SIM card.
C. And when the preferred card type is consistent with the suggested card type, further verifying the suggested card type of the terminal card.
In this embodiment, if the interface byte TB3 determines that the card type suggested by the terminal card is a USIM card, and if the PPS3 indicates that the preferred card type suggested by the terminal card is a USIM card in step B, the preferred card type is consistent with the suggested card type, and the card type suggested by the terminal card is further verified. In general, it does not happen that the preferred card type does not correspond to the proposed card type. Of course, if the preferred card type is not consistent with the proposed card type, the byte preset in the ATR may be used as the criterion for indicating the proposed card type of the terminal card, or the response parameter is preset as the criterion for indicating the preferred card type of the terminal, and the specific situation needs to be specifically analyzed and then executed according to the convention.
In this embodiment, if the PPS response is consistent with the parameters in the PPS request, the parameters in the PPS response may be expressed as follows:
FF 50 95 01 3B
wherein:
PPSS:FF;
PPS 0: 50 denotes PPS1 PPS3 exists, protocol type T-0;
PPS 1: 95 denotes the highest rate supported using the current terminal card;
PPS 3: 01 represents that the card type suggested by the terminal card is USIM card;
PCK:3B。
it can be seen that, according to the PPS3, it can also be known that the preferred card type of the terminal card proposed by the terminal card is a USIM card, and the card type proposed by the terminal card is further verified.
Step 405, judging whether the terminal enforces the PPS process with the terminal card or whether the existing preset condition for triggering the PPS process is met, if so, executing step 406, otherwise, executing the operation of identifying the type of the terminal card by a method of trial instruction in the prior art.
In this embodiment, generally, when the card type of the terminal card proposed by the terminal card is uncertain, for example, the card type of the terminal card proposed by the terminal card may be a USIM card, or a SIM card, or when the card type of the terminal card is not proposed by the terminal card, an operation of identifying the terminal card type by using a trial instruction method in the prior art is performed.
Step 406, executing a PPS process, determining a card type preset in the PPS process and used for indicating the terminal card to suggest a preferred terminal as the card type suggested by the terminal card, and executing step 407.
In this step, the above-mentioned executing the PPS process, and determining the card type preset in the PPS process and used for indicating the terminal card to suggest the terminal as the card type suggested by the terminal card may be:
step a is the same as step a, namely the terminal sends the PPS request to the terminal card.
And step B is the same as the step B, namely the terminal card sends the PPS response corresponding to the PPS request to the terminal, and bytes used for indicating the terminal card to suggest the preferred card type of the terminal are preset in the PPS response.
c. And determining the preferred card type as the card type suggested by the terminal card.
In this embodiment, when the preset byte cannot specifically determine the card type suggested by the terminal card, the PPS process may be executed to determine, in the case that the PPS process is successful, the card type preset in the PPS process and used for indicating that the terminal card suggests the terminal preferred by the terminal card as the card type suggested by the terminal card.
Step 407, sending the instruction corresponding to the proposed card type to the terminal card, and determining whether the information on the terminal card is the application information corresponding to the instruction, if so, executing step 408, otherwise, executing step 409.
In this embodiment, after determining the card type suggested by the terminal card, it cannot be accurately determined that the current card type of the terminal card is the suggested card type. It must be further determined by this step whether the card type suggested by the terminal card is finally the card type of the terminal card.
In this embodiment, if the card type suggested by the terminal card is a USIM card, then, in this step, a USIM instruction may be sent to determine whether the information on the terminal card is 3G application information, if so, step 408 is executed, otherwise, step 409 is executed.
Step 408, determining the proposed card type as the card type of the terminal card.
In this embodiment, if the information on the terminal card can be determined to be the 3G application information by sending the USIM instruction, it may be determined that the card type of the terminal card is the USIM card. In this embodiment, if the type of the instruction is USIM, the dual-mode terminal may also send a selection instruction to the terminal card to determine whether the EFdir exists, for example, when the selection instruction sent by the dual-mode terminal to the terminal card is 00 a 40804022F 00, the EFdir exists is indicated, otherwise, the EFdir does not exist.
Step 409, sending other UICC instructions except the above instruction to the terminal card, and determining the card type corresponding to the other UICC instruction as the card type of the terminal card when the information on the terminal card is the application information corresponding to the other UICC instruction.
If the card type suggested by the terminal card is the USIM card, when the USIM instruction is sent to determine whether the information on the terminal card is the 3G application information, if not, the embodiment may try to send another UICC such as an SIM instruction to determine whether the information on the terminal card is GSM-related document information, when the SIM instruction attempt fails, it is determined that the terminal card has an error, and when the SIM instruction attempt succeeds, it is determined that the card type of the terminal card is the SIM card.
Of course, if the card type suggested by the terminal card is the SIM card, the SIM instruction may be sent to determine whether the information on the terminal card is the GSM related file information, if so, the card type of the terminal card is determined to be the SIM card, otherwise, other application information, such as CDMA application, may be determined according to the capability of the dual-mode terminal.
Therefore, on the premise of ensuring compatibility with the existing card, the card type suggested by the terminal card is determined according to the bytes preset in the received ATR and used for indicating the card type suggested by the terminal card, so that the dual-mode terminal can directly obtain the card type supported by the terminal card without obtaining the card type supported by the terminal card in an attempt mode in the prior art, further, the risk of misjudgment can be reduced to the maximum extent, and extra burden can be reduced.
The following describes a device for identifying a dual-mode terminal card according to an embodiment of the present invention in detail.
Referring to fig. 5, fig. 5 is a block diagram of an apparatus for identifying a dual mode terminal card according to an embodiment of the present invention. In this embodiment, the device for identifying the dual-mode terminal card may be a terminal. As shown in fig. 5, the apparatus includes: a terminal card 501, a card type suggesting unit 502, and a card type determining unit 503.
The terminal card 501 is configured to carry bytes, which are preset to indicate the card type suggested by the terminal card, in the answer to reset ATR, and send the bytes to the card type suggestion unit 502.
The card type suggesting unit 502 is configured to, after receiving the reset response ATR, determine the card type suggested by the terminal card according to a preset byte indicating the card type suggested by the terminal card in the reset response ATR, and send a first determination notification to the card type determining unit 503.
The card type determining unit 503 is configured to send, after receiving the first determination notification, an instruction corresponding to the suggested card type to the terminal card, and determine, when the information on the terminal card is application information corresponding to the instruction, the suggested card type as the card type of the terminal card.
The apparatus may further include a judging unit 504 and a PPS requesting unit 505.
The determining unit 504 is configured to determine whether to force a PPS process with the terminal card when the card type suggested by the card type suggesting unit specifically determines the card type suggested by the terminal card, and if so, send a PPS notification to the PPS requesting unit 505.
The PPS requesting unit 505 is configured to send a PPS request to the terminal card 501 after receiving the PPS notification.
The terminal card 501 is configured to send, after receiving the PPS request, a PPS response corresponding to the PPS request to the card type suggestion unit 502, where bytes used to indicate the terminal card to suggest a preferred card type of the terminal are preset in the PPS response.
The card type suggesting unit 502 is configured to, after receiving the PPS response, further verify the card type suggested by the terminal card when the preferred card type is consistent with the suggested card type, and provide the further verified card type suggested by the terminal card to the card type determining unit 503.
The card type determining unit 503 is configured to send an instruction corresponding to the card type suggested by the terminal card for further verification to the terminal card, and determine the suggested card type as the card type of the terminal card when the information on the terminal card is the application information corresponding to the instruction.
The determining unit 504 is further configured to determine whether to enforce a PPS process with the terminal card when the card type suggested by the card type suggesting unit 502 does not specifically determine the card type suggested by the terminal card, and if so, send a PPS notification to the PPS requesting unit 505.
The PPS requesting unit 505 is configured to send a PPS request to the terminal card 501 after receiving the PPS notification.
The terminal card 501 is further configured to, after receiving the PPS request, send a PPS response corresponding to the PPS request to the card type suggesting unit 502, where bytes used for indicating the terminal card to suggest a card type preferred by the terminal are preset in the PPS response.
The card type suggesting unit 502 is further configured to determine the preferred card type as the card type suggested by the terminal card after receiving the PPS response, and send the determined card type suggested by the terminal card to the card type determining unit 503.
The card type determining unit 503 is configured to send an instruction corresponding to the card type suggested by the terminal card determined by the card type suggesting unit 502 to the terminal card 501, and determine the suggested card type as the card type of the terminal card when the information on the terminal card 501 is the application information corresponding to the instruction.
The determining unit 504 is further configured to determine whether a preset condition for triggering the PPS process is met when the card type suggested by the terminal card is not specifically determined by the card type suggesting unit 502, and if so, send a PPS notification to the PPS requesting unit 505; and judges whether the PPS response is consistent with the PPS request according to the judgment notice from the terminal card 501, and if so, indicates that the PPS process is successful, and sends a suggestion notice to the card type suggestion unit 502.
The PPS requesting unit 505 is configured to send a PPS request to the terminal card 501 after receiving the PPS notification.
The terminal card 501 is further configured to send a PPS response corresponding to the PPS request to the card type suggestion unit 502, preset a byte for indicating the terminal card to suggest a card type preferred by the terminal in the PPS response, and send a judgment notification to the judgment unit 504.
The card type suggesting unit 502 is further configured to determine the preferred card type as the card type suggested by the terminal card after receiving the suggestion notification.
The card type determining unit 503 is further configured to send an instruction corresponding to the preferred card type to the terminal card, and determine the suggested card type as the card type of the terminal card when the information on the terminal card is the application information corresponding to the instruction.
The judging unit 504 is further configured to send a second determination notification to the card type determining unit 503 when the information on the terminal card is not the application information corresponding to the instruction.
The card type determining unit 503 is further configured to try another UICC instruction except the instruction after receiving the second determination notification, and determine, when the information on the terminal card is application information corresponding to the another UICC instruction, a card type corresponding to the another UICC as a card type of the terminal card.
As can be seen from the foregoing embodiments, in the present embodiment, on the premise of ensuring compatibility with an existing card, the card type suggested by the terminal card is determined according to the byte preset in the received ATR and used for indicating the card type suggested by the terminal card, so that the dual-mode terminal may directly obtain the card type supported by the terminal card without obtaining the card type supported by the terminal card in an attempt manner in the prior art, and further, the risk of misjudgment can be reduced to the maximum extent, and an additional burden can also be reduced. In addition, in this embodiment, an instruction corresponding to the card type suggested by the terminal card is sent to the terminal card, and whether the information on the terminal card is the application information corresponding to the instruction is determined, if so, the card type suggested by the terminal card is determined as the card type of the terminal card, so that multiple attempts and possible misjudgments sent by the dual-mode terminal can be avoided, and further, the compatibility between the dual-mode terminal and the dual-mode terminal card is improved.
It should be understood that the above-mentioned embodiments are merely preferred embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. A method for identifying a terminal card, the method comprising: the terminal card sends a reset response ATR to the terminal, and bytes used for indicating the card type suggested by the terminal card are preset in the reset response ATR;
the terminal sends the instruction corresponding to the suggested card type to the terminal card, judges whether the information on the terminal card is the application information corresponding to the instruction, and if so, determines the suggested card type as the card type of the terminal card;
when the preset byte specifically indicates the card type suggested by the terminal card, further determining whether the terminal enforces a protocol parameter selection PPS process with the terminal card, if so, before the terminal sends an instruction corresponding to the suggested card type to the terminal card, further comprising:
the terminal sends a PPS request to the terminal card;
the terminal card sends a PPS response corresponding to the PPS request to the terminal, and bytes used for indicating the terminal card to suggest the preferred card type of the terminal are preset in the PPS response;
and when the preferred card type is consistent with the suggested card type, further verifying the suggested card type of the terminal card.
2. The method of claim 1, wherein when the preset byte does not specifically indicate the card type suggested by the terminal card, further determining whether the terminal enforces the PPS procedure with the terminal card, and if so, before the terminal sends an instruction corresponding to the suggested card type to the terminal card, further comprising:
the terminal sends a PPS request to the terminal card;
the terminal card sends a PPS response corresponding to the PPS request to the terminal, and bytes used for indicating the terminal card to suggest the preferred card type of the terminal are preset in the PPS response;
and determining the preferred card type as the card type suggested by the terminal card.
3. The method according to claim 1, wherein when the preset byte does not specifically indicate the card type suggested by the terminal card, further determining whether a preset condition for triggering the PPS procedure is satisfied, and if so, before the terminal sends an instruction corresponding to the suggested card type to the terminal card, further comprising:
the terminal sends a PPS request to the terminal card;
the terminal card sends a PPS response corresponding to the PPS request to the terminal, and bytes used for indicating the terminal card to suggest the preferred card type of the terminal are preset in the PPS response;
and determining the preferred card type as the card type suggested by the terminal card.
4. The method according to any one of claims 1 to 3, wherein when the information on the terminal card is not application information corresponding to the instruction, further comprising:
trying to use other UICC instructions except the instruction, and if the information on the terminal card is application information corresponding to the other UICC instructions, determining the card type corresponding to the other UICC instructions as the card type of the terminal card.
5. An apparatus for identifying a terminal card, comprising: the terminal card, the card type suggestion unit, the card type determination unit, the judgment unit and the PPS request unit; wherein,
the terminal card is used for carrying preset bytes indicating the card type suggested by the terminal card in a reset response ATR and sending the bytes to the card type suggestion unit;
the card type suggesting unit is used for determining the card type suggested by the terminal card according to a preset byte indicating the card type suggested by the terminal card in the answer-to-reset ATR after receiving the answer-to-reset ATR, and sending a first determination message to the card type determining unit;
the card type determining unit is used for sending an instruction corresponding to the suggested card type to the terminal card after receiving the first determination notification, and determining the suggested card type as the card type of the terminal card when the information on the terminal card is the application information corresponding to the instruction;
the judging unit is used for judging whether to enforce the PPS process with the terminal card when the card type suggested by the terminal card is specifically determined by the card type suggesting unit, and if so, sending a PPS notification to the PPS requesting unit;
the PPS request unit sends a PPS request to the terminal card after receiving the PPS notification;
the terminal card is used for sending a PPS response corresponding to the PPS request to the card type suggesting unit after receiving the PPS request, and bytes used for indicating the preferred card type of the terminal suggested by the terminal card are preset in the PPS response;
and the card type suggesting unit is used for further verifying the card type suggested by the terminal card when the preferred card type is consistent with the suggested card type after receiving the PPS response.
6. The apparatus of claim 5, wherein the determining unit is further configured to determine whether to enforce a PPS procedure with the terminal card when the card type suggested by the card type suggesting unit is not specifically determined, and if so, send a PPS notification to the PPS requesting unit;
the PPS request unit sends a PPS request to the terminal card after receiving the PPS notification;
the terminal card is used for sending a PPS response corresponding to the PPS request to the card type suggesting unit after receiving the PPS request, and bytes used for indicating the preferred card type of the terminal suggested by the terminal card are preset in the PPS response;
and the card type suggesting unit is used for determining the preferred card type as the card type suggested by the terminal card after receiving the PPS response.
7. The apparatus according to claim 5, wherein the determining unit is further configured to determine whether a preset condition for triggering a PPS procedure is satisfied when the card type suggested by the terminal card is not specifically determined by the card type suggesting unit, and if so, send a PPS notification to the PPS requesting unit; judging whether the PPS response is consistent with the PPS request according to a judgment notice from the terminal card, if so, indicating that the PPS process is successful, and sending a suggestion notice to the card type suggestion unit;
the PPS request unit sends a PPS request to the terminal card after receiving the PPS notification;
the terminal card is also used for sending a PPS response corresponding to the PPS request to the card type suggesting unit, presetting bytes used for indicating the preferred card type of the terminal suggested by the terminal card in the PPS response, and sending a judgment notice to the judgment unit;
the card type suggesting unit is further configured to determine the preferred card type as the card type suggested by the terminal card after receiving the suggestion notification.
8. The apparatus according to any one of claims 5 to 7, wherein the judging unit is further configured to send a second determination notification to the card type determining unit when the information on the terminal card is not the application information corresponding to the instruction;
the card type determining unit is further configured to try another UICC instruction except the instruction after receiving the second determination notification, and determine a card type corresponding to the another UICC instruction as a card type of the terminal card when the information on the terminal card is application information corresponding to the another UICC instruction.
CN2008100558421A 2008-01-09 2008-01-09 Method and device for identifying terminal card Active CN101483939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100558421A CN101483939B (en) 2008-01-09 2008-01-09 Method and device for identifying terminal card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100558421A CN101483939B (en) 2008-01-09 2008-01-09 Method and device for identifying terminal card

Publications (2)

Publication Number Publication Date
CN101483939A CN101483939A (en) 2009-07-15
CN101483939B true CN101483939B (en) 2012-04-25

Family

ID=40880819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100558421A Active CN101483939B (en) 2008-01-09 2008-01-09 Method and device for identifying terminal card

Country Status (1)

Country Link
CN (1) CN101483939B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375549B (en) * 2016-08-22 2019-10-29 Tcl移动通信科技(宁波)有限公司 A kind of processing method and system of call forwarding icon
CN111428842B (en) 2018-12-24 2022-10-18 华为技术有限公司 Memory card identification method and mobile device
CN112533191B (en) * 2019-09-19 2024-10-22 深圳市优克联新技术有限公司 A method and terminal for processing information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1481538A (en) * 2000-10-18 2004-03-10 ������������� Method and device for changing working mode of chip card reader
KR20060024852A (en) * 2004-09-15 2006-03-20 삼성전자주식회사 Interface method between subscriber authentication module card and mobile terminal
CN1976522A (en) * 2006-11-27 2007-06-06 Ut斯达康通讯有限公司 Mobile terminal equipment and method for supporting different kind of smart cards

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1481538A (en) * 2000-10-18 2004-03-10 ������������� Method and device for changing working mode of chip card reader
KR20060024852A (en) * 2004-09-15 2006-03-20 삼성전자주식회사 Interface method between subscriber authentication module card and mobile terminal
CN1976522A (en) * 2006-11-27 2007-06-06 Ut斯达康通讯有限公司 Mobile terminal equipment and method for supporting different kind of smart cards

Also Published As

Publication number Publication date
CN101483939A (en) 2009-07-15

Similar Documents

Publication Publication Date Title
US7821987B2 (en) Wireless wide area network (WWAN) mobile gateway with communication protocol management
US20060095600A1 (en) Dual mode mobile communication terminal and method for automatically recognizing card information and selecting a drive mode
EP2485511A1 (en) Anti-crack method and device for network-locked mobile terminal, and network-locked mobile terminal
EP2813106A1 (en) Systems and methods for enabling stations to connect to wireless hotspots using non-unicode service set identification information
US9058262B2 (en) Sending network reject/error codes from a terminal adaptor to terminal equipment through an AT command interface
EP2320328B1 (en) Operation mode switching of data card and its control method, device and data card
CN111818528B (en) Connection method and device of wireless local area network, storage medium and wireless access equipment
CN112351471B (en) Method for accessing device to gateway, gateway device and computer readable storage medium
CN101287236A (en) Connecting method for mobile phone with double channels and mobile phone with double channels
CN101483939B (en) Method and device for identifying terminal card
US7925282B2 (en) System and method for storing SMS messages in a mobile communications terminal
CN111372224A (en) Method, device and equipment for sharing seed code number by eSIM (embedded subscriber identity Module)
JP6696898B2 (en) Notification method for configuring secure elements
EP1668950B1 (en) Method of handling automatic call origination and system determination on multi-network mobile devices
AU2010288520B2 (en) A chip card, an electronic system, a method being implemented by a chip card and a computer program product
WO2019024116A1 (en) Information processing method, communication device, and computer storage medium
CN111786848B (en) Protocol consistency test method and system for 5G terminal unified access control
KR20090085319A (en) How to control lock of mobile terminal
CN107809481A (en) Radio upgrade method and device
CN104168555A (en) Communication prompting method and device
US20250068871A1 (en) Multiple application qr code
CN101426200B (en) Authentication method and terminal device for terminal management software
EP3841720A1 (en) Negotiation of security features
KR101485137B1 (en) Method, terminal, smart card for distinguished illegal use of the terminal and computer readable record-medium on which program for executing method thereof
CN100442940C (en) A Method of Eliminating Identical Wireless Terminals

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Free format text: FORMER OWNER: DATANG MOBILE COMMUNICATION EQUIPMENT CO., LTD. DATANG MOBILE COMMUNICATION EQUIPMENTCO., LTD., SHANGHAI

Effective date: 20120217

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20120217

Address after: 201206 Pudong New Area Mingyue Road, Shanghai, No. 1258

Applicant after: Leadcore Technology Co., Ltd.

Address before: 201206 Pudong New Area Mingyue Road, Shanghai, No. 1258

Applicant before: Leadcore Technology Co., Ltd.

Co-applicant before: Datang Mobile Communication Equipment Co., Ltd.

Co-applicant before: Datang Mobile Communication Equipment Co., Ltd., Shanghai

C14 Grant of patent or utility model
GR01 Patent grant