[Pcsclite-muscle] bNumDataRatesSupported = 0 and get_data_rates

Bruno Jesus 00cpxxx
Tue May 22 06:26:49 PDT 2012


Hi, I have a reader that does not return any data rates and sends a
bNumDataRatesSupported = 0 in it's descriptor. But the reader is being
rejected by pcsclite and I guess it's because when it asks for the
data rates it gets bad values. As far as I can tell the reader does
not answer the 0x03 control message.

My suggestion is to change ccid_usb.c in libccid, around line 558 from:

usbDevice[reader_index].ccid.arrayOfSupportedDataRates =
get_data_rates(reader_index, config_desc, num);

to:

if(usbDevice[reader_index].ccid.bNumDataRatesSupported)
    usbDevice[reader_index].ccid.arrayOfSupportedDataRates =
get_data_rates(reader_index, config_desc, num);

This is the part of the log that shows this problem:
00000172 ccid_usb.c:508:OpenUSBByName() Using USB bus/device: 2/5
02021292 ccid_usb.c:1026:ControlUSB() control failed (2/5): -7 Success
00000042 ccid_usb.c:964:get_data_rates() Wrong GET DATA RATES size: 251

CCID version 1.4.6.

Best wishes,
Bruno




More information about the pcsclite-muscle mailing list