[Pcsclite-muscle] OMNIKEY AG 3121 USB not working with libccid 1.4.17 and PCSC-Lite 1.8.11
Ludovic Rousseau
ludovic.rousseau
Mon Jul 14 11:24:22 PDT 2014
Hello,
2014-07-14 16:43 GMT+02:00 Stein, Maximilian <Maximilian.Stein at secunet.com>:
> Hi,
>
> I'm currently testing the compatibility of the new revision of the HID Global
> Omnikey 3121 USB Smart card reader with the latest libccid and PCSC-Lite
> version. In CCID 1.4.17 the reader was added with the name 'OMNIKEY AG 3121 USB'
> which is the new revision of the 'OMNIKEY AG CardMan 3121'. The reader is
> currently in the "Should Work" list (http://pcsclite.alioth.debian.org/ccid/shouldwork.html),
> but I was unable to use it to transmit APDUs to a smart card.
>
> The reader is detected and recognized by the pcscd and card insertion/removal
> detection including the ATR works perfectly. However I was not able to transmit
> APDUs to the inserted smart card because of the error(s):
> 00000012 ifdwrapper.c:553:IFDTransmit() Card not transacted: 612
> 00000011 winscard.c:1638:SCardTransmit() Card not transacted: 0x80100016
> The error occurs with different smart cards on different GNU/Linux systems
> without any virtualization and such. I also tried this with other
> PCSC-Lite 1.8.x versions, all resulting in the same error. The smart card reader
> works fine with the official Omnikey drivers so I assume that the reader itself
> works fine and without errors.
>
> I attached/included the pcscd log file for the test binary included in PCSC-Lite
> (pcsc-lite-1.8.11/src/testpcsc) and the following steps:
> 1. Start the program
> 2. Attach the smart card reader
> 3. Insert a smart card
> 4. Watch it fail :-(
> Furthermore I included the output of the CCID compliance check output from
> ccid-1.4.17/src/parse.
>
>
> As you can see in log.txt starting from line 297 the transaction fails because
> of an error in the T=1 protocol after the defined number of retries were not
> successful. I took a look around in the libccid source code to find the source
> of the line 297
> 00000020 commands.c:2181:CmdXfrBlockTPDU_T1() T=1: 7 and 264 bytes
> When using the older revision of the smart card terminal for the same program, I
> noticed that protocol T=1 is selected by the application as well, but the CCID
> drivers seems to ignore this selection and uses
> commands.c:1715:CmdXfrBlockTPDU_T0() T=0: 8 bytes
> for transmission instead. I don't know if this information is helpful but it
> seemed quite strange to me. The data sheet of the OMNIKEY 3121
> (http://www.hidglobal.com/sites/hidglobal.com/files/resource_files/ok-3121-usb-ds-en_0.pdf)
> states that protocols T=0 and T=1 are both supported. So the question would be
> why T=0 is auto-selected for the old revision but T=1 for the new one and why
> T=1 fails.
Thanks for the extensive bug report. I appreciate.
In the CCID driver, edit the file src/ccid.c and at line 61 replace:
case CARDMAN3121+1:
by
case CARDMAN3121:
Bye
--
Dr. Ludovic Rousseau
More information about the pcsclite-muscle
mailing list