Hi guys,
I’m working on an USB smart card emulator through a dev board and am trying to implement a CCID compliant firmware.
However, I am having a weird response from the CCID host driver (Windows XP). Just after enumeration, the Event Viewer logs the following message:
Smart Card Reader ‘CCID Demo 0’ rejected IOCTL GET_STATE: The device has been removed.
And of course I can’t connect to this virtual smart card reader. The following message is reported when I try to do so:
Try to connect to: CCID Demo 0
Unable to connect error n. 0x80100069:
The smart card has been removed, so that further communication is not possible.
The dev board has a crystal clock of 20MHz and I am setting the baud rate to 115200, but am not sure if this has something to do with why usbccid.sys stops communicating with the board just after enumeration.
Just wonder if any good soul here could give me a little hand to solve this. The following is my CCID class specific descriptor:
0x36, // (bLength*) Size of this description
0x21, // (bDescriptorType*) Description type
0x0110, // (bcdCCID*) Specification Release Number in BCD
0x00, // (bMaxSlotIndex*)
0x01, // (bVoltageSupport) 01h indicates 5.0 volts
0x01, 0x00, 0x00, 0x00, // (dwProtocols*)
0x20, 0x4E, 0x00, 0x00, // dwDefaultClock (20Mhz given in Khz)
0x20, 0x4E, 0x00, 0x00, // dwMaximumClock (20Mhz given in Khz)
0x00, // bNumClockSupported => no manual setting
0x00, 0xC2, 0x01, 0x00, // (115200) dwDataRate, 1C200h
0x00, 0xC2, 0x01, 0x00, // (115200) dwMaxDataRate, 1C200h
0x00, // bNumDataRatesSupported
0x00, 0x00, 0x00, 0x00, // dwMaxIFSD (for T1 this should be 254 (0xFE)
0x00, 0x00, 0x00, 0x00, // dwSynchProtocols
0x00, 0x00, 0x00, 0x00, // dwMechanical
0x3E, 0x00, 0x00, 0x00, // dwFeatures
0x0F, 0x01, 0x00, 0x00, // dwMaxCCIDMessageLength (271 is 0x010F)
0xFF, // bClassGetResponse
0xFF, // bClassEnvelope
0x00, 0x00, // wLcdLayout
0x00, // bPINSupport
0x01 // bMaxCCIDBusySlots
Thanks a lot.