[Pcsclite-muscle] bNumDataRatesSupported = 0 and get_data_rates
Bruno Jesus
00cpxxx at gmail.com
Tue May 22 19:55:11 UTC 2012
On Tue, May 22, 2012 at 11:22 AM, Ludovic Rousseau
<ludovic.rousseau at gmail.com> wrote:
> You should use the MUSCLE list instead
> http://musclecard.com/list.html
Sorry for posting in the wrong list.
>> 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
>
> This should not prevent the driver from working correctly.
Thanks, I'll look for other issues then.
> Your reader DO return data rates. But I guess that is just 251 bytes
> of random data.
> Your log trace do not show any sign of rejection by the driver.
OK, I was wondering why the lib have to ask for the data rates when
they are not supported. Is my change suggestion wrong?
> Bye
> Dr. Ludovic Rousseau
Thanks again,
Bruno
More information about the Pcsclite-muscle
mailing list