CN100468440C - Method and device for information interaction between host and smart card - Google Patents

Method and device for information interaction between host and smart card Download PDF

Info

Publication number
CN100468440C
CN100468440C CNB2006101131937A CN200610113193A CN100468440C CN 100468440 C CN100468440 C CN 100468440C CN B2006101131937 A CNB2006101131937 A CN B2006101131937A CN 200610113193 A CN200610113193 A CN 200610113193A CN 100468440 C CN100468440 C CN 100468440C
Authority
CN
China
Prior art keywords
smart card
error message
main frame
information interaction
command stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CNB2006101131937A
Other languages
Chinese (zh)
Other versions
CN1920848A (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
Beijing 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 Beijing Feitian Technologies Co Ltd filed Critical Beijing Feitian Technologies Co Ltd
Priority to CNB2006101131937A priority Critical patent/CN100468440C/en
Publication of CN1920848A publication Critical patent/CN1920848A/en
Application granted granted Critical
Publication of CN100468440C publication Critical patent/CN100468440C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a method for communicating information between host and intelligent card, and a relative device, wherein in order to avoid the driving program of intelligent card reader/writer, to cause slow communication, the inventive method uses CCID command flow to quickly realize the information communication. And the invention also provides a relative device.

Description

The method and apparatus of a kind of main frame and information interaction of smart card
Technical field
The present invention relates to the data communication field, the method and apparatus of particularly a kind of main frame and information interaction of smart card.
Background technology
CCID (USB Chip/Smart Card Interface Devices-USB chip intelligent card equipment) standard is that it provides a kind of read-write equipment for smart card and main frame or other embedded host to realize the possibility of mutual communication by the common standard of formulating of several big international IT enterprises.The CCID standard code CCID equipment be a kind of chip/intelligence card interface device, equipment is connected with main frame or other embedded host by USB interface, the data communication that meets the CCID standard, equipment carries out communication by interface and the smart card that meets the ISO7816 standard agreement simultaneously.Microsoft provides on its WINDOWS2000 and above operating system and supports CCID to drive, and device fabrication manufacturer can be developed easily use the equipment that meets the CCID interface standard.Simultaneously, the CCID interface standard is supported PC (Personal Computer-private computer)/SC (Smart Card-smart card) interface interchange, makes numerous developers develop operation to intelligent cipher key equipment easily.On numerous versions of other increase income operating system such as LINUX, also having many CCID that increase income to drive can use for developer and user.
According to the CCID consensus standard, the equipment that meets the CCID interface standard all has dissimilar descriptors, descriptor is the format piece of data result or information, and it can make main frame know this equipment, and each descriptor has comprised the information about the Global Information of this equipment or an element.In interface descriptor, byte 0 is the byte length of descriptor, is worth to be 09h, byte 1 is a fixed terminal, is worth to be that 04h, byte 4 are except terminal 0, the terminal number of supporting, value is 02h or 03h, and byte 5 is category codes, is worth to be 0Bh, byte 6 is the subclass code, value is 00h, and byte 7 is protocol code, is worth to be 00h; In the type specification symbol, byte 0 is the byte length of descriptor, is worth to be that 36h, byte 2 are version numbers of CCID standard, and it is the decimal of representing with binary code, is worth to be 0100h, and byte 52 is PIN code supports, is worth to be 00H-03h.Meet the byte in other descriptor of equipment of CCID interface standard, as other byte in the byte in device descriptor, the configuration descriptor and above-mentioned interface descriptor and the type specification symbol still according to the regulation setting in the usb protocol.
When using the CCID standard to realize main frame and information interaction of smart card, we need a kind of equipment and implementation method that can be general, it can be fast, parsing convenient, medelling meets the command stream of CCID and ISO7816 standard, particularly resolve the method meet ISO7816 T=1 agreement, thus the ISO7816 T=1 command stream that equipment meets the CCID standard by parsing fast, convenient, the realization main frame of mode standardization and the information interaction of smart card.ISO7816 T=1 consensus standard is a kind of asynchronous half-duplex piece host-host protocol, and its principal character is: agreement alternately sends a piece then from first BOB(beginning of block) that intelligence card interface device sends, and piece is tradable minimum data unit; Piece can be used to transmit to the transparent application data of host-host protocol, comprises that transmission is used for the transmitting control data that mistake is handled; Block structure allows to detect the piece of receiving before the data of handling transmission.
In present prior art, the information interaction of main frame and smart card is finished by read-write equipment for smart card.When main frame and smart card communication, need to rely on the driver that is installed in the read-write equipment for smart card in the main frame in advance and realize the mutual of information, the interactive speed of information can become slow because of the restriction of read-write equipment for smart card ardware feature.When multiple host uses a read-write equipment for smart card to carry out information interaction with smart card, the driver of read-write equipment for smart card need all be installed on each main frame, cumbersome.The driver that read-write equipment for smart card manufacturer provides has nothing in common with each other, the standard that neither one is unified, and also operations such as the installation of driver, upgrading, unloading are very inconvenient, also easily operating system caused damage.How simply, the information interaction of realization main frame easily and fast and smart card is the problem that each IT worker and user are concerned about very much.
Summary of the invention
For the information interaction that solves main frame and smart card need rely on the driver of read-write equipment for smart card and realizes, shortcomings such as the interactive speed of information is slow, the present invention proposes the method that a kind of CCID of utilization command stream realizes main frame and information interaction of smart card fast, main frame and smart card connect by interfacing equipment, described main frame and described interfacing equipment adopt CCID standard communications protocol to carry out information interaction, described interfacing equipment and described smart card adopt ISO7816 T=1 agreement to carry out information interaction, said method comprising the steps of:
Steps A: described main frame sends the electrification reset order to described smart card, and receives the reset answer packet, and described interfacing equipment is preserved the protocol type sign of described smart card;
Step B: described main frame sends command stream to described interfacing equipment;
Step C: described interfacing equipment is received described command stream, and the smartcard types of preserving is judged, if the smart card of the agreement of T=1, the packet that then sends in the described command stream arrives described smart card;
Step D: described smart card is received described packet, sends an acknowledgement to described interfacing equipment;
Step e: described interfacing equipment is received and is describedly replied or judge and make mistakes, sends reply data bag or error message bag to described main frame;
Step F: described main frame is received described reply data bag or error message bag, and the primary information of finishing between described main frame and the described smart card is mutual.
Described steps A specifically comprises:
Steps A 1: described main frame sends the electrification reset order to described smart card;
Steps A 2: described smart card sends reset answer to described interfacing equipment;
Steps A 3: described interfacing equipment is judged the protocol type of described smart card according to described reset answer, and preserves described smart card protocol type code;
Steps A 4: described interfacing equipment sends the reset answer packet to described main frame;
Steps A 5: described main frame receives described reset answer packet.
Described steps A 3 judges that the step of the protocol type of described smart card specifically comprises: described interfacing equipment judges by the layout character in the described reset answer whether the corresponding interface character exists, if exist, then described interfacing equipment is checked the value of the low nibble of last TD interface character, if the value of low nibble is 1, then the protocol type of described smart card is an ISO7816 T=1 protocol type.
Described step C specifically comprises:
Step C1: described interfacing equipment is received described command stream, resolves the implication of described command stream;
Step C2: described interfacing equipment is determined data packet length and its position in described interfacing equipment transmitting-receiving buffering in the described command stream according to the data length sign in the described command stream;
Step C3: described interfacing equipment splits out the packet in the described command stream, sends described packet to described smart card.
Described step e specifically comprises: described interfacing equipment is waited for and is received described replying, whether error message appears in judgement and the described information interaction of smart card process, if error message, then described interfacing equipment is demarcated described error message and is unified error flag or different error message codes, the error message bag is formed in described error message, send described error message bag to described main frame, if mistake do not occur, then correct the reception replied, described interfacing equipment is formed the reply data bag with described replying, and sends described reply data bag to described main frame.
Described reset answer packet is the reset answer packet that meets the CCID standard.
Described command stream is the command stream that meets the CCID standard.
Described reply data bag is the reply data bag that meets the CCID standard, and described error message bag is the error message bag that meets the CCID standard.
Described interfacing equipment is the USB device that meets the card reader of CCID standard or meet the CCID standard.
Main frame and the management piece between smart card according to ISO7816 T=1 consensus standard regulation are finished in described main frame or described interfacing equipment alternately with reception preparation piece.
Described interfacing equipment is also determined this length of data package according to the value of the LEN in the packet in the described command stream.
The present invention also provides the device of a kind of main frame and information interaction of smart card, and described device comprises usb interface module, main control module, 7816 interface modules;
Described usb interface module is used to realize that described main frame and described main control module adopt CCID standard communications protocol to carry out information interaction;
Described main control module is used to receive replying that command stream, electrification reset order and described smart card that described main frame sends send, the smartcard types of preserving is judged, if the smart card of the agreement of T=1, the packet that then sends in the described command stream arrives described main frame to described smart card and reply data bag that meets the CCID standard or error message bag;
Described 7816 interface modules are used to realize that described main control module and described smart card adopt ISO7816 T=1 agreement to carry out information interaction.
Described usb interface module comprises that descriptor is provided with the unit and end points is provided with the unit;
Described descriptor is provided with the unit and is used for being provided with and meets descriptor and the corresponding value thereof that the CCID standard stipulates;
Described end points is provided with the unit and is used for an OUT end points and is set to the BULK-OUT end points, and an IN end points is set to the BULK-IN end points, and an IN end points is set to interrupt endpoint.
Described main control module comprises the firmware program unit that is used to finish various operating functions, and described firmware program unit is resolution unit, computing unit, split cells, error message tag unit, replys component units, error message component units, error message judging unit;
Described resolution unit is used for described main control module and receives described command stream, resolves the implication of described command stream;
Described computing unit is used for the data length sign of the described command stream received according to described main control module, determines data packet length and its position in described interfacing equipment transmitting-receiving buffering in the described command stream;
Described split cells is used for splitting out the packet of the described command stream that described main control module receives;
Described error message tag unit is used for error message is masked as unified error flag or different error message codes;
The described component units of replying is used for described replying formed the reply data bag that meets the CCID standard;
Described error message component units is used for the error message bag that meets the CCID standard is formed in described error message;
Described error message judging unit is used for judging whether described 7816 interface modules and described information interaction of smart card process error message occurs, if error message, then described error message tag unit is demarcated described error message and is unified error flag or different error message codes, described error message component units is formed described error message the error message bag that meets the CCID standard, described main control module sends described error message bag to described main frame, if error message do not occur, the then described component units of replying is formed the reply data bag that meets the CCID standard with described replying, and described main control module sends described reply data bag to described main frame.
Described main control module comprises that also the LEN value checks the unit, described LEN value is checked the value of the LEN in the described command stream packet that the unit is used for checking that described main control module receives, and described computing unit is checked length of data package in the described command stream that LEN value that the unit views determines that described main control module receives according to described LEN value.
Adopt technical scheme of the present invention, not only improved the speed of main frame and information interaction of smart card, and because the introducing of CCID standard, the driver that makes main frame not need to install read-write equipment for smart card just can be finished the information interaction between main frame and interfacing equipment, improved the applicability of interfacing equipment widely, impel the producer that produces interfacing equipment to develop better, be used for the interfacing equipment that main frame and smart card carry out information interaction faster.
Description of drawings
Fig. 1 is the form block diagram that meets the command stream of CCID standard;
Fig. 2 is the form block diagram that meets the packet of CCID standard;
Fig. 3 is the process flow diagram of the embodiment of the invention;
Fig. 4 is the structure drawing of device of main frame and information interaction of smart card.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
As shown in Figure 1, the form block diagram that meets the command stream of CCID standard: the command stream that meets the CCID standard is made up of packet header and packet two parts, wherein preceding 10 bytes, i.e. 0-9 bytes, be the header part that meets the command stream of CCID standard, 10 bytes are the packet parts that meet the command stream of CCID standard.0 byte 6FH in the packet header represents the command type of main frame to CCID equipment transmission piece transmission command, and CCID equipment is analyzed the order implication of this CCID command stream representative by judging this command type, carries out corresponding C CID operation of equipment.The data length of 1-4 these transmission of byte representation in the packet header, this data length of CCID equipment utilization comes the resolution data bag, by calculating the length information of 4 bytes representative, length and the position in CCID equipment transmitting-receiving buffering that can the specified data bag.For the packet that meets ISO7816 T=1 standard agreement, CCID equipment also can come the length of specified data bag by the value of the LEN in the read data packet.
As shown in Figure 2, the form block diagram that meets the packet of CCID standard: the packet that meets the CCID standard is made up of packet header and packet two parts, wherein preceding 10 bytes, i.e. 0-9 bytes, be the header part that meets the packet of CCID standard, 10 bytes are the packet parts that meet the packet of CCID standard.0 byte 80H in the packet header represents the command type of CCID equipment to main frame transmission piece transmission command, and CCID equipment is analyzed the order implication of this CCID packet representative by judging this command type, carries out corresponding C CID operation of equipment.The data length of 1-4 these transmissions of byte representation in the packet header, CCID utilize this data length to come the resolution data bag, by calculating the length information of 4 byte representatives, can determine CCID length of data package and the position in CCID equipment transmitting-receiving buffering.For the packet that meets ISO7816 T=1 standard agreement, CCID equipment also can come the length of specified data bag by the value of the LEN in the read data packet.
Embodiment
Referring to Fig. 3, utilize the CCID command stream to realize that the smart card and the main frame that meet the ISO7816 consensus standard carry out information interactive method, its concrete steps are as follows:
Step 101:CCID device power states it self is CCID equipment, and statement BULK-OUT, BULK-IN and interrupt endpoint also connects with main frame;
Step 102: main frame sends the electrification reset order to smart card and makes it to power on, and CCID equipment receives reset answer and analyzes, and preserves the smart card protocol type code;
Step 103:CCID equipment is received the command stream that meets the CCID standard;
Step 104:CCID device parses meets the command stream of CCID standard, splits the packet header of command stream;
Step 105:CCID equipment is judged the implication of the command stream that meets the CCID standard, if the transmission data command, then execution in step 107, if other CCID operational order, then execution in step 106;
Step 106: carry out the CCID operational order and operate accordingly;
Step 107:CCID equipment judges that to the Card Type information of preserving if the smart card of T=1 agreement, then execution in step 109, and if not the smart card of T=1 agreement, then execution in step 108;
Step 108: carry out other processing;
Step 109:CCID equipment carries out information interaction according to T=1 agreement and smart card;
Step 110:CCID equipment is known length of data package and its position in CCID equipment transmitting-receiving buffering that will send by the data length sign in the calculation command stream packet header;
Step 111:CCID equipment sends determines good packet to smart card, and receives replying of smart card;
Step 112:CCID equipment is received replying of smart card transmission, error message whether occurs in judgement and the information interaction of smart card process, if error message, then execution in step 113, if error message do not occur, then execution in step 114;
Step 113:CCID equipment is formed error message and is met the error message bag of CCID standard, and sends out wrong packets of information to main frame;
The reply data bag that meets the CCID standard is formed in replying that step 114:CCID equipment will be received, and sends the response message packet to main frame;
Step 115: main frame is received reply data bag or error message bag, and the primary information of finishing between main frame and the smart card is mutual.
The process that step 102 is concrete is: the smart card that will meet the ISO7816 agreement inserts CCID equipment, CCID equipment sends announcement information by interrupt endpoint to main frame, notice main frame smart card has inserted CCID equipment, the notified information of main frame, know that smart card has inserted CCID equipment, send the electrification reset order to CCID equipment, CCID equipment is received the electrification reset order, sending the electrification reset order to smart card makes it to power on, smart card is received the electrification reset order, the smart card electrification reset, send reset answer to CCID equipment, CCID equipment is received the reset answer that smart card sends, check the value of the high nibble of second byte format character T0 in the reset answer, if the 8th of the most significant digit of T0 is 1, illustrate that then corresponding interface character TD (i) exists, if the 8th of the most significant digit of T0 is not 1, illustrate that then corresponding interface character TD (i) does not exist, if TD (i) exists, then CCID equipment is determined the protocol type of smart card according to the value of the low nibble of the TD (i) of last appearance, if the low nibble value of TD (i) is 1, then smart card and CCID equipment is follow-up alternately according to ISO7816 T=1 protocol processes, CCID equipment is also preserved a protocol type sign, reset answer is formed the packet that meets the CCID standard, and packet sent to main frame, main frame is received packet, know that smart card powers on, send the command stream that meets the CCID standard to CCID equipment.The agreement sign can be used for determining follow-up protocol type to smart card operation, all will use and judge this sign in whole information interactive process, and is electric down up to smart card, unless the protocol changes of other successful PPS exchange or other form is arranged.
Judge in the step 112 with the information interaction of smart card process in whether error message appear and method be: at CCID equipment before smart card sends packet and receives the replying of smart card, on CCID equipment, set a timer, when CCID equipment starts this timer when smart card sends data, in CCID equipment and information interaction of smart card process, if in the time of timer settings, do not receive correctly replying of smart card, the CCID device end waits for that it is the time-out error sign that error message is demarcated.
CCID equipment can be demarcated error message and be different error message codes in the step 113, for example replys overtime, bad parity, grammar mistake etc., or demarcates and be unified error flag.
According to ISO7816 T=1 consensus standard regulation, the information between main frame and smart card (piece etc. is prepared in management piece, reception) can be finished in main frame alternately, also can finish in CCID equipment.
Referring to Fig. 4, the present invention also provides the device of a kind of main frame and information interaction of smart card, and device comprises usb interface module, main control module, 7816 interface modules;
Usb interface module is used to realize that main frame and main control module adopt CCID standard communications protocol to carry out information interaction;
Main control module is used to receive replying that command stream, electrification reset order and smart card that main frame sends send, send packet in the command stream to smart card and the reply data bag that meets the CCID standard or error message bag to main frame;
7816 interface modules are used to realize that main control module and smart card adopt ISO7816 T=1 agreement to carry out information interaction.
Usb interface module comprises that descriptor is provided with the unit and end points is provided with the unit;
Descriptor is provided with the unit and is used for being provided with and meets descriptor and the corresponding value thereof that the CCID standard stipulates;
End points is provided with the unit and is used for an OUT end points and is set to the BULK-OUT end points, and an IN end points is set to the BULK-IN end points, and an IN end points is set to interrupt endpoint.BULK-IN and BULK-OUT end points are used for realizing replying and ordering pipeline, interrupt endpoint to be used for realization event notice pipeline.
Main control module comprises the firmware program unit that is used to finish various operating functions, and the firmware program unit is resolution unit, computing unit, split cells, error message tag unit, replys component units, error message component units, error message judging unit;
Resolution unit is used for the main control module stream that receives orders, the implication of resolve command stream;
Computing unit is used for the data length sign of the command stream received according to main control module, determines data packet length and its position in interfacing equipment transmitting-receiving buffering in the command stream;
Split cells is used for splitting out the packet of the command stream that main control module receives;
The error message tag unit is used for error message is masked as unified error flag or different error message codes;
Replying component units is used for forming the reply data bag that meets the CCID standard with replying;
The error message component units is used for the error message bag that meets the CCID standard is formed in error message;
The error message judging unit is used for judging whether 7816 interface modules and information interaction of smart card process error message occurs, if error message, then error message tag unit is demarcated error message and is unified error flag or different error message codes, the error message component units is formed error message the error message bag that meets the CCID standard, main control module sends the packets of information of makeing mistakes to main frame, if error message do not occur, then reply component units and will reply the reply data bag that composition meets the CCID standard, main control module sends the reply data bag to main frame.
Main control module comprises that also the LEN value checks the unit, the LEN value is checked the value of the LEN in the command stream packet that the unit is used for checking that main control module receives, and computing unit is checked length of data package in the command stream that LEN value that the unit views determines that main control module receives according to the LEN value.
Above-described embodiment is more preferably embodiment a kind of of the present invention, and the common variation that those skilled in the art carries out in the technical solution of the present invention scope and replacing all should be included in protection scope of the present invention.

Claims (15)

1. the method for main frame and information interaction of smart card, it is characterized in that, main frame and smart card connect by interfacing equipment, described main frame and described interfacing equipment adopt CCID standard communications protocol to carry out information interaction, described interfacing equipment and described smart card adopt ISO7816 T=1 agreement to carry out information interaction, said method comprising the steps of:
Steps A: described main frame sends the electrification reset order to described smart card, and receives the reset answer packet, and described interfacing equipment is preserved the protocol type sign of described smart card;
Step B: described main frame sends command stream to described interfacing equipment;
Step C: described interfacing equipment is received described command stream, and the smartcard types of preserving is judged, if the smart card of the agreement of T=1, the packet that then sends in the described command stream arrives described smart card;
Step D: described smart card is received described packet, sends an acknowledgement to described interfacing equipment;
Step e: described interfacing equipment is received and is describedly replied or judge and make mistakes, sends reply data bag or error message bag to described main frame;
Step F: described main frame is received described reply data bag or error message bag, and the primary information of finishing between described main frame and the described smart card is mutual.
2. the method for main frame as claimed in claim 1 and information interaction of smart card is characterized in that, described steps A specifically comprises:
Steps A 1: described main frame sends the electrification reset order to described smart card;
Steps A 2: described smart card sends reset answer to described interfacing equipment;
Steps A 3: described interfacing equipment is judged the protocol type of described smart card according to described reset answer, and preserves described smart card protocol type code;
Steps A 4: described interfacing equipment sends the reset answer packet to described main frame;
Steps A 5: described main frame receives described reset answer packet.
3. the method for main frame as claimed in claim 2 and information interaction of smart card, it is characterized in that, described steps A 3 judges that the step of the protocol type of described smart card specifically comprises: described interfacing equipment judges by the layout character in the described reset answer whether the corresponding interface character exists, if exist, then described interfacing equipment is checked the value of the low nibble of last TD interface character, if the value of low nibble is 1, then the protocol type of described smart card is an ISO7816 T=1 protocol type.
4. the method for main frame as claimed in claim 1 and information interaction of smart card is characterized in that, described step C specifically comprises:
Step C1: described interfacing equipment is received described command stream, resolves the implication of described command stream;
Step C2: described interfacing equipment is determined data packet length and its position in described interfacing equipment transmitting-receiving buffering in the described command stream according to the data length sign in the described command stream;
Step C3: described interfacing equipment splits out the packet in the described command stream, sends described packet to described smart card.
5. the method for main frame as claimed in claim 1 and information interaction of smart card, it is characterized in that, described step e specifically comprises: described interfacing equipment is waited for and is received described replying, whether error message appears in judgement and the described information interaction of smart card process, if error message, then described interfacing equipment is demarcated described error message and is unified error flag or different error message codes, the error message bag is formed in described error message, send described error message bag to described main frame, if mistake do not occur, then correct the reception replied, and described interfacing equipment is formed the reply data bag with described replying, and sends described reply data bag to described main frame.
6. the method for main frame as claimed in claim 2 and information interaction of smart card is characterized in that, described reset answer packet is the reset answer packet that meets the CCID standard.
7. as the method for claim 1 or 4 described main frames and information interaction of smart card, it is characterized in that described command stream is the command stream that meets the CCID standard.
8. as the method for claim 1 or 5 described main frames and information interaction of smart card, it is characterized in that described reply data bag is the reply data bag that meets the CCID standard, described error message bag is the error message bag that meets the CCID standard.
9. as the method for any described main frame of claim and information interaction of smart card in the claim 1-5, it is characterized in that described interfacing equipment is the USB device that meets the card reader of CCID standard or meet the CCID standard.
10. as the method for any described main frame of claim and information interaction of smart card in the claim 11, it is characterized in that, in described main frame or described interfacing equipment, finish alternately with reception preparation piece according to the main frame and the management piece between smart card of ISO7816 T=1 consensus standard regulation.
11. the method for main frame as claimed in claim 4 and information interaction of smart card is characterized in that, described interfacing equipment is also determined this length of data package according to the value of the LEN in the packet in the described command stream.
12. the device of main frame and information interaction of smart card is characterized in that described device comprises usb interface module, main control module, 7816 interface modules;
Described usb interface module is used to realize that described main frame and described main control module adopt CCID standard communications protocol to carry out information interaction;
Described main control module is used to receive replying that command stream, electrification reset order and described smart card that described main frame sends send, the smartcard types of preserving is judged, if the smart card of the agreement of T=1, the packet that then sends in the described command stream arrives described main frame to described smart card and reply data bag that meets the CCID standard or error message bag;
Described 7816 interface modules are used to realize that described main control module and described smart card adopt ISO7816 T=1 agreement to carry out information interaction.
13. the device of main frame as claimed in claim 12 and information interaction of smart card is characterized in that, described usb interface module comprises that descriptor is provided with the unit and end points is provided with the unit;
Described descriptor is provided with the unit and is used for being provided with and meets descriptor and the corresponding value thereof that the CCID standard stipulates;
Described end points is provided with the unit and is used for an OUT end points and is set to the BULK-OUT end points, and an IN end points is set to the BULK-IN end points, and an IN end points is set to interrupt endpoint.
14. the device of main frame as claimed in claim 12 and information interaction of smart card, it is characterized in that, described main control module comprises the firmware program unit that is used to finish various operating functions, and described firmware program unit is resolution unit, computing unit, split cells, error message tag unit, replys component units, error message component units, error message judging unit;
Described resolution unit is used for described main control module and receives described command stream, resolves the implication of described command stream;
Described computing unit is used for the data length sign of the described command stream received according to described main control module, determines data packet length and its position in described interfacing equipment transmitting-receiving buffering in the described command stream;
Described split cells is used for splitting out the packet of the described command stream that described main control module receives;
Described error message tag unit is used for error message is masked as unified error flag or different error message codes;
The described component units of replying is used for described replying formed the reply data bag that meets the CCID standard;
Described error message component units is used for the error message bag that meets the CCID standard is formed in described error message;
Described error message judging unit is used for judging whether described 7816 interface modules and described information interaction of smart card process error message occurs, if error message, then described error message tag unit is demarcated described error message and is unified error flag or different error message codes, described error message component units is formed described error message the error message bag that meets the CCID standard, described main control module sends described error message bag to described main frame, if error message do not occur, the then described component units of replying is formed the reply data bag that meets the CCID standard with described replying, and described main control module sends described reply data bag to described main frame.
15. the device of main frame as claimed in claim 14 and information interaction of smart card, it is characterized in that, described main control module comprises that also the LEN value checks the unit, described LEN value is checked the value of the LEN in the described command stream packet that the unit is used for checking that described main control module receives, and described computing unit is checked length of data package in the described command stream that LEN value that the unit views determines that described main control module receives according to described LEN value.
CNB2006101131937A 2006-09-19 2006-09-19 Method and device for information interaction between host and smart card Active CN100468440C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101131937A CN100468440C (en) 2006-09-19 2006-09-19 Method and device for information interaction between host and smart card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101131937A CN100468440C (en) 2006-09-19 2006-09-19 Method and device for information interaction between host and smart card

Publications (2)

Publication Number Publication Date
CN1920848A CN1920848A (en) 2007-02-28
CN100468440C true CN100468440C (en) 2009-03-11

Family

ID=37778568

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101131937A Active CN100468440C (en) 2006-09-19 2006-09-19 Method and device for information interaction between host and smart card

Country Status (1)

Country Link
CN (1) CN100468440C (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102008014037A1 (en) * 2008-03-14 2009-09-17 Giesecke & Devrient Gmbh Optimized command processing in the context of chip card communication
CN101582057B (en) * 2009-04-01 2012-04-18 飞天诚信科技股份有限公司 Method, device and system for controlling communication and transmission of human interface device
CN102222208B (en) * 2011-05-31 2014-03-26 飞天诚信科技股份有限公司 Controllable CCID (Charge Coupled Imaging Device) card reader and working method thereof
CN102541474B (en) * 2011-12-29 2015-03-25 北京时代民芯科技有限公司 USB (universal serial bus) card reading controller
CN104077618B (en) * 2013-03-29 2018-08-31 西门子公司 A kind of method and apparatus accessing smart card
CN104951417A (en) * 2014-03-26 2015-09-30 北京同方微电子有限公司 Method for achieving USB combined device suitable for high-capacity USIM
CN104834598B (en) * 2015-04-10 2018-09-28 福建升腾资讯有限公司 A kind of method of IC card terminal test

Also Published As

Publication number Publication date
CN1920848A (en) 2007-02-28

Similar Documents

Publication Publication Date Title
CN100474857C (en) Method for information interaction between host computer and smart card
US6769622B1 (en) System and method for simulating universal serial bus smart card device connected to USB host
CN100468440C (en) Method and device for information interaction between host and smart card
CN101719054B (en) Method and device for realizing multi-card slot access
EP2050005B1 (en) A multi-function peripheral device, corresponding method and electronic system having a peripheral and a host communicating via a single interface
US7685328B2 (en) Generic universal serial bus device operable at low and full speed and adapted for use in a smart card device
EP1473664B1 (en) Smart card device as mass storage device
US7413129B2 (en) USB device with secondary USB on-the-go function
US20080144650A1 (en) Apparatus for contactless transmission of data from a memory
MXPA03002250A (en) Method and device for universal serial bus smart card traffic signaling.
US20140289465A1 (en) Smart card, portable electronic device and smart card processing device
CN100414556C (en) Method and apparatus for host machine and smart card to conduct information interaction
US7163154B2 (en) Contact less IC card with operating system used in contact type cards and reader for such contactless cards
CN103414497A (en) Methods and appliances for forwarding communication between electronic appliances
US7823133B2 (en) Smart card device and method for debug and software development
CN102968325A (en) USB (Universal Serial Bus) equipment and method and device for automatically initializing same
CN105184337A (en) Intelligent card application detection method and system for NFC equipment
CN100424665C (en) Method and device for implementing CCID equipment
CN102521197A (en) Method for realizing ISO7816 protocol with UART (universal asynchronous receiver/transmitter) of low-cost MCU (micro-control unit)
CN105117761A (en) Label information processing method
US7185119B2 (en) Method and apparatus for checking and analyzing the state of peripherals wherein state information is converted into a pattern of identification information
CN103326752B (en) The control method deactivated by interface for communication between electronic and relevant device
CN100555938C (en) A kind of intelligent cipher key equipment and with the mutual method of host information
US20040178274A1 (en) Contactless radio frequency magnetic field data transmission card and its application system
CN201886465U (en) Interface equipment and device provided with same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: FEITIAN CHENGXIN TECHNOLOGIES CO., LTD.

Free format text: FORMER NAME: BEIJING FEITIAN CHENGXIN SCIENCE + TECHNOLOGY CO. LTD.

CP03 Change of name, title or address

Address after: 100085 Beijing city Haidian District Xueqing Road No. 9 Ebizal building B block 17 layer

Patentee after: Feitian Technologies Co.,Ltd.

Address before: 100083, Haidian District, Xueyuan Road, No. 40 research, 7 floor, 5 floor, Beijing

Patentee before: FEITIAN TECHNOLOGIES Co.,Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 17th floor, building B, Huizhi building, No.9, Xueqing Road, Haidian District, Beijing 100085

Patentee after: Feitian Technologies Co.,Ltd.

Country or region after: China

Address before: 100085 17th floor, block B, Huizhi building, No.9 Xueqing Road, Haidian District, Beijing

Patentee before: Feitian Technologies Co.,Ltd.

Country or region before: China