Method and device for information interaction between host and smart card
An information interaction and smart card technology, applied in the field of data communication, can solve problems such as slow business processing speed, achieve the effects of improving business processing speed, avoiding uncontrollable accidents, and reducing blocking time
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] Such as figure 1 As shown, the embodiment of the present invention proposes a method for information interaction between a host and a smart card. The operating system of the host is a Linux system, and a communication connection is established between the host and the smart card. The method for information interaction between the host and the smart card includes:
[0032] S101: The host calls the service request interface to generate service request information, and then calls the APDU command interface to encapsulate the service request information to generate an APDU service command;
[0033] S102: The host invokes the CCID command interface to encapsulate the APDU service command to generate a CCID service command;
[0034] S103: The host calls the ioctl function according to the set calling method to send the CCID service instruction to the smart card, and receives the CCID response instruction about the CCID service instruction returned by the smart card, and parse...
Embodiment 2
[0038]On the basis of the above embodiments, in order to better realize the information interaction between the host and the smart card, as figure 2 As shown, the embodiment of the present invention further limits the synchronous calling mode and the asynchronous calling mode, specifically including:
[0039] When using the synchronous calling method, the host first sends the CCID service command to the smart card by calling the ioctl function, then calls the ioctl function and keeps waiting until the CCID response command returned by the smart card is received, and then parses the CCID response command to After obtaining the business response information, continue to process subsequent related business information;
[0040] When the asynchronous calling method is adopted, the host first sends the CCID service command to the smart card by calling the ioctl function, and then immediately returns to continue processing subsequent related business information, and then calls the...
Embodiment 3
[0050] Such as image 3 As shown, the embodiment of the present invention also provides a device for information interaction between a host and a smart card, including: a host and a smart card, the operating system of the host is a Linux system, and the host includes a service request interface module, an APDU command interface module and a CCID command interface A module and a call module; wherein, the call module includes: a synchronous call sub-module and an asynchronous call sub-module. The smart card includes a CCID read-write module and a business processing module; wherein:
[0051] The host is used to call the service request interface module to generate service request information, and then call the APDU command interface module to encapsulate the service request information to generate an APDU service command; it is also used to call the CCID command interface module to perform the APDU service command Encapsulate and generate CCID service instructions; and be used ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


