Patent ID: 8060673
Filing Date: 2011-11-15
Classification: G06F

Abstract:
1. A smart card read/write control method based on a Universal Serial Bus (USB) interface, comprising the steps of: a host establishing a connection with the smart card reader/writer by enumerating a USB Human Interface Device (HID), gaining human interface class and report descriptors, and setting up communications with the smart card reader/writer; the host sending a HID control command to the smart card reader/writer via the USB interface with a standard HID protocol; the smart card reader/writer resolving and processing the HID control command initiated by the host, and interacting data in HID protocol with the host according to the HID control command; wherein during resolving and processing the HID control command, the smart card reader/writer provides an interface simulating Personal Computer/Smart Card (PC/SC)specification; wherein, if the HID control command initiated by the host is a SET FEATURE, the step of the host sending a HID control command to the smart card reader/writer via the USB interface with a standard HID protocol comprises; the host initiating a data transfer using a SET FEATURE child protocol of HID protocol to transfer a data packet in the form of HID protocol to the smart card reader/writer, wherein the data packet is made up of one or more SET FEATURE transactions; wherein the step of the smart card reader/writer resolving and processing the HID control command initiated by the host, and interacting data in HID protocol with the host according to the HID control command comprises: if the HID control command initiated by the host is a SET FEATURE, the smart card reader/writer obtaining HID protocol data from the host, distinguishing the portion of HID protocol data to be sent to the smart card from the portion of data to be operated by the smart card reader/writer itself, and converting the HID protocol data to be sent to the smart card to Application Protocol Data Units (APDUs) in compliance with ISO 7816 standard for a contact card or to APDUs in compliance with ISO/IEC 14443 Specification or ISO/IEC 15693 Specification for a contactless card and sending the APDUs to the smart card; and if the HID control command initiated by the host is a GET FEATURE, the smart card reader/writer obtaining APDUs from the smart card and converting the APDUs to HID protocol data and sending the HID protocol data to the host; wherein the HID protocol data is the data with a fixed length of bytes.