On 03/20/2011 10:43 AM, Ludovic Rousseau wrote:
>   ------------------
> 
> Such hardware is "almost CCID" device. It has been created before CCID
> become standard and despite it's still manufactured and sold, it has not
> been converted into true CCID even after protocol become standardized.
> 
> Device has CCID-like descriptor (see attached output of 'param", note
> that 'param' has been slightly modified to show content of CCID
> descriptor despite of suchh device class)
> 
> The deviations from standard are:
> 
> 1. device class is 0x00, but
> 2. CCID descriptor has bogus bMaxSlotIndex and wLcdLayout
> 
> The vendor's driver solve the problem by:
> 
> 1. accepting device despite of it's class (based on vid/did)
> 2. ignore device supplied values in CCID descriptor and hardwire
> bMaxSlotIndex=2, wLcdLayout=0 in own sources
> 
>   ----------------------
> 

FWIW, this is basically the same thing I had to do to get the ACR83
functioning, except that gave bad values for dwMaxIFSD, dwDefaultClock,
and dwMaxDataRate that I had to replace.

I never did get it working with my T=1 card though.

Patch against libccid-1.4.2 is attached in case anyone wants to try to
succeed where I failed.

-- 
-Grant

"Look around! Can you construct some sort of rudimentary lathe?"
diff --git a/readers/supported_readers.txt b/readers/supported_readers.txt
index eb5cab1..b238275 100644
--- a/readers/supported_readers.txt
+++ b/readers/supported_readers.txt
@@ -84,6 +84,7 @@
 0x072F:0x2200:ACS ACR122U PICC Interface
 0x072F:0x8201:ACS APG8201 PINhandy 1
 0x072F:0x90CC:ACS ACR 38U-CCID
+0x072F:0x90D2:ACS ACR83 USB Reader
 
 # O2 Micro
 0x0B97:0x7762:O2 Micro Oz776
diff --git a/src/ccid_usb.c b/src/ccid_usb.c
index ed7eefc..bb68819 100644
--- a/src/ccid_usb.c
+++ b/src/ccid_usb.c
@@ -565,6 +565,15 @@ again:
 						usbDevice[reader_index].ccid.sIFD_serial_number
 							= strdup((char *)serial);
 				}
+
+				// ACR83 provides bad data - fix here
+				if (desc.idVendor == 0x72F && desc.idProduct == 0x90D2)
+				  {
+				    usbDevice[reader_index].ccid.dwMaxIFSD = 0xFE;
+				    usbDevice[reader_index].ccid.dwDefaultClock = 0xFA0;
+				    usbDevice[reader_index].ccid.dwMaxDataRate = 0xFA0;
+				  }
+
 				goto end;
 			}
 		}
@@ -853,6 +862,8 @@ static int get_end_points(struct libusb_config_descriptor *desc,
 	{
 		/* CCID Class? */
 		if (desc->interface[i].altsetting->bInterfaceClass == 0xb
+		    //ACS readers sometimes provide bogus class
+		    || desc->interface[i].altsetting->bInterfaceClass == 0x0
 #ifdef ALLOW_PROPRIETARY_CLASS
 			|| desc->interface[i].altsetting->bInterfaceClass == 0xff
 #endif
diff --git a/src/parse.c b/src/parse.c
index 0ec44b4..e2f69d1 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -308,7 +308,8 @@ static int ccid_parse_interface_descriptor(libusb_device_handle *handle,
 	}
 
 	(void)printf(" bInterfaceClass: 0x%02X", usb_interface_descriptor->bInterfaceClass);
-	if (usb_interface_descriptor->bInterfaceClass == 0x0b)
+	if (usb_interface_descriptor->bInterfaceClass == 0x0b
+	    || usb_interface_descriptor->bInterfaceClass == 0x0)
 		(void)printf(" [Chip Card Interface Device Class (CCID)]\n");
 	else
 	{

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to