CN104915616A - Method for accessing smart card and card reader - Google Patents

Method for accessing smart card and card reader Download PDF

Info

Publication number
CN104915616A
CN104915616A CN201510248878.1A CN201510248878A CN104915616A CN 104915616 A CN104915616 A CN 104915616A CN 201510248878 A CN201510248878 A CN 201510248878A CN 104915616 A CN104915616 A CN 104915616A
Authority
CN
China
Prior art keywords
block
data block
card reader
test system
judging unit
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.)
Granted
Application number
CN201510248878.1A
Other languages
Chinese (zh)
Other versions
CN104915616B (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.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies 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 Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201510248878.1A priority Critical patent/CN104915616B/en
Publication of CN104915616A publication Critical patent/CN104915616A/en
Application granted granted Critical
Publication of CN104915616B publication Critical patent/CN104915616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method for accessing a smart card and a card reader. The method includes the following steps that: the card reader receives instruction data as current instruction data; if the length of the current instruction data exceeds a pre-consulted communication length, instruction data are obtained from the current instruction data according to the pre-consulted communication length, and protocol control bytes are set, and instruction data blocks which are obtained through combination are transmitted to the smart card, and respond data blocks returned by the smart card are received; the current instruction data are updated; if the length of the current instruction data does not exceed the pre-consulted communication length, protocol control bytes are set, and instruction data blocks which are obtained through combination are transmitted to the smart card, and respond data blocks returned by the smart card are received; respond data are obtained from the respond data blocks; if the respond data blocks do not have links, the respond data are returned to an upper computer; if the respond data blocks have links, protocol control bytes are set, and the instruction data blocks can be obtained according to the protocol control bytes, and the instruction data blocks are transmitted to the smart card, and returned respond data blocks are received.

Description

A kind of method of access intelligent card and card reader
Technical field
The present invention relates to the communications field, particularly relate to a kind of method and card reader of access intelligent card.
Background technology
In daily life, RFID (Radio Frequency Identification, radio-frequency (RF) identification) technology being widely used more and more.This cordless by wireless radio transmission is very convenient in form, but in RFID technique, the interaction flow more complicated of card reader and smart card, code cubage can be caused huger when embedded programming realizes, flow process is consuming time longer, causes difficult treatment; And fault tolerant mechanism is too simple, not ideal enough to Error disposal.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, providing a kind of method and card reader of access intelligent card, flow process is succinct, saves the processing time, increases error control mechanism, makes after being subject to external interference, can carry out fault-tolerant.
The method of a kind of access intelligent card provided by the invention and card reader, comprising:
Step S1: card reader receives the director data that host computer sends, using the described director data that receives as present instruction data, initialization current block number;
Step S2: described card reader judges whether the length of present instruction data exceedes the communication length consulted in advance, is perform step S3, otherwise perform step S5;
Step S3: described card reader is according to the described communication length consulted in advance, director data is obtained from present instruction data, protocol integrated test system byte is set to the message block being with link, and the block number in described protocol integrated test system byte is set according to current block number, director data block is obtained according to described protocol integrated test system byte and the director data got, send described director data block to smart card, receive the reply data block that described smart card returns;
Step S4: described card reader switches current block number, upgrades present instruction data according to the communication length consulted in advance, returns step S2;
Step S5: protocol integrated test system byte is set to the message block not with link by described card reader, and the block number in described protocol integrated test system byte is set according to current block number, director data block is obtained according to described protocol integrated test system byte and present instruction data, send described director data block to smart card, receive the reply data block that described smart card returns;
Step S6: described card reader switches current block number, obtains reply data, the reply data that sequential storage gets from described reply data block;
Step S7: described card reader judges whether described reply data block is with link, is perform step S8, otherwise returns the reply data of correct information and storage to described host computer, terminates;
Step S8: protocol integrated test system byte is set to receive and prepares block by described card reader, according to current block number, the block number in described protocol integrated test system byte is set, director data block is obtained according to described protocol integrated test system byte, described director data block is sent to described smart card, receive the reply data block that described smart card returns, return step S6.
The invention provides a kind of card reader of access intelligent card, described card reader comprises: receive sending module, initialization module, the first judge module, the first composite module, update module, the second composite module, acquisition module, the second judge module and the 3rd composite module;
Described reception sending module, for receiving the director data that host computer sends, using the director data that receives as present instruction data; Combine to described first composite module of smart card transmission, described second composite module, described 3rd composite module the director data block obtained, receive the reply data block that described smart card returns; When described second judge module judges that described reply data block is not with link, return the reply data of correct information and storage to described host computer;
Described initialization module, for initialization current block number;
Described first judge module, for judging whether the length of present instruction data exceedes the communication length consulted in advance;
Described first composite module, for when described first judge module judges that the length of present instruction data exceedes the communication length consulted in advance, according to the described communication length consulted in advance, director data is obtained from present instruction data, protocol integrated test system byte is set to the message block being with link, and the block number in described protocol integrated test system byte is set according to current block number, obtain director data block according to described protocol integrated test system byte and the director data got;
Described update module, at described reception sending module after receiving the reply data block that returns of described smart card, switch current block number, upgrade present instruction data according to the communication length consulted in advance, trigger described first judge module;
Described second composite module, for when described first judge module judges that the length of present instruction data does not exceed the communication length consulted in advance, protocol integrated test system byte is set to the message block not with link, and the block number in described protocol integrated test system byte is set according to current block number, obtain director data block according to described protocol integrated test system byte and present instruction data;
Described acquisition module, for receive reply data block that described smart card returns at described reception sending module after, switches current block number, obtains reply data, the reply data that sequential storage gets from described reply data block;
Described second judge module, for judging whether the described reply data block that described acquisition module gets is with link;
Described 3rd composite module, during for judging that described reply data block band links when described second judge module, described protocol integrated test system byte is set to receive and prepares block, the block number in described protocol integrated test system byte is set according to current block number, obtains director data block according to described protocol integrated test system byte.
The present invention compared with prior art, has the following advantages:
The method of a kind of access intelligent card provided by the invention and card reader, flow process is succinct, saves the processing time, increases error control mechanism, makes after being subject to external interference, can carry out fault-tolerant.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method for a kind of access intelligent card that the embodiment of the present invention 1 provides;
Fig. 2 is the specific implementation process flow diagram of step 103 in the embodiment of the present invention 1;
Fig. 3 is the specific implementation process flow diagram of step 113 in the embodiment of the present invention 1;
Fig. 4 is the module map of the card reader of a kind of access intelligent card that the embodiment of the present invention 2 provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
In the present embodiment, the form with data block between card reader with smart card communicates; Data block is divided into 3 types, be respectively the I block (Information-block for transmitting APDU, message block), for R block (the Receive ready-block of acknowledge information, receive and prepare block) and for the S block (Supervisory-block, management block) of control information transmission; A data block comprises beginning territory, information field and termination territory, and wherein beginning territory and termination territory are required, and information field is optional; Beginning territory comprises PCB (Protocol Control Byte, protocol integrated test system byte), for distinguishing dissimilar data block, such as, if the 8th of PCB the and the 7th is 00, represent that this data block is I block, if the 8th of PCB the and the 7th is 10, represent that this data block is R block, if the 8th of PCB the and the 7th is 11, represent that this data block is S block; In addition, PCB can also the block number of unlabeled data block whether with link and data block, and such as, whether the 5th this data block of bit representation of PCB is with link, the block number of the 1st this data block of bit representation of PCB; Stopping in territory is the check code of the data in beginning territory and information field; In the present embodiment, R block does not have information field;
Card reader receives the director data from host computer, according to director data composition director data block, card reader sends director data block to smart card, receives the reply data block that smart card returns, reply data block is checked, checks the reply data obtained successfully in reply data block.
Embodiment 1
Embodiments of the invention 1 provide a kind of method of access intelligent card, as shown in Figure 1, comprising:
Step 101: card reader receives the director data that host computer sends, using the director data that receives as present instruction data, initialization sending times and current block number;
Such as, in the present embodiment, sending times initial value is 0, and the initial value of current block number is 0; In addition, current block number also can be zone bit, and original state is for resetting; Director data is 0,x00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F;
Step 102: card reader judges whether the length of present instruction data exceedes the communication length consulted in advance, is perform step 103, otherwise perform step 105;
Particularly, in the present embodiment, card reader and smart card be negotiation communication length in advance, when the length of the present instruction data in card reader is greater than the communication length consulted in advance, the director data block of the band link that card reader sends to smart card, otherwise the director data block not with link that card reader sends to smart card; The initial value of present instruction data is the director data that card reader receives;
Such as, the length of director data 0,x00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F is 16 bytes, and the communication length consulted in advance is 7 bytes, then determine that the director data block sent when forward direction smart card needs band link;
Step 103: card reader is according to the communication length consulted in advance, director data is obtained from present instruction data, PCB is set to the I block being with link, block number in PCB is set according to current block number, director data block is obtained according to PCB and the director data got, director data block is sent, the reply data block that wait-receiving mode smart card returns to smart card;
Particularly, card reader, from the reference position of present instruction data, obtains the data that length is the communication length consulted in advance; Card reader verifies PCB and the director data got, and obtains check code, PCB, the director data got and check code is spliced, obtain director data block;
In the present embodiment, the value of current block number is 0 or 1, and in addition, if current block number is zone bit, then the value of current block number is for resetting or set;
Such as, the communication length consulted in advance is 7 bytes, and card reader is according to the communication length consulted in advance, and the director data got from present instruction data is 0,x00 01 02 03 04 05 06; PCB is the 8th and the 7th of binary data 00010010, PCB is 00, and represent that this data block is I block, the 5th of PCB is 1, represents that this data block band links, and the 1st of PCB is 0, represents that the block number of this data block is 0; Card reader is according to PCB and the director data got, and it is 0,x12 00 01 02 03 04 05 06 C0 E9 that combination obtains director data block;
Step 104: when card reader receives the reply data block that smart card returns, card reader judges whether the reply data block received is R block, is perform step 107, otherwise returns error message to host computer;
Particularly, card reader judges whether the data on first predeterminated position of the PCB in the reply data block received are the first preset value, are, determine that reply data block is R block, otherwise determines that reply data block is not R block; Preferably, first predeterminated position of PCB is the 8th and the 7th of PCB, and the first preset value is 10;
Such as, the reply data block that card reader receives is 0xA2F93E, and wherein, PCB is A2, i.e. binary data 10100010, then the 8th and the 7th of PCB is 10, and card reader determines that the reply data block received is R block;
Step 105: PCB is set to the I block not with link by card reader, arrange the block number in PCB according to current block number, according to PCB and present instruction data, combination obtains director data block, director data block is sent, the reply data block that wait-receiving mode smart card returns to smart card;
Particularly, card reader verifies PCB and present instruction data, obtains check code, PCB, present instruction data and check code is spliced, obtains director data block;
Such as, present instruction data are 0x0E 0F; PCB is the 8th and the 7th of binary data 00000010, PCB is 00, and represent that this data block is I block, the 5th of PCB is 0, represents that this data block is not with link, and the 1st of PCB is 0, represents that the block number of this data block is 0; Card reader is according to PCB and present instruction data, and it is 0x02 0E 0F 5801 that combination obtains director data block;
Step 106: when card reader receives the reply data block that smart card returns, card reader judges whether the reply data block received is R block, is perform step 107, otherwise performs step 110;
Particularly, card reader judges whether the 8th and the 7th of PCB in reply data block is 10, is determine that the reply data block received is R block, otherwise determines that the reply data block received is not R block;
Such as, the reply data block that card reader receives is 0,x02 39 30 30 30 E4 BC, and wherein, PCB is 02, i.e. binary data 00000010, then the 8th and the 7th of PCB is 00, and card reader determines that the reply data block received is not R block;
Step 107: card reader judges that whether block in the reply data block received number and the block in the director data block sent be number identical, is perform step 108, otherwise performs step 109;
Such as, the director data block that card reader sends is 0,x12 00 01 02 03 04 05 06 C0 E9, and wherein, the block number in PCB is 0; The reply data block that card reader receives is 0xA2 F9 3E, and wherein, the block number in PCB is 0; Block in the reply data block then received number and the block in the director data block sent are number identical;
Step 108: card reader switches current block number, upgrade present instruction data according to the communication length consulted in advance, initialization sending times, returns step 102;
In the present embodiment, if current block number is 0, then current block number is switched to 1 by card reader; If current block number is 1, then current block number is switched to 0 by card reader; In addition, if current block number be zone bit and value for reset, then current block number is switched to set by card reader; If current block number is set, then current block number is switched to reset by card reader; Upgrade present instruction data according to the communication length consulted in advance to be specially: from the reference position of present instruction data, delete the data that length is the communication length consulted in advance;
Step 109: card reader judges whether sending times reaches maximum number of times of transmission, is, returns error message to host computer, otherwise upgrade sending times, return step 102;
Step 110: card reader judges that whether the reply data block received is correct, is perform step 111, otherwise returns error message to host computer;
Particularly, card reader checks the reply data block received, if reply data block is by verification, and reply data block is I block, and reply data block length is not 0, and the block of the block of reply data block number and the director data block sent is number identical, then determines that the reply data block received is correct, otherwise determine that the reply data block received is incorrect;
Step 111: card reader switches current block number, obtains reply data, the reply data that sequential storage gets from reply data block;
Particularly, in the present embodiment, the data in the information field in card reader acquisition reply data block are as reply data;
Step 112: card reader judges whether the reply data block received is with link, is perform step 113, otherwise returns the reply data of correct information and storage to host computer, terminates;
Particularly, card reader judges whether the data on second predeterminated position of the PCB in the reply data block received are the second preset value, are, determines the reply data block band link received, otherwise determines that the reply data block received is not with link; Preferably, second predeterminated position of PCB is the 5th of PCB, and the second preset value is 1;
Step 113: PCB is set to R block by card reader, arranges the block number in PCB according to current block number, obtain director data block according to PCB, sends director data block to smart card, and receives the reply data block that smart card returns, and returns step 110;
Particularly, card reader verifies PCB, obtains check code, PCB and check code is spliced, and obtains director data block;
Such as, PCB is the 8th and the 7th of binary data 10000010, PCB is 10, and represent that this data block is R block, the 1st of PCB is 0, represents that the block number of this data block is 0; Card reader is 0x A2 F9 3E according to the director data block that PCB obtains;
In the present embodiment, in step 103, card reader sends director data block to smart card, and the reply data block that wait-receiving mode smart card returns, as shown in Figure 2, specifically comprises:
Step 201: card reader sends director data block to smart card, receives the data that smart card returns, initialization data block number of retransmissions, passback zone bit and S block request number of times;
Such as, the original state of zone bit is returned for resetting;
Step 202: card reader judges whether data block retransmissions number of times reaches maximum retransmission, is, performs step 203, otherwise perform step 205;
Step 203: whether card reader judges transmission according to the data received and receive successful, is perform step 204, otherwise returns error message to host computer;
Particularly, card reader obtains the error code in the data received, and whether the error code that misdeems is the first preset value, is, determines to send and receive successfully, otherwise determines send and receive unsuccessful; Preferably, the first preset value is 0x00; In this step, send and receive unsuccessful comprising: time-out, protocol error, error of transmission and check errors;
Step 204: card reader judges whether the reply data block in the data received is S block, is return error message to host computer, otherwise perform step 104;
Step 205: whether card reader judges transmission according to the data received and receive successful, is perform step 206, otherwise performs step 211;
Particularly, card reader obtains the error code in the data received, and whether the error code that misdeems is the first preset value, is, determines to send and receive successfully, otherwise determines send and receive unsuccessful; Preferably, the first preset value is 0x00; Particularly, in this step, send and receive unsuccessful comprising: time-out, protocol error, error of transmission and check errors;
Step 206: card reader judges whether the reply data block in the data received is S block, is perform step 207, otherwise perform step 104;
Particularly, card reader judges that the data on first predeterminated position of the PCB in the reply data block in the data received whether be the 4th preset value are determine that the reply data received is S block, otherwise determines that the reply data received is not S block; Preferably, first predeterminated position of PCB is the 8th and the 7th of PCB, and the 4th preset value is 11;
Such as, the reply data block that card reader receives is 0,xF2 28 C5 3E, and PCB is wherein 0xF2, i.e. binary data 11110010, then the 8th and the 7th of PCB is 11, determines that the reply data received is S block;
Step 207: card reader judges the whether set of passback zone bit, is upgrade S block request number of times, initialization passback zone bit, performs step 208, otherwise initialization S block request number of times, perform step 208;
Step 208: card reader initialization data block number of retransmissions, judges whether S block request number of times exceedes maximum S block request number of times, is return error message to host computer, otherwise performs step 209;
Such as, maximum S block request number of times is 2;
Step 209: card reader judges that whether the solicited message in reply data block is legal, is perform step 210, otherwise returns error message to host computer;
Such as, card reader judges whether the request time in solicited message exceedes preset duration, is, determines that the solicited message in reply data block is illegal, otherwise determines that the solicited message in reply data block is legal;
Step 210: card reader upgrades time delay according to the solicited message in reply data block, response message is generated according to solicited message, PCB is set to S block, director data block is obtained according to PCB and response message, director data block is sent to smart card, and receive the data that smart card returns, return step 205;
Particularly, card reader verifies PCB and response message, obtains check code, PCB, response message and check code is spliced, and obtains director data block;
Such as, PCB is 0xF2, and be 0x28 according to the response message that solicited message generates, then the director data block that reader combination obtains is 0xF228C53E;
Step 211: card reader will return zone bit set, PCB is set to the R block comprising Negative Acknowledgement, block number in PCB is set according to current block number, director data block is obtained according to PCB, director data block is sent to smart card, and receive the data that smart card returns, upgrade data block retransmissions number of times, return step 202;
Such as, PCB is the 8th and the 7th of binary data 10010010, PCB is 10, and represent that this data block is R block, the 5th of PCB is 1, represents that this data block comprises Negative Acknowledgement; The 1st of PCB is 0, represents that the block number of this data block is 0; Card reader is 0x B2 35 3F according to the director data block that PCB obtains;
In the present embodiment, in step 105, card reader sends director data block to smart card, the reply data block that wait-receiving mode smart card returns, idiographic flow is if step 201 is to step 211, wherein, in step 206 and step 204, card reader judges that reply data block in the data received is not as performing step 106 during S block;
In the present embodiment, as shown in Figure 3, in step 113, card reader sends director data block to smart card, the reply data block that wait-receiving mode smart card returns, idiographic flow is if step 201 is to step 210, wherein, in step 206 and step 204, card reader judges that the reply data block in the data received does not return step 110 as during S block; In step 205, when judging send and receive unsuccessful according to the data received, perform step 212;
Step 212: PCB is set to the R block comprising positive acknowledgment by card reader, arranges the block number in PCB, obtain director data block according to PCB according to current block number, director data block is sent to smart card, and receive the data that smart card returns, upgrade data block retransmissions number of times, return step 202;
Such as, PCB is the 8th and the 7th of binary data 10000010, PCB is 10, and represent that this data block is R block, the 5th of PCB is 0, represents that this data block comprises positive acknowledgment; The 1st of PCB is 0, represents that the block number of this data block is 0; Card reader is 0x A2 F9 3E according to the director data block that PCB obtains;
In the present embodiment, card reader inside is divided into upper strata main flow and underlying function; Upper strata main flow performs step 101 to step 113;
Wherein, in step 103, upper strata main flow generates the first repeat requests RNAK, and director data block and the first repeat requests are sent to underlying function; Underlying function receives director data block and the first repeat requests, performs step 201 to step 210; Wherein, in step 205, when judging send and receive unsuccessful according to the data received, perform following steps:
Card reader judges the type of repeat requests, if the first repeat requests then performs step 211, if the second repeat requests then performs step 212, if other then return error message to host computer;
In step 105, upper strata main flow generates the first repeat requests RNAK, and director data block and the first repeat requests are sent to underlying function; Underlying function receives director data block and the first repeat requests, performs step 201 to step 210; Wherein, in step 206 and step 204, card reader judges that reply data block in the data received is not as performing step 106 during S block; In step 205, when judging send and receive unsuccessful according to the data received, perform following steps:
Card reader judges the type of repeat requests, if the first repeat requests then performs step 211, if the second repeat requests then performs step 212, if other then return error message to host computer;
In step 113, upper strata main flow generates the second repeat requests RACK, and director data block and the second repeat requests are sent to underlying function; Underlying function receives director data block and the second repeat requests, performs step 201 to step 210; Wherein, in step 206 and step 204, card reader judges that the reply data block in the data received does not return step 110 as during S block; In step 205, when judging send and receive unsuccessful according to the data received, perform following steps:
Card reader judges the type of repeat requests, if the first repeat requests then performs step 211, if the second repeat requests then performs step 212, if other then return error message to host computer;
The method of a kind of access intelligent card provided in the present embodiment, flow process is succinct, saves the processing time, increases error control mechanism, makes after being subject to external interference, can carry out fault-tolerant.
Embodiment 2
Embodiments of the invention 2 provide a kind of card reader of access intelligent card, as shown in Figure 4, comprising: receive sending module 301, initialization module 302, first judge module 303, first composite module 304, update module 305, second composite module 306, acquisition module 307, second judge module 308 and the 3rd composite module 309;
Receive sending module 301, for receiving the director data that host computer sends, using the director data that receives as present instruction data; Send the first composite module 304, second composite module 306 to smart card, the 3rd composite module 309 combines the director data block obtained, receive the reply data block that smart card returns; When the second judge module 308 judges that reply data block is not with link, return the reply data of correct information and storage to host computer;
Initialization module 302, for initialization current block number;
First judge module 303, for judging whether the length of present instruction data exceedes the communication length consulted in advance;
First composite module 304, for when the first judge module 303 judges that the length of present instruction data exceedes the communication length consulted in advance, according to the communication length consulted in advance, director data is obtained from present instruction data, protocol integrated test system byte is set to the message block being with link, and the block number in protocol integrated test system byte is set according to current block number, obtain director data block according to protocol integrated test system byte and the director data got;
Update module 305, for receiving sending module 301 after the reply data block that reception smart card returns, switching current block number, upgrading present instruction data, trigger the first judge module 303 according to the communication length consulted in advance;
Second composite module 306, for when the first judge module 303 judges that the length of present instruction data does not exceed the communication length consulted in advance, protocol integrated test system byte is set to the message block not with link, and the block number in protocol integrated test system byte is set according to current block number, obtain director data block according to protocol integrated test system byte and present instruction data;
Acquisition module 307, for after receiving sending module 301 and receiving the reply data block that smart card returns, switches current block number, obtains reply data, the reply data that sequential storage gets from reply data block;
Second judge module 308, for judging whether the reply data block that acquisition module 307 gets is with link;
3rd composite module 309, for when the second judge module 308 judges that reply data block band links, protocol integrated test system byte is set to receive and prepares block, the block number in protocol integrated test system byte is set according to current block number, obtains director data block according to protocol integrated test system byte.
Wherein, first composite module 304, specifically for when the first judge module 303 judges that the length of present instruction data exceedes the communication length consulted in advance, from the reference position of present instruction data, obtaining length is that the data of the communication length consulted in advance are as director data, protocol integrated test system byte is set to the message block being with link, and the block number in protocol integrated test system byte is set according to current block number, obtain director data block according to protocol integrated test system byte and the director data got.
Wherein, first composite module 304, specifically for when the first judge module 303 judges that the length of present instruction data exceedes the communication length consulted in advance, according to the communication length consulted in advance, director data is obtained from present instruction data, protocol integrated test system byte is set to the message block being with link, and the block number in protocol integrated test system byte is set according to current block number, protocol integrated test system byte and the director data got are verified, obtain check code, protocol integrated test system byte, the director data got and check code are spliced, obtains director data block;
Second composite module 306, specifically for when the first judge module 303 judges that the length of present instruction data does not exceed the communication length consulted in advance, protocol integrated test system byte is set to the message block not with link, and the block number in protocol integrated test system byte is set according to current block number, protocol integrated test system byte and present instruction data are verified, obtain check code, protocol integrated test system byte, the director data got and check code are spliced, obtains director data block;
3rd composite module 309, for when the second judge module 308 judges that reply data block band links, protocol integrated test system byte is set to receive and prepares block, according to current block number, the block number in protocol integrated test system byte is set, protocol integrated test system byte is verified, obtain check code, protocol integrated test system byte and check code are spliced, obtain director data block.
Wherein, receive sending module 301, comprising: the first transmission and reception unit, the first initialization unit, the first judging unit, the second judging unit, the 3rd judging unit, the 4th judging unit, the 5th judging unit, the 6th judging unit, the first assembled unit and the second assembled unit;
First transmission and reception unit, for receiving the director data that host computer sends, using the director data that receives as present instruction data; When the first judging unit judges that data block retransmissions number of times reaches maximum retransmission, return error message to host computer; When the 5th judging unit judges that management block request number of times exceedes maximum management block request number of times, return error message to host computer; When the solicited message that the 6th judging unit judges in reply data block is illegal, return error message to host computer; Send the first assembled unit to smart card, the second assembled unit combines the director data block obtained, and receive the data that smart card returns; Also for upgrading data block retransmissions number of times; When the second judge module 308 judges that reply data block is not with link, return the reply data of correct information and storage to host computer;
First initialization unit, for initialization data block number of retransmissions, passback zone bit and management block request number of times;
First judging unit, for judging whether data block retransmissions number of times reaches maximum retransmission;
Whether the second judging unit, for when the first judging unit judges that data block retransmissions number of times does not reach maximum retransmission, judge transmission according to the data received and receive successful;
3rd judging unit, sends for judging when the second judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise Trigger update module 305;
4th judging unit, for when the reply data block in the data that the judgement of the 3rd judging unit receives is management block, judge the whether set of passback zone bit, upgrade management block request number of times, trigger the 5th judging unit, otherwise initialization management block request number of times, triggers the 5th judging unit;
5th judging unit, for initialization data block number of retransmissions, judges whether management block request number of times exceedes maximum management block request number of times;
6th judging unit, for when the 5th judging unit judges that management block request number of times does not exceed maximum management block request number of times, judges that whether the solicited message in reply data block is legal;
First assembled unit, for when the solicited message that the 6th judging unit judges in reply data block is legal, time delay is upgraded according to the solicited message in reply data block, response message is generated according to solicited message, protocol integrated test system byte is set to management block, obtains director data block according to protocol integrated test system byte and response message;
Second assembled unit, for when second judging unit judge send and when taking defeat, zone bit set will be returned, the reception being set to protocol integrated test system byte comprise Negative Acknowledgement prepares block, and the block number in protocol integrated test system byte is set according to current block number, obtain director data block according to protocol integrated test system byte.
Wherein, receive sending module 301, also comprise: the 7th judging unit and the 8th judging unit;
Whether the 7th judging unit, for when the first judging unit judges that data block retransmissions number of times reaches maximum retransmission, judge transmission according to the data received and receive successful;
8th judging unit, sends for judging when the 7th judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise Trigger update module 305;
First transmission and reception unit, also sends for judging when the 7th judging unit and when taking defeat, returns error message to host computer; When the reply data block that the 8th judging unit is sentenced in the data received is not management block, return error message to host computer.
Card reader also comprises the 3rd judge module, for judging whether receive the reply data block that receives of sending module 301 is receive to prepare block, is then Trigger update module 305;
Receiving sending module 301, time also for judging reply data block when the 3rd judge module not as receiving preparation block, returning error message to host computer.
Wherein, the 3rd judge module, specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in reply data block are the first preset value, are, determines that reply data block prepares block for receiving, otherwise determines that reply data block does not prepare block for receiving.
Card reader also comprises the 4th judge module, during for judging that when the 3rd judge module reply data block prepares block as receiving, judges whether block in the block and instruction data block in reply data block is number identical, is then Trigger update module 305;
Receiving sending module 301, time also for judging that when the 4th judge module block in the block and instruction data block in reply data block is number not identical, returning error message to host computer.
Wherein, initialization module 302 is also for initialization sending times;
Card reader also comprises the 5th judge module, during for judging that when the 4th judge module block in the block and instruction data block in reply data block is number not identical, judge whether sending times reaches maximum number of times of transmission, otherwise upgrade sending times, trigger the first judge module 303;
Receive sending module 301, also for returning error message when the 5th judge module judges that sending times reaches maximum number of times of transmission to host computer;
Update module 305, also for initialization sending times.
Wherein, update module 305, after sending director data block at reception sending module 301, switch current block number, the data that length is the communication length consulted in advance are deleted from the reference position of present instruction data, using the data after deletion as present instruction data, trigger the first composite module 304.
Wherein, receive sending module 301, comprising: the second transmission and reception unit, the second initialization unit, the 9th judging unit, the tenth judging unit, the 11 judging unit, the 12 judging unit, the 13 judging unit, the 14 judging unit, the 3rd assembled unit and the 4th assembled unit;
Second transmission and reception unit, for receiving the director data that host computer sends, using the director data that receives as present instruction data; When the 9th judging unit judges that data block retransmissions number of times reaches maximum retransmission, return error message to host computer; When the 13 judging unit judges that management block request number of times exceedes maximum management block request number of times, return error message to host computer; When the solicited message that the 14 judging unit judges in reply data block is illegal, return error message to host computer; Send the 3rd assembled unit, the 4th assembled unit to smart card and combine the director data block obtained, and receive the data that smart card returns; Also for upgrading data block retransmissions number of times; When the second judge module 308 judges that reply data block is not with link, return the reply data of correct information and storage to host computer;
Second initialization unit, for initialization data block number of retransmissions, passback zone bit and management block request number of times;
9th judging unit, for judging whether data block retransmissions number of times reaches maximum retransmission;
Whether the tenth judging unit, for when the 9th judging unit judges that data block retransmissions number of times does not reach maximum retransmission, judge transmission according to the data received and receive successful;
11 judging unit, sends for judging when the tenth judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise trigger acquisition module 307;
12 judging unit, for when the reply data block in the data that the judgement of the 11 judging unit receives is management block, judge the whether set of passback zone bit, upgrade management block request number of times, trigger the 13 judging unit, otherwise initialization management block request number of times, triggers the 13 judging unit;
13 judging unit, for initialization data block number of retransmissions, judges whether management block request number of times exceedes maximum management block request number of times;
14 judging unit, for when the 13 judging unit judges that management block request number of times does not exceed maximum management block request number of times, judges that whether the solicited message in reply data block is legal;
3rd assembled unit, for when the solicited message that the 14 judging unit judges in reply data block is legal, time delay is upgraded according to the solicited message in reply data block, response message is generated according to solicited message, protocol integrated test system byte is set to management block, obtains director data block according to protocol integrated test system byte and response message;
4th assembled unit, for when the tenth judging unit judge send and when taking defeat, zone bit set will be returned, the reception being set to protocol integrated test system byte comprise Negative Acknowledgement prepares block, and the block number in protocol integrated test system byte is set according to current block number, obtain director data block according to protocol integrated test system byte.
Wherein, receive sending module 301, also comprise: the 15 judging unit and the 16 judging unit;
Whether the 15 judging unit, for when the 9th judging unit judges that data block retransmissions number of times reaches maximum retransmission, judge transmission according to the data received and receive successful;
16 judging unit, sends for judging when the 15 judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise Trigger update module 305;
Second transmission and reception unit, also sends for judging when the 15 judging unit and when taking defeat, returns error message to host computer; When the reply data block that the 16 judging unit is sentenced in the data received is not management block, return error message to host computer.
Card reader also comprises the 6th judge module, for judging whether the reply data block that reception sending module 301 receives is receive to prepare block, is trigger the 4th judge module, otherwise triggers acquisition module 307.
Wherein, the 6th judge module, specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in reply data block are the first preset value, are, determines that reply data block prepares block for receiving, otherwise determines that reply data block does not prepare block for receiving.
Card reader also comprises the 7th judge module, and during for judging reply data block when the 6th judge module not as receiving preparation block, judging that whether reply data block is correct, is trigger acquisition module 307;
Receive sending module 301, also for when the 7th judge module judges that reply data block is incorrect, return error message to host computer;
3rd composite module 309, preparing block specifically for protocol integrated test system byte being set to receive, arranging the block number in protocol integrated test system byte, obtain director data block according to protocol integrated test system byte according to current block number.
Wherein, 7th judge module, specifically for checking reply data block, if reply data block is by verification, and reply data block is message block, and reply data block length is not 0, and the block of the block of reply data block number and the director data block sent is number identical, then determine that reply data block is correct, otherwise determine that reply data block is incorrect.
Wherein, the second judge module 308, specifically for judging whether the data on the second predeterminated position of the protocol integrated test system byte in reply data block are the second preset value, are, determining that reply data block band links, otherwise determining that reply data block is not with link.
Wherein, receive sending module 301, comprising: the 3rd transmission and reception unit, the 3rd initialization unit, the 17 judging unit, the 18 judging unit, the 19 judging unit, the 20 judging unit, the 21 judging unit, the 22 judging unit, the 5th assembled unit and the 6th assembled unit;
3rd transmission and reception unit, for receiving the director data that host computer sends, using the director data that receives as present instruction data; When the 17 judging unit judges that data block retransmissions number of times reaches maximum retransmission, return error message to host computer; When the 21 judging unit judges that management block request number of times exceedes maximum management block request number of times, return error message to host computer; When the solicited message that the 22 judging unit judges in reply data block is illegal, return error message to host computer; Send the 5th assembled unit, the 6th assembled unit to smart card and combine the director data block obtained, and receive the data that smart card returns; Also for upgrading data block retransmissions number of times; When the second judge module 308 judges that reply data block is not with link, return the reply data of correct information and storage to host computer;
3rd initialization unit, for initialization data block number of retransmissions, passback zone bit and management block request number of times;
17 judging unit, for judging whether data block retransmissions number of times reaches maximum retransmission;
Whether the 18 judging unit, for when the 17 judging unit judges that data block retransmissions number of times does not reach maximum retransmission, judge transmission according to the data received and receive successful;
19 judging unit, sends for judging when the 18 judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise trigger acquisition module 307;
20 judging unit, for when the reply data block in the data that the judgement of the 19 judging unit receives is management block, judge the whether set of passback zone bit, upgrade management block request number of times, trigger the 21 judging unit, otherwise initialization management block request number of times, triggers the 21 judging unit;
21 judging unit, for initialization data block number of retransmissions, judges whether management block request number of times exceedes maximum management block request number of times;
22 judging unit, for when the 21 judging unit judges that management block request number of times does not exceed maximum management block request number of times, judges that whether the solicited message in reply data block is legal;
5th assembled unit, for when the solicited message that the 22 judging unit judges in reply data block is legal, upgrade according to the solicited message in reply data block and generate response message according to solicited message time delay, protocol integrated test system byte is set to management block, obtains director data block according to protocol integrated test system byte and response message;
6th assembled unit, for when the 18 judging unit judge send and when taking defeat, zone bit set will be returned, the reception being set to protocol integrated test system byte comprise positive acknowledgment prepares block, and the block number in protocol integrated test system byte is set according to current block number, obtain director data block according to protocol integrated test system byte.
Wherein, receive sending module 301, also comprise: the 23 judging unit and the 24 judging unit;
Whether the 23 judging unit, for when the 17 judging unit judges that data block retransmissions number of times reaches maximum retransmission, judge transmission according to the data received and receive successful;
24 judging unit, sends for judging when the 24 judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise Trigger update module 305;
3rd transmission and reception unit, also sends for judging when the 23 judging unit and when taking defeat, returns error message to host computer; When the reply data block that the 24 judging unit is sentenced in the data received is not management block, return error message to host computer.
Wherein, first assembled unit, specifically for when the solicited message that the 6th judging unit judges in reply data block is legal, time delay is upgraded according to the solicited message in reply data block, protocol integrated test system byte is set to management block, protocol integrated test system byte and response message is verified, obtains check code, protocol integrated test system byte, response message and check code are spliced, obtains director data block.
Wherein, 3rd assembled unit, specifically for when the solicited message that the 14 judging unit judges in reply data block is legal, time delay is upgraded according to the solicited message in reply data block, protocol integrated test system byte is set to management block, protocol integrated test system byte and response message is verified, obtains check code, protocol integrated test system byte, response message and check code are spliced, obtains director data block.
Wherein, 5th assembled unit, specifically for when the solicited message that the 22 judging unit judges in reply data block is legal, time delay is upgraded according to the solicited message in reply data block, protocol integrated test system byte is set to management block, protocol integrated test system byte and response message is verified, obtains check code, protocol integrated test system byte, response message and check code are spliced, obtains director data block.
Wherein, the 7th judging unit is specifically for obtaining the error code in the data that receive, and whether the error code that misdeems is the 3rd preset value, is, determines to send and receives successfully, otherwise determines transmission and receive unsuccessful.
Wherein, the 8th judging unit specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in reply data block are the 4th preset value, are determine that reply data block is management block, otherwise determines that reply data block is not management block.
Wherein, the 15 judging unit is specifically for obtaining the error code in the data that receive, and whether the error code that misdeems is the 3rd preset value, is, determines to send and receives successfully, otherwise determines transmission and receive unsuccessful.
Wherein, the 16 judging unit specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in reply data block are the 4th preset value, are, determine that reply data block is management block, otherwise determines that reply data block is not management block.
Wherein, the 23 judging unit is specifically for obtaining the error code in the data that receive, and whether the error code that misdeems is the 3rd preset value, is, determines to send and receives successfully, otherwise determines transmission and receive unsuccessful.
Wherein, the 24 judging unit specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in reply data block are the 4th preset value, are, determine that reply data block is management block, otherwise determines that reply data block is not management block.
The above; be only the present invention's preferably embodiment, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in technical scope disclosed by the invention; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (49)

1. a method for access intelligent card, is characterized in that, described method comprises:
Step S1: card reader receives the director data that host computer sends, using the described director data that receives as present instruction data, initialization current block number;
Step S2: described card reader judges whether the length of present instruction data exceedes the communication length consulted in advance, is perform step S3, otherwise perform step S5;
Step S3: described card reader is according to the described communication length consulted in advance, director data is obtained from present instruction data, protocol integrated test system byte is set to the message block being with link, and the block number in described protocol integrated test system byte is set according to current block number, director data block is obtained according to described protocol integrated test system byte and the director data got, send described director data block to smart card, receive the reply data block that described smart card returns;
Step S4: described card reader switches current block number, upgrades present instruction data according to the communication length consulted in advance, returns step S2;
Step S5: protocol integrated test system byte is set to the message block not with link by described card reader, and the block number in described protocol integrated test system byte is set according to current block number, director data block is obtained according to described protocol integrated test system byte and present instruction data, send described director data block to smart card, receive the reply data block that described smart card returns;
Step S6: described card reader switches current block number, obtains reply data, the reply data that sequential storage gets from described reply data block;
Step S7: described card reader judges whether described reply data block is with link, is perform step S8, otherwise returns the reply data of correct information and storage to described host computer, terminates;
Step S8: protocol integrated test system byte is set to receive and prepares block by described card reader, according to current block number, the block number in described protocol integrated test system byte is set, director data block is obtained according to described protocol integrated test system byte, described director data block is sent to described smart card, receive the reply data block that described smart card returns, return step S6.
2. method according to claim 1, it is characterized in that, described card reader is according to the described communication length consulted in advance, director data is obtained from present instruction data, be specially: described card reader is from the reference position of present instruction data, and obtaining length is that the data of the communication length consulted in advance are as director data.
3. method according to claim 1, it is characterized in that, describedly obtain director data block according to described protocol integrated test system byte and the director data that gets, be specially: described card reader verifies described protocol integrated test system byte and the director data got, obtain check code, described protocol integrated test system byte, the director data got and described check code are spliced, obtains described director data block;
Describedly obtain director data block according to described protocol integrated test system byte and present instruction data, be specially: described card reader verifies described protocol integrated test system byte and present instruction data, obtain check code, described protocol integrated test system byte, present instruction data and described check code are spliced, obtains described director data block;
Describedly obtain director data block according to described protocol integrated test system byte, be specially: described card reader verifies described protocol integrated test system byte, obtains check code, described protocol integrated test system byte and described check code are spliced, obtain described director data block.
4. method according to claim 1, is characterized in that, in described step S3, describedly sends described director data block to smart card, receives the reply data block that described smart card returns, be specially:
Steps A 1-1: described card reader sends described director data block to described smart card, receives the data that described smart card returns, initialization data block number of retransmissions, passback zone bit and management block request number of times;
Steps A 1-2: described card reader judges whether described data block retransmissions number of times reaches maximum retransmission, is, returns error message to described host computer, otherwise perform steps A 1-3;
Steps A 1-3: whether described card reader judges transmission according to the data received and receive successful, is perform steps A 1-4, otherwise performs steps A 1-9;
Steps A 1-4: described card reader judges whether the reply data block in the data received is management block, is perform steps A 1-5, otherwise perform step S4;
Steps A 1-5: described card reader judges the whether set of described passback zone bit, is upgrade described management block request number of times, return zone bit described in initialization, performs steps A 1-6, otherwise management block request number of times described in initialization, perform steps A 1-6;
Steps A 1-6: data block retransmissions number of times described in described card reader initialization, judges whether described management block request number of times exceedes maximum management block request number of times, is, returns error message to described host computer, otherwise performs steps A 1-7;
Steps A 1-7: described card reader judges that whether the solicited message in described reply data block is legal, is perform steps A 1-8, otherwise returns error message to described host computer;
Steps A 1-8: described card reader upgrades time delay according to the solicited message in described reply data block, response message is generated according to described request information, protocol integrated test system byte is set to management block, director data block is obtained according to described protocol integrated test system byte and described response message, described director data block is sent to described smart card, and receive the data that described smart card returns, return steps A 1-3;
Steps A 1-9: described card reader is by the set of described passback zone bit, the reception being set to protocol integrated test system byte comprise Negative Acknowledgement prepares block, and the block number in described protocol integrated test system byte is set according to current block number, director data block is obtained according to described protocol integrated test system byte, described director data block is sent to described smart card, and receive the data that described smart card returns, upgrade described data block retransmissions number of times, return steps A 1-2.
5. method according to claim 4, is characterized in that, when card reader described in described steps A 1-2 judges that described data block retransmissions number of times reaches maximum retransmission, also comprises:
Step B1-1: whether described card reader judges transmission according to the data received and receive successful, is perform step B1-2, otherwise returns error message to described host computer;
Step B1-2: described card reader judges whether the reply data block in the data received is management block, is return error message to described host computer, otherwise perform step S4.
6. method according to claim 1, is characterized in that, comprises before described step S4:
Step S3-1: described card reader judges whether described reply data block is receive to prepare block, is perform step S4, otherwise returns error message to described host computer.
7. method according to claim 6, is characterized in that, described step S3-1 judges that described reply data block is as after reception preparation block, comprises before performing described step S4:
Step S4-0: described card reader judges that whether block in described reply data block number and the block in described director data block be number identical, is perform step S4, otherwise returns error message to described host computer.
8. method according to claim 7, is characterized in that, described step S1 also comprises: described card reader initialization sending times;
In described step S4-0, when described card reader judges that block in described reply data block number and the block in described director data block are number not identical, also comprise: described card reader judges whether described sending times reaches maximum number of times of transmission, return error message to described host computer, otherwise upgrade described sending times, return step S2;
Described step S4 also comprises: sending times described in described card reader initialization.
9. method according to claim 1, it is characterized in that, the communication length that described basis is consulted in advance upgrades present instruction data, be specially: described card reader deletes the data that length is the communication length consulted in advance from the reference position of present instruction data, using the data after deletion as present instruction data.
10. method according to claim 1, is characterized in that, in described step S5, describedly sends described director data block to smart card, receives the reply data block that described smart card returns, be specially:
Steps A 2-1: described card reader sends described director data block to described smart card, receives the data that described smart card returns, initialization data block number of retransmissions, passback zone bit and management block request number of times;
Steps A 2-2: described card reader judges whether described data block retransmissions number of times reaches maximum retransmission, is, returns error message to described host computer, otherwise perform steps A 2-3;
Steps A 2-3: whether described card reader judges transmission according to the data received and receive successful, is perform steps A 2-4, otherwise performs steps A 2-9;
Steps A 2-4: described card reader judges whether the reply data block in the data received is management block, is perform steps A 2-5, otherwise perform step S6;
Steps A 2-5: described card reader judges the whether set of described passback zone bit, is upgrade described management block request number of times, return zone bit described in initialization, performs steps A 2-6, otherwise management block request number of times described in initialization, perform steps A 2-6;
Steps A 2-6: data block retransmissions number of times described in described card reader initialization, judges whether described management block request number of times exceedes maximum management block request number of times, is, returns error message to described host computer, otherwise performs steps A 2-7;
Steps A 2-7: described card reader judges that whether the solicited message in described reply data block is legal, is perform steps A 2-8, otherwise returns error message to described host computer;
Steps A 2-8: described card reader upgrades time delay according to the solicited message in described reply data block, response message is generated according to described request information, protocol integrated test system byte is set to management block, director data block is obtained according to described protocol integrated test system byte and described response message, described director data block is sent to described smart card, and receive the data that described smart card returns, return steps A 2-3;
Steps A 2-9: described card reader is by the set of described passback zone bit, the reception being set to protocol integrated test system byte comprise Negative Acknowledgement prepares block, and the block number in described protocol integrated test system byte is set according to current block number, director data block is obtained according to described protocol integrated test system byte, described director data block is sent to described smart card, and receive the data that described smart card returns, upgrade described data block retransmissions number of times, return steps A 2-2.
11. methods according to claim 10, is characterized in that, when card reader described in described steps A 2-2 judges that described data block retransmissions number of times reaches maximum retransmission, also comprise:
Step B2-1: whether described card reader judges transmission according to the data received and receive successful, is perform step B2-2, otherwise returns error message to described host computer;
Step B2-2: described card reader judges whether the reply data block in the data received is management block, is return error message to described host computer, otherwise perform step S6.
12. methods according to claim 7, is characterized in that, comprise before described step S6:
Step S6-0: described card reader judges whether described reply data block is receive to prepare block, is return step S4-0, otherwise performs step S6.
13. methods according to claim 6 or 12, it is characterized in that, described card reader judges whether described reply data block is receive to prepare block, be specially: described card reader judges whether the data on the first predeterminated position of the protocol integrated test system byte in described reply data block are the first preset value, be determine that described reply data block prepares block for receiving, otherwise determine that described reply data block does not prepare block for receiving.
14. methods according to claim 12, is characterized in that, comprise before performing step S6 when described step S6-0 is judged as NO:
Step S6-1: described card reader judges that whether described reply data block is correct, is perform step S6, otherwise returns error message to described host computer;
Described step S8 is specially: protocol integrated test system byte is set to receive and prepares block by described card reader, according to current block number, the block number in described protocol integrated test system byte is set, director data block is obtained according to described protocol integrated test system byte, described director data block is sent to described smart card, and receive the reply data block that described smart card returns, return step S6-1.
15. methods according to claim 14, it is characterized in that, described card reader judges that whether described reply data block is correct, be specially: described card reader checks described reply data block, if described reply data block is by verification, and described reply data block is message block, and described reply data block length is not 0, and the block of the block of described reply data block number and the described director data block sent is number identical, then determine that described reply data block is correct, otherwise determine that described reply data block is incorrect.
16. methods according to claim 1, it is characterized in that, described card reader judges whether described reply data block is with link, be specially: described card reader judges whether the data on the second predeterminated position of the protocol integrated test system byte in described reply data block are the second preset value, determine that described reply data block band links, otherwise determine that described reply data block is not with link.
17. methods according to claim 1, is characterized in that, in described step S8, describedly send described director data block to smart card, receive the reply data block that described smart card returns, be specially:
Steps A 3-1: described card reader sends described director data block to described smart card, receives the data that described smart card returns, initialization data block number of retransmissions, passback zone bit and management block request number of times;
Steps A 3-2: described card reader judges whether described data block retransmissions number of times reaches maximum retransmission, is, returns error message to described host computer, otherwise perform steps A 3-3;
Steps A 3-3: whether described card reader judges transmission according to the data received and receive successful, is perform steps A 3-4, otherwise performs steps A 3-9;
Steps A 3-4: described card reader judges whether the reply data block in the data received is management block, is perform steps A 3-5, otherwise returns step S6;
Steps A 3-5: described card reader judges the whether set of described passback zone bit, is upgrade described management block request number of times, return zone bit described in initialization, performs steps A 3-6, otherwise management block request number of times described in initialization, perform steps A 3-6;
Steps A 3-6: data block retransmissions number of times described in described card reader initialization, judges whether described management block request number of times exceedes maximum management block request number of times, is, returns error message to described host computer, otherwise performs steps A 3-7;
Steps A 3-7: described card reader judges that whether the solicited message in described reply data block is legal, is perform steps A 3-8, otherwise returns error message to described host computer;
Steps A 3-8: described card reader upgrades time delay according to the solicited message in described reply data block, response message is generated according to described request information, protocol integrated test system byte is set to management block, director data block is obtained according to described protocol integrated test system byte and described response message, described director data block is sent to described smart card, and receive the data that described smart card returns, return steps A 3-3;
Steps A 3-9: the reception that protocol integrated test system byte is set to comprise positive acknowledgment by described card reader prepares block, and the block number in described protocol integrated test system byte is set according to current block number, director data block is obtained according to described protocol integrated test system byte, described director data block is sent to described smart card, and receive the data that described smart card returns, upgrade described data block retransmissions number of times, return steps A 3-2.
18. methods according to claim 17, is characterized in that, when card reader described in described steps A 3-2 judges that described data block retransmissions number of times reaches maximum retransmission, also comprise:
Step B3-1: whether described card reader judges transmission according to the data received and receive successful, is perform step B3-2, otherwise returns error message to described host computer;
Step B3-2: described card reader judges whether the reply data block in the data received is management block, is return error message to described host computer, otherwise return step S6.
19. methods according to claim 4,10 or 17 any one, it is characterized in that, describedly obtain director data block according to described protocol integrated test system byte and response message, be specially: described card reader verifies described protocol integrated test system byte and described response message, obtain check code, described protocol integrated test system byte, described response message and described check code are spliced, obtains described director data block.
20. methods according to claim 5,11 or 18 any one, it is characterized in that, whether described card reader judges transmission according to the data received and receives successful, be specially: described card reader obtains the error code in the data received, judge whether described error code is the 3rd preset value, be determine to send and receive successfully, otherwise determine send and receive unsuccessful.
21. methods according to claim 5,11 or 18 any one, it is characterized in that, described card reader judges whether the reply data block in the data received is management block, be specially: described card reader judges whether the data on the first predeterminated position of the protocol integrated test system byte in described reply data block are the 4th preset value, be determine that described reply data block is management block, otherwise determine that described reply data block is not management block.
The card reader of 22. 1 kinds of access intelligent cards, it is characterized in that, described card reader comprises: receive sending module, initialization module, the first judge module, the first composite module, update module, the second composite module, acquisition module, the second judge module and the 3rd composite module;
Described reception sending module, for receiving the director data that host computer sends, using the director data that receives as present instruction data; Combine to described first composite module of smart card transmission, described second composite module, described 3rd composite module the director data block obtained, receive the reply data block that described smart card returns; When described second judge module judges that described reply data block is not with link, return the reply data of correct information and storage to described host computer;
Described initialization module, for initialization current block number;
Described first judge module, for judging whether the length of present instruction data exceedes the communication length consulted in advance;
Described first composite module, for when described first judge module judges that the length of present instruction data exceedes the communication length consulted in advance, according to the described communication length consulted in advance, director data is obtained from present instruction data, protocol integrated test system byte is set to the message block being with link, and the block number in described protocol integrated test system byte is set according to current block number, obtain director data block according to described protocol integrated test system byte and the director data got;
Described update module, at described reception sending module after receiving the reply data block that returns of described smart card, switch current block number, upgrade present instruction data according to the communication length consulted in advance, trigger described first judge module;
Described second composite module, for when described first judge module judges that the length of present instruction data does not exceed the communication length consulted in advance, protocol integrated test system byte is set to the message block not with link, and the block number in described protocol integrated test system byte is set according to current block number, obtain director data block according to described protocol integrated test system byte and present instruction data;
Described acquisition module, for receive reply data block that described smart card returns at described reception sending module after, switches current block number, obtains reply data, the reply data that sequential storage gets from described reply data block;
Described second judge module, for judging whether the described reply data block that described acquisition module gets is with link;
Described 3rd composite module, during for judging that described reply data block band links when described second judge module, described protocol integrated test system byte is set to receive and prepares block, the block number in described protocol integrated test system byte is set according to current block number, obtains director data block according to described protocol integrated test system byte.
23. card reader according to claim 22, it is characterized in that, described first composite module, specifically for when described first judge module judges that the length of present instruction data exceedes the communication length consulted in advance, from the reference position of present instruction data, obtaining length is that the data of the communication length consulted in advance are as director data, protocol integrated test system byte is set to the message block being with link, and the block number in described protocol integrated test system byte is set according to current block number, obtain director data block according to described protocol integrated test system byte and the director data got.
24. card reader according to claim 22, it is characterized in that, described first composite module, specifically for when described first judge module judges that the length of present instruction data exceedes the communication length consulted in advance, according to the communication length consulted in advance, director data is obtained from present instruction data, protocol integrated test system byte is set to the message block being with link, and the block number in described protocol integrated test system byte is set according to current block number, described protocol integrated test system byte and the director data got are verified, obtain check code, by described protocol integrated test system byte, the director data got and described check code splice, obtain described director data block,
Described second composite module, specifically for when described first judge module judges that the length of present instruction data does not exceed the communication length consulted in advance, protocol integrated test system byte is set to the message block not with link, and the block number in described protocol integrated test system byte is set according to current block number, described protocol integrated test system byte and present instruction data are verified, obtain check code, described protocol integrated test system byte, the director data got and described check code are spliced, obtains described director data block;
Described 3rd composite module, during for judging that described reply data block band links when described second judge module, described protocol integrated test system byte is set to receive and prepares block, according to current block number, the block number in described protocol integrated test system byte is set, described protocol integrated test system byte is verified, obtain check code, described protocol integrated test system byte and described check code are spliced, obtain described director data block.
25. card reader according to claim 22, it is characterized in that, described reception sending module, comprising: the first transmission and reception unit, the first initialization unit, the first judging unit, the second judging unit, the 3rd judging unit, the 4th judging unit, the 5th judging unit, the 6th judging unit, the first assembled unit and the second assembled unit;
Described first transmission and reception unit, for receiving the director data that host computer sends, using the director data that receives as present instruction data; When described first judging unit judges that data block retransmissions number of times reaches maximum retransmission, return error message to described host computer; When described 5th judging unit judges that management block request number of times exceedes maximum management block request number of times, return error message to described host computer; When the solicited message that described 6th judging unit judges in described reply data block is illegal, return error message to described host computer; Send described first assembled unit to described smart card, described second assembled unit combines the director data block obtained, and receive the data that described smart card returns; Also for upgrading data block retransmissions number of times; When described second judge module judges that described reply data block is not with link, return the reply data of correct information and storage to described host computer;
Described first initialization unit, for initialization data block number of retransmissions, passback zone bit and management block request number of times;
Described first judging unit, for judging whether described data block retransmissions number of times reaches maximum retransmission;
Whether described second judging unit, for when described first judging unit judges that described data block retransmissions number of times does not reach maximum retransmission, judge transmission according to the data received and receive successful;
Described 3rd judging unit, sends for judging when described second judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise trigger described update module;
Described 4th judging unit, for when the reply data block that described 3rd judging unit judges in the data received is management block, judge the whether set of described passback zone bit, upgrade described management block request number of times, trigger described 5th judging unit, otherwise management block request number of times described in initialization, triggers described 5th judging unit;
Described 5th judging unit, for data block retransmissions number of times described in initialization, judges whether described management block request number of times exceedes maximum management block request number of times;
Described 6th judging unit, for when described 5th judging unit judges that management block request number of times does not exceed maximum management block request number of times, judges that whether the solicited message in described reply data block is legal;
Described first assembled unit, for when the solicited message that described 6th judging unit judges in described reply data block is legal, time delay is upgraded according to the solicited message in described reply data block, response message is generated according to described request information, protocol integrated test system byte is set to management block, obtains director data block according to described protocol integrated test system byte and described response message;
Described second assembled unit, for when described second judging unit judge send and when taking defeat, by the set of described passback zone bit, the reception being set to protocol integrated test system byte comprise Negative Acknowledgement prepares block, and the block number in described protocol integrated test system byte is set according to current block number, obtain director data block according to described protocol integrated test system byte.
26. card reader according to claim 25, is characterized in that, described reception sending module, also comprises: the 7th judging unit and the 8th judging unit;
Whether described 7th judging unit, for when described first judging unit judges that described data block retransmissions number of times reaches maximum retransmission, judge transmission according to the data received and receive successful;
Described 8th judging unit, sends for judging when described 7th judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise trigger described update module;
Described first transmission and reception unit, also for judging to send and when taking defeat, return error message to described host computer when described 7th judging unit; When the reply data block that described 8th judging unit is sentenced in the data received is not management block, return error message to described host computer.
27. card reader according to claim 22, is characterized in that, described card reader also comprises the 3rd judge module, for judging whether the described reply data block that described reception sending module receives is receive to prepare block, is trigger described update module;
Described reception sending module, time also for judging described reply data block when described 3rd judge module not as receiving preparation block, returns error message to described host computer.
28. card reader according to claim 27, it is characterized in that, described 3rd judge module is specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in described reply data block are the first preset value, be determine that described reply data block prepares block for receiving, otherwise determine that described reply data block does not prepare block for receiving.
29. card reader according to claim 27, it is characterized in that, described card reader also comprises the 4th judge module, during for judging that when described 3rd judge module described reply data block prepares block as receiving, judging whether block in described reply data block number and the block in described director data block be number identical, is trigger described update module;
Described reception sending module, time also for judging that when described 4th judge module block in described reply data block number and the block in described director data block are number not identical, returns error message to described host computer.
30. card reader according to claim 29, is characterized in that, described initialization module is also for initialization sending times;
Described card reader also comprises the 5th judge module, during for judging that when described 4th judge module block in described reply data block number and the block in described director data block are number not identical, judge whether described sending times reaches maximum number of times of transmission, otherwise upgrade described sending times, trigger described first judge module;
Described reception sending module, also for returning error message when described 5th judge module judges that described sending times reaches maximum number of times of transmission to described host computer;
Described update module, also for sending times described in initialization.
31. card reader according to claim 22, it is characterized in that, described update module, after sending described director data block at described reception sending module, switch current block number, from the reference position of present instruction data, delete the data that length is the communication length consulted in advance, using the data after deletion as present instruction data, trigger described first composite module.
32. card reader according to claim 22, it is characterized in that, described reception sending module, comprising: the second transmission and reception unit, the second initialization unit, the 9th judging unit, the tenth judging unit, the 11 judging unit, the 12 judging unit, the 13 judging unit, the 14 judging unit, the 3rd assembled unit and the 4th assembled unit;
Described second transmission and reception unit, for receiving the director data that host computer sends, using the director data that receives as present instruction data; When described 9th judging unit judges that data block retransmissions number of times reaches maximum retransmission, return error message to described host computer; When described 13 judging unit judges that management block request number of times exceedes maximum management block request number of times, return error message to described host computer; When the solicited message that described 14 judging unit judges in described reply data block is illegal, return error message to described host computer; Send described 3rd assembled unit to described smart card, described 4th assembled unit combines the director data block obtained, and receive the data that described smart card returns; Also for upgrading data block retransmissions number of times; When described second judge module judges that described reply data block is not with link, return the reply data of correct information and storage to described host computer;
Described second initialization unit, for initialization data block number of retransmissions, passback zone bit and management block request number of times;
Described 9th judging unit, for judging whether described data block retransmissions number of times reaches maximum retransmission;
Whether described tenth judging unit, for when described 9th judging unit judges that described data block retransmissions number of times does not reach maximum retransmission, judge transmission according to the data received and receive successful;
Described 11 judging unit, sends for judging when described tenth judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise trigger described acquisition module;
Described 12 judging unit, for when the reply data block that described 11 judging unit judges in the data received is management block, judge the whether set of described passback zone bit, upgrade described management block request number of times, trigger described 13 judging unit, otherwise management block request number of times described in initialization, triggers described 13 judging unit;
Described 13 judging unit, for data block retransmissions number of times described in initialization, judges whether described management block request number of times exceedes maximum management block request number of times;
Described 14 judging unit, for when described 13 judging unit judges that management block request number of times does not exceed maximum management block request number of times, judges that whether the solicited message in described reply data block is legal;
Described 3rd assembled unit, for when the solicited message that described 14 judging unit judges in described reply data block is legal, time delay is upgraded according to the solicited message in described reply data block, response message is generated according to described request information, protocol integrated test system byte is set to management block, obtains director data block according to described protocol integrated test system byte and described response message;
Described 4th assembled unit, for when described tenth judging unit judge send and when taking defeat, by the set of described passback zone bit, the reception being set to protocol integrated test system byte comprise Negative Acknowledgement prepares block, and the block number in described protocol integrated test system byte is set according to current block number, obtain director data block according to described protocol integrated test system byte.
33. card reader according to claim 32, is characterized in that, described reception sending module, also comprises: the 15 judging unit and the 16 judging unit;
Whether described 15 judging unit, for when described 9th judging unit judges that described data block retransmissions number of times reaches maximum retransmission, judge transmission according to the data received and receive successful;
Described 16 judging unit, sends for judging when described 15 judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise trigger described update module;
Described second transmission and reception unit, also for judging to send and when taking defeat, return error message to described host computer when described 15 judging unit; When the reply data block that described 16 judging unit is sentenced in the data received is not management block, return error message to described host computer.
34. card reader according to claim 29, it is characterized in that, described card reader also comprises the 6th judge module, for judging whether the described reply data block that described reception sending module receives is receive to prepare block, trigger described 4th judge module, otherwise trigger described acquisition module.
35. card reader according to claim 34, it is characterized in that, described 6th judge module is specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in described reply data block are the first preset value, be determine that described reply data block prepares block for receiving, otherwise determine that described reply data block does not prepare block for receiving.
36. card reader according to claim 34, it is characterized in that, described card reader also comprises the 7th judge module, during for judging described reply data block when described 6th judge module not as receiving preparation block, judging that whether described reply data block is correct, is trigger described acquisition module;
Described reception sending module, also for when described 7th judge module judges that described reply data block is incorrect, returns error message to described host computer;
Described 3rd composite module, preparing block specifically for protocol integrated test system byte being set to receive, arranging the block number in described protocol integrated test system byte, obtain director data block according to described protocol integrated test system byte according to current block number.
37. according to card reader according to claim 38, it is characterized in that, described 7th judge module, specifically for checking described reply data block, if described reply data block is by verification, and described reply data block is message block, and described reply data block length is not 0, and the block of the block of described reply data block number and the described director data block sent is number identical, then determines that described reply data block is correct, otherwise determine that described reply data block is incorrect.
38. card reader according to claim 22, it is characterized in that, described second judge module, specifically for judging whether the data on the second predeterminated position of the protocol integrated test system byte in described reply data block are the second preset value, determine that described reply data block band links, otherwise determine that described reply data block is not with link.
39. card reader according to claim 22, it is characterized in that, described reception sending module, comprising: the 3rd transmission and reception unit, the 3rd initialization unit, the 17 judging unit, the 18 judging unit, the 19 judging unit, the 20 judging unit, the 21 judging unit, the 22 judging unit, the 5th assembled unit and the 6th assembled unit;
Described 3rd transmission and reception unit, for receiving the director data that host computer sends, using the director data that receives as present instruction data; When described 17 judging unit judges that data block retransmissions number of times reaches maximum retransmission, return error message to described host computer; When described 21 judging unit judges that management block request number of times exceedes maximum management block request number of times, return error message to described host computer; When the solicited message that described 22 judging unit judges in described reply data block is illegal, return error message to described host computer; Send described 5th assembled unit to described smart card, described 6th assembled unit combines the director data block obtained, and receive the data that described smart card returns; Also for upgrading data block retransmissions number of times; When described second judge module judges that described reply data block is not with link, return the reply data of correct information and storage to described host computer;
Described 3rd initialization unit, for initialization data block number of retransmissions, passback zone bit and management block request number of times;
Described 17 judging unit, for judging whether described data block retransmissions number of times reaches maximum retransmission;
Whether described 18 judging unit, for when described 17 judging unit judges that described data block retransmissions number of times does not reach maximum retransmission, judge transmission according to the data received and receive successful;
Described 19 judging unit, sends for judging when described 18 judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise trigger described acquisition module;
Described 20 judging unit, for when the reply data block that described 19 judging unit judges in the data received is management block, judge the whether set of described passback zone bit, upgrade described management block request number of times, trigger described 21 judging unit, otherwise management block request number of times described in initialization, triggers described 21 judging unit;
Described 21 judging unit, for data block retransmissions number of times described in initialization, judges whether described management block request number of times exceedes maximum management block request number of times;
Described 22 judging unit, for when described 21 judging unit judges that management block request number of times does not exceed maximum management block request number of times, judges that whether the solicited message in described reply data block is legal;
Described 5th assembled unit, for when the solicited message that described 22 judging unit judges in described reply data block is legal, upgrade according to the solicited message in described reply data block and generate response message according to described request information time delay, protocol integrated test system byte is set to management block, obtains director data block according to described protocol integrated test system byte and described response message;
Described 6th assembled unit, for when described 18 judging unit judge send and when taking defeat, by the set of described passback zone bit, the reception being set to protocol integrated test system byte comprise positive acknowledgment prepares block, and the block number in described protocol integrated test system byte is set according to current block number, obtain director data block according to described protocol integrated test system byte.
40., according to card reader according to claim 39, is characterized in that, described reception sending module, also comprises: the 23 judging unit and the 24 judging unit;
Whether described 23 judging unit, for when described 17 judging unit judges that described data block retransmissions number of times reaches maximum retransmission, judge transmission according to the data received and receive successful;
Described 24 judging unit, sends for judging when described 24 judging unit and when receiving successfully, judges whether the reply data block in the data received is management block, otherwise trigger described update module;
Described 3rd transmission and reception unit, also for judging to send and when taking defeat, return error message to described host computer when described 23 judging unit; When the reply data block that described 24 judging unit is sentenced in the data received is not management block, return error message to described host computer.
41. card reader according to claim 25, it is characterized in that, described first assembled unit, specifically for when the solicited message that described 6th judging unit judges in described reply data block is legal, time delay is upgraded according to the solicited message in described reply data block, protocol integrated test system byte is set to management block, described protocol integrated test system byte and described response message are verified, obtain check code, described protocol integrated test system byte, described response message and described check code are spliced, obtains described director data block.
42. card reader according to claim 32, it is characterized in that, described 3rd assembled unit, specifically for when the solicited message that described 14 judging unit judges in described reply data block is legal, time delay is upgraded according to the solicited message in described reply data block, protocol integrated test system byte is set to management block, described protocol integrated test system byte and described response message are verified, obtain check code, described protocol integrated test system byte, described response message and described check code are spliced, obtains described director data block.
43. according to card reader according to claim 39, it is characterized in that, described 5th assembled unit, specifically for when the solicited message that described 22 judging unit judges in described reply data block is legal, time delay is upgraded according to the solicited message in described reply data block, protocol integrated test system byte is set to management block, described protocol integrated test system byte and described response message are verified, obtain check code, described protocol integrated test system byte, described response message and described check code are spliced, obtains described director data block.
44. card reader according to claim 26, it is characterized in that, described 7th judging unit, specifically for obtaining the error code in the data that receive, judges whether described error code is the 3rd preset value, be determine to send and receive successfully, otherwise determine send and receive unsuccessful.
45. card reader according to claim 26, it is characterized in that, described 8th judging unit is specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in described reply data block are the 4th preset value, be determine that described reply data block is management block, otherwise determine that described reply data block is not management block.
46. card reader according to claim 33, it is characterized in that, described 15 judging unit, specifically for obtaining the error code in the data that receive, judges whether described error code is the 3rd preset value, be determine to send and receive successfully, otherwise determine send and receive unsuccessful.
47. card reader according to claim 33, it is characterized in that, described 16 judging unit is specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in described reply data block are the 4th preset value, be determine that described reply data block is management block, otherwise determine that described reply data block is not management block.
48. card reader according to claim 40, it is characterized in that, described 23 judging unit, specifically for obtaining the error code in the data that receive, judges whether described error code is the 3rd preset value, be determine to send and receive successfully, otherwise determine send and receive unsuccessful.
49. card reader according to claim 40, it is characterized in that, described 24 judging unit is specifically for judging whether the data on the first predeterminated position of the protocol integrated test system byte in described reply data block are the 4th preset value, be determine that described reply data block is management block, otherwise determine that described reply data block is not management block.
CN201510248878.1A 2015-05-15 2015-05-15 A kind of method and card reader for accessing smart card Active CN104915616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510248878.1A CN104915616B (en) 2015-05-15 2015-05-15 A kind of method and card reader for accessing smart card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510248878.1A CN104915616B (en) 2015-05-15 2015-05-15 A kind of method and card reader for accessing smart card

Publications (2)

Publication Number Publication Date
CN104915616A true CN104915616A (en) 2015-09-16
CN104915616B CN104915616B (en) 2017-11-28

Family

ID=54084674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510248878.1A Active CN104915616B (en) 2015-05-15 2015-05-15 A kind of method and card reader for accessing smart card

Country Status (1)

Country Link
CN (1) CN104915616B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812099A (en) * 2016-04-13 2016-07-27 飞天诚信科技股份有限公司 Method and device for ensuring big data communication stability by a synchronization mechanism
CN106295767A (en) * 2016-07-31 2017-01-04 飞天诚信科技股份有限公司 A kind of smart card and method of work thereof
CN106934310A (en) * 2017-02-24 2017-07-07 飞天诚信科技股份有限公司 The method and card reader of a kind of testing smart card
WO2018024250A1 (en) * 2016-08-05 2018-02-08 李明 Data communication method and data communication system
CN107688760A (en) * 2016-08-05 2018-02-13 李明 A kind of data communication method and data communication system
CN107689946A (en) * 2016-08-05 2018-02-13 李明 A kind of data communication method and data communication system
CN110297800A (en) * 2019-06-29 2019-10-01 飞天诚信科技股份有限公司 The realization method and system of stabilized communication between a kind of main control chip and safety chip

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365701A (en) * 2013-07-10 2013-10-23 飞天诚信科技股份有限公司 Work method of analog card reader and analog communication system
CN104268605A (en) * 2014-08-21 2015-01-07 飞天诚信科技股份有限公司 Card reader operating intelligent SD cards and ordinary SD cards and working method thereof
CN104573591A (en) * 2015-01-05 2015-04-29 飞天诚信科技股份有限公司 Safe card reader and working method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365701A (en) * 2013-07-10 2013-10-23 飞天诚信科技股份有限公司 Work method of analog card reader and analog communication system
CN104268605A (en) * 2014-08-21 2015-01-07 飞天诚信科技股份有限公司 Card reader operating intelligent SD cards and ordinary SD cards and working method thereof
CN104573591A (en) * 2015-01-05 2015-04-29 飞天诚信科技股份有限公司 Safe card reader and working method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
中国人民银行发布: "中国金融集成电路(IC卡)规范第3部分:与应用无关的IC卡与终端接口规范", 《中华人民共和国金融行业标准》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812099A (en) * 2016-04-13 2016-07-27 飞天诚信科技股份有限公司 Method and device for ensuring big data communication stability by a synchronization mechanism
CN105812099B (en) * 2016-04-13 2019-03-05 飞天诚信科技股份有限公司 It is a kind of to guarantee that big data communicates stable method and device by synchronization mechanism
CN106295767A (en) * 2016-07-31 2017-01-04 飞天诚信科技股份有限公司 A kind of smart card and method of work thereof
CN106295767B (en) * 2016-07-31 2019-03-15 飞天诚信科技股份有限公司 A kind of smart card and its working method
WO2018024250A1 (en) * 2016-08-05 2018-02-08 李明 Data communication method and data communication system
CN107688760A (en) * 2016-08-05 2018-02-13 李明 A kind of data communication method and data communication system
CN107689946A (en) * 2016-08-05 2018-02-13 李明 A kind of data communication method and data communication system
US10609552B2 (en) 2016-08-05 2020-03-31 Tendyron Corporation System and method for data communication protection
CN106934310A (en) * 2017-02-24 2017-07-07 飞天诚信科技股份有限公司 The method and card reader of a kind of testing smart card
CN106934310B (en) * 2017-02-24 2019-09-13 飞天诚信科技股份有限公司 A kind of method and card reader of testing smart card
CN110297800A (en) * 2019-06-29 2019-10-01 飞天诚信科技股份有限公司 The realization method and system of stabilized communication between a kind of main control chip and safety chip

Also Published As

Publication number Publication date
CN104915616B (en) 2017-11-28

Similar Documents

Publication Publication Date Title
CN104915616A (en) Method for accessing smart card and card reader
CN107291516B (en) A kind of firmware upgrade method and system
CN106648781B (en) Method and system for upgrading remote firmware of communication equipment
CN110621011A (en) OTA firmware upgrading method and system based on Bluetooth device end
CN105224362A (en) Host computer carries out the method and system of program upgrade to slave computer
CN104007996A (en) Reliable firmware upgrading realizing method for distributed control system
CN109343873A (en) A kind of intelligent appliance remote upgrade control method
US10469620B2 (en) Method for transferring a new software version to at least one electricity meter via a communication network
CN103677946A (en) Method and system for updating elevator device control programs
US20180191866A1 (en) On-Vehicle Control Device and On-Vehicle Control Device Information Update System
EP3506086A1 (en) Method for updating or upgrading firmware of a radio frequency identification reader
CN102915249A (en) Method and device for remotely realizing firmware updating
CN106850241A (en) A kind of vehicle-mounted OBD terminals and its remote upgrade method
CN110262820A (en) Method, apparatus, system and storage medium based on MQTT protocol realization OTA upgrading
CN108989103A (en) Device updating method, debugger, the network equipment and network system
CN105487877A (en) Version updating method, system and base station
CN104965747A (en) Method and device for upgrading software
CN107404535B (en) Remote upgrading method and device for equipment
CN104333856A (en) Method for switching network of Java SIM card, SIM card, server and system
CN109828767A (en) Electronic lock equipment and its firmware upgrade method
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN103327125A (en) Code remote upgrading system and file transmission method thereof
CN109479195B (en) Method for managing a secure element
CN105872106A (en) Over-the-air upgrade method, over-the-air server and terminal
CN105472005A (en) Remote updating method and system for ground ATP equipment

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