Method for detecting that contactless CPU card leaves radio-frequency field
First Claim
1. A method for detecting whether a contactless CPU card has left a radio frequency field comprising the steps of:
- Step a, a card reader is switched to an interruption enabling condition;
Step b, the card reader receives an instruction sent by a master computer and determines whether the card reader received a valid instruction, if yes, determining a type of the valid instruction, if the type is an instruction on informing to seek a card, go to Step c;
if the type is an APDU instruction, go to Step d;
if the type is an extension instruction, go to Step e;
otherwise, go to Step f;
Step c, the card reader switches off the interruption enabling condition, sends a card seeking instruction to the card and determines whether the card reader received a card seeking response returned by the card, if yes, setting a flag in the card to a radio frequency field and switching on the interruption enabling condition, go to Step f;
otherwise, resetting the flag in the card to the radio frequency field and switching on the interruption enabling condition, go to Step f;
Step d, the card reader switches off the interruption enabling condition, sends the APDU instruction to the card and determines whether the card reader received a response returned by the card, if yes, setting the flag in the card to the radio frequency field, sending the received response to the master computer via a USB interrupting channel and switching on the interruption enabling condition, then go to Step f;
otherwise, resetting the flag of the card in the radio frequency field and switching on the interruption enabling condition, go to Step f;
Step e, the card reader switches off the interruption enabling condition, performs an operation according to the extension instruction, sends an operation result to the master computer via the USB interrupting channel and switches on the interruption enabling condition, go to Step f;
Step f, the card reader determines whether the flag of the card in the radio frequency field is set, if yes, sending a response that the card is in the radio frequency field to the master computer via the USB interrupting channel, then go back to Step a;
otherwise, sending the response that the card has left the radio frequency field to the master computer via the USB interrupting channel, then go back to Step a;
when the card reader receives a triggering of the interrupting, entering a regular interrupting process, comprisingStep g, the card reader switching off the interruption enabling condition and clearing any interrupting flag;
Step h, the card reader determines whether the flag of the card in the radio frequency field is set, if yes, go to Step i;
otherwise, sending the card seeking instruction to the card and determining whether a card seeking response is returned by the card, if yes, go to Step I;
otherwise, go to Step m;
Step i, the card reader sends a detecting instruction to the card and determines whether the card reader received a detecting response returned by the card, if yes, storing the detecting response and go to Step I;
otherwise, go to Step m;
Step l, the card reader switching on the interruption enabling condition, exiting the interrupting process; and
Step m, the card reader resetting the flag of the card in the radio frequency field, switching on the interruption enabling condition, and exiting the regular interrupting process.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for detecting that a contactless CPU card leaves a radio-frequency field relates to the field of smart cards. The method comprises: receiving and judging whether a valid instruction sent by an upper computer is received, and conducting a corresponding operation according to the received instruction; as a notification card search instruction, conducting a card search operation, and judging whether returned information is received; obtaining card number information about a contactless card according to the returned information; as an APDU instruction, sending A data to the card in accordance with a designated format, judging whether a response is received, and sending the operation result to the upper computer; as an extension instruction, executing a corresponding operation, and sending the operation result to the upper computer; when a valid instruction is not received, judging the mark of the card in the radio-frequency field, and if the card is in the radio-frequency field, conducting a card detection operation, and sending the operation result to the upper computer; and if the card is not in the radio-frequency field, conducting a card search operation. The present invention can detect the problem that a CPU card leaves a radio-frequency field in real time.
3 Citations
10 Claims
-
1. A method for detecting whether a contactless CPU card has left a radio frequency field comprising the steps of:
-
Step a, a card reader is switched to an interruption enabling condition; Step b, the card reader receives an instruction sent by a master computer and determines whether the card reader received a valid instruction, if yes, determining a type of the valid instruction, if the type is an instruction on informing to seek a card, go to Step c;
if the type is an APDU instruction, go to Step d;
if the type is an extension instruction, go to Step e;
otherwise, go to Step f;Step c, the card reader switches off the interruption enabling condition, sends a card seeking instruction to the card and determines whether the card reader received a card seeking response returned by the card, if yes, setting a flag in the card to a radio frequency field and switching on the interruption enabling condition, go to Step f;
otherwise, resetting the flag in the card to the radio frequency field and switching on the interruption enabling condition, go to Step f;Step d, the card reader switches off the interruption enabling condition, sends the APDU instruction to the card and determines whether the card reader received a response returned by the card, if yes, setting the flag in the card to the radio frequency field, sending the received response to the master computer via a USB interrupting channel and switching on the interruption enabling condition, then go to Step f;
otherwise, resetting the flag of the card in the radio frequency field and switching on the interruption enabling condition, go to Step f;Step e, the card reader switches off the interruption enabling condition, performs an operation according to the extension instruction, sends an operation result to the master computer via the USB interrupting channel and switches on the interruption enabling condition, go to Step f; Step f, the card reader determines whether the flag of the card in the radio frequency field is set, if yes, sending a response that the card is in the radio frequency field to the master computer via the USB interrupting channel, then go back to Step a;
otherwise, sending the response that the card has left the radio frequency field to the master computer via the USB interrupting channel, then go back to Step a;when the card reader receives a triggering of the interrupting, entering a regular interrupting process, comprising Step g, the card reader switching off the interruption enabling condition and clearing any interrupting flag; Step h, the card reader determines whether the flag of the card in the radio frequency field is set, if yes, go to Step i;
otherwise, sending the card seeking instruction to the card and determining whether a card seeking response is returned by the card, if yes, go to Step I;
otherwise, go to Step m;Step i, the card reader sends a detecting instruction to the card and determines whether the card reader received a detecting response returned by the card, if yes, storing the detecting response and go to Step I;
otherwise, go to Step m;Step l, the card reader switching on the interruption enabling condition, exiting the interrupting process; and Step m, the card reader resetting the flag of the card in the radio frequency field, switching on the interruption enabling condition, and exiting the regular interrupting process. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
Specification