[Pcsclite-muscle] problem with scanning OMNIKEY card

Rajan Gurjar Rajan.Gurjar at ll.mit.edu
Fri Dec 29 10:58:30 PST 2017


> Hi Ludovic
>
> Thanks for your response.
>
> I am now able to read the card on both computers but not sure if it is 
> reading correctly. This is because you stated that CentOS 6 has an old 
> version of the libccid and I cannot find a new version for it. And 
> also you mentioned that the driver version did not match what you had 
> on libccid.
>
> I wonder if I can just download version 1.4 of libccid and install it 
> myself. Would it break anything on CentOS6?
>
> But before that can you please confirm if the following looks good?
>
> *_sudo pcsc_scan_*
> PC/SC device scanner
> V 1.4.25 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau at free.fr>
> Compiled with PC/SC lite version: 1.5.2
> Using reader plug'n play mechanism
> Scanning present readers...
> 0: Identiv SCR3500 A Contact Reader (54301706610500) 00 00
>
> Fri Dec 29 12:11:29 2017
> Reader 0: Identiv SCR3500 A Contact Reader (54301706610500) 00 00
>   Card state: Card inserted,
>   ATR: 3B F9 96 00 00 80 31 FE 45 53 43 45 37 20 03 00 20 46 42
>
> ATR: 3B F9 96 00 00 80 31 FE 45 53 43 45 37 20 03 00 20 46 42
> + TS = 3B --> Direct Convention
> + T0 = F9, Y(1): 1111, K: 9 (historical bytes)
>   TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU
>     250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s
>   TB(1) = 00 --> VPP is not electrically connected
>   TC(1) = 00 --> Extra guard time: 0
>   TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
> -----
>   TD(2) = 31 --> Y(i+1) = 0011, Protocol T = 1
> -----
>   TA(3) = FE --> IFSC: 254
>   TB(3) = 45 --> Block Waiting Integer: 4 - Character Waiting Integer: 5
> + Historical bytes: 53 43 45 37 20 03 00 20 46
>   Category indicator byte: 53 (proprietary format)
> + TCK = 42 (correct checksum)
>
> Possibly identified card (using /root/.cache/smartcard_list.txt):
> 3B F9 96 00 00 80 31 FE 45 53 43 45 37 20 03 00 20 46 42
>     ActivIdentity Activkey Sim (PKI)
> https://www.hidglobal.com/products/cards-and-credentials/activid/usb-tokens
>
> and this is what I get with pcscd -df
> *_
> _**_sudo pcscd -fd_*
> 00000000 pcscdaemon.c:267:main() pcscd set to foreground with debug 
> send to stderr
> 00000022 debuglog.c:239:DebugLogSetLevel() debug level=debug
> 00000796 pcscdaemon.c:506:main() pcsc-lite 1.5.2 daemon ready.
> 00082606 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x04E6, PID: 0x5814
> 00000009 hotplug_libhal.c:342:HPAddDevice() Adding USB device: 
> usb_device_4e6_5814_54301706610500_if0
> 01001240 readerfactory.c:1024:RFInitializeReader() Attempting startup 
> of Identiv SCR3500 A Contact Reader (54301706610500) 00 00 using 
> /usr/lib64/pcsc/drivers/scmccid.bundle/Contents/Linux/libscmccid.so.5.0.35
> 00000434 readerfactory.c:877:RFBindFunctions() Loading IFD Handler 3.0
> Loading libscmccid 5.0.35
> 00012071 readerfactory.c:249:RFAddReader() Using the pcscd polling thread
> 00002852 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x076B, PID: 0x3031
> 00028269 Card ATR: 3B F9 96 00 00 80 31 FE 45 53 43 45 37 20 03 00 20 
> 46 42
> 00033239 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x8087, PID: 0x0024
> 00000696 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x1D6B, PID: 0x0002
> 00001236 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x0451, PID: 0x8041
> 00000522 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x0451, PID: 0x8041
> 00000901 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x1D6B, PID: 0x0003
> 00000708 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x0451, PID: 0x8043
> 00000525 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x0451, PID: 0x8043
> 00000535 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x413C, PID: 0x1004
> 00000524 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x413C, PID: 0x2006
> 00000545 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x413C, PID: 0x2006
> 00001123 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x046D, PID: 0xC044
> 00001030 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x1D6B, PID: 0x0002
> 00001434 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x8087, PID: 0x0024
> 00000847 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 
> 0x1D6B, PID: 0x0002
> ^C40161393 pcscdaemon.c:581:signal_trap() Preparing for suicide
> 01000174 readerfactory.c:1267:RFCleanupReaders() entering cleaning 
> function
> 00000020 readerfactory.c:1276:RFCleanupReaders() Stopping reader: 
> Identiv SCR3500 A Contact Reader (54301706610500) 00 00
> 00000011 eventhandler.c:126:EHDestroyEventHandler() Stomping thread.
> 00000090 eventhandler.c:139:EHDestroyEventHandler() Waiting polling thread
> 00057730 eventhandler.c:474:EHStatusHandlerThread() Die
> 00000401 eventhandler.c:163:EHDestroyEventHandler() Thread stomped.
> 00000015 readerfactory.c:1062:RFUnInitializeReader() Attempting 
> shutdown of Identiv SCR3500 A Contact Reader (54301706610500) 00 00.
> 00002808 readerfactory.c:914:RFUnloadReader() Unloading reader driver.
> 00000281 pcscdaemon.c:531:at_exit() cleaning /var/run
>
> Thanks
> Rajan
>
>
>
>
> On 12/29/2017 06:32 AM, Ludovic Rousseau wrote:
>> Hello,
>>
>> Le 28/12/2017 à 22:52, Rajan Gurjar a écrit :
>>>
>>>
>>> On 12/28/2017 04:17 PM, Rajan Gurjar wrote:
>>>> Hi as per Ludovic's suggestions to my earlier e-mail
>>>>
>>>> I tried the following on two linux systems (same OS but one is a 
>>>> desktop and the other a laptop). Both show different response but 
>>>> both unable to read the card.
>>>>
>>>> First desktop system
>>>>
>>>> ---------------------------
>>>>
>>>> pcscd version:
>>>>
>>>> pcsc-lite version 1.5.2.
>>>> Copyright (C) 1999-2002 by David Corcoran <corcoran at linuxnet.com>.
>>>> Copyright (C) 2001-2008 by Ludovic Rousseau 
>>>> <ludovic.rousseau at free.fr>.
>>>> Copyright (C) 2003-2004 by Damien Sauveron <sauveron at labri.fr>.
>>>> Report bugs to <muscle at lists.musclecard.com>.
>>>> Enabled features: Linux libhal usbdropdir=/usr/lib64/pcsc/drivers 
>>>> confdir=/etc ipcdir=/var/run
>>>>
>>>>
>>>> OS version:
>>>>
>>>> CentOS6.9 -desktop
>>>>
>>>>
>>>> Smart Card:
>>>>
>>>> OMNIKEY Card 3121
>>>>
>>>> sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu 
>>>> --color | tee log.txt
>>>>
>>>> did not work. --color option not available and log file had nothing 
>>>> in it.
>>>>
>>>> Instead copying the screen messages
>>>>
>>>>
>>>> sudo pcscd --foreground --debug --apdu  >> log.txt
>>>>
>>>> 00000000 pcscdaemon.c:267:main() pcscd set to foreground with debug 
>>>> send to stderr
>>>> 00000023 debuglog.c:239:DebugLogSetLevel() debug level=debug
>>>> 00000006 debuglog.c:268:DebugLogSetCategory() Debug options: APDU
>>>> 00001616 pcscdaemon.c:506:main() pcsc-lite 1.5.2 daemon ready.
>>>> 00094949 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x8087, PID: 0x0024
>>>> 00000730 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x1D6B, PID: 0x0002
>>>> 00001241 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x0451, PID: 0x8041
>>>> 00000556 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x0451, PID: 0x8041
>>>> 00000880 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x1D6B, PID: 0x0003
>>>> 00000698 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x0451, PID: 0x8043
>>>> 00000540 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x0451, PID: 0x8043
>>>> 00000527 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x413C, PID: 0x1004
>>>> 00000529 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x413C, PID: 0x2006
>>>> 00000538 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x413C, PID: 0x2006
>>>> 00001052 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x046D, PID: 0xC044
>>>> 00000872 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x1D6B, PID: 0x0002
>>>> 00001244 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x8087, PID: 0x0024
>>>> 00000694 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x1D6B, PID: 0x0002
>>>> ^C22601101 pcscdaemon.c:581:signal_trap() Preparing for suicide
>>>> 01000151 readerfactory.c:1267:RFCleanupReaders() entering cleaning 
>>>> function
>>>> 00000028 pcscdaemon.c:531:at_exit() cleaning /var/run
>>>>
>>>>
>>>> The program hangs at 00000694 - nothing happens.
>>>>
>>>>
>>>> $ sudo pcsc_scan
>>>>
>>>> PC/SC device scanner
>>>> V 1.4.25 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau at free.fr>
>>>> Compiled with PC/SC lite version: 1.5.2
>>>> Using reader plug'n play mechanism
>>>> Scanning present readers...
>>>> Waiting for the first reader...
>>>>
>>>> I am unable to read the card. Any suggestions?
>>
>> Support for the reader OMNIKEY Card 3121 has been added in the CCID 
>> driver version 1.4.17 (June 2014)
>> See https://pcsclite.alioth.debian.org/ccid/shouldwork.html#0x076B0x3022
>>
>> Maybe it is too recent for CentOS6.9 and you only have an older CCID 
>> driver (the package name should be "libccid")
>>
>>>>
>>>>
>>>> Second laptop system
>>>>
>>>> ----------------------------------
>>>>
>>>> I insert the same card and it does
>>>>
>>>> sudo pcscd -v
>>>> pcsc-lite version 1.5.2.
>>>> Copyright (C) 1999-2002 by David Corcoran <corcoran at linuxnet.com>.
>>>> Copyright (C) 2001-2008 by Ludovic Rousseau 
>>>> <ludovic.rousseau at free.fr>.
>>>> Copyright (C) 2003-2004 by Damien Sauveron <sauveron at labri.fr>.
>>>> Report bugs to <muscle at lists.musclecard.com>.
>>>> Enabled features: Linux libhal usbdropdir=/usr/lib64/pcsc/drivers 
>>>> confdir=/etc ipcdir=/var/run
>>>>
>>>>
>>>> sudo pcsc_scan
>>>>
>>>> PC/SC device scanner
>>>> V 1.4.25 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau at free.fr>
>>>> Compiled with PC/SC lite version: 1.5.2
>>>> Using reader plug'n play mechanism
>>>> Scanning present readers...
>>>> 0: OmniKey CardMan 3121-1 00 00
>>>> 1: Broadcom Corp 5880 (0123456789ABCD) 01 00
>>>>
>>>> Thu Dec 28 16:05:09 2017
>>>> Reader 0: OmniKey CardMan 3121-1 00 00
>>>>   Card state: Card inserted, Unresponsive card,
>>>> Reader 1: Broadcom Corp 5880 (0123456789ABCD) 01 00
>>>>   Card state: Card removed,
>>>>
>>>> Thu Dec 28 16:05:23 2017
>>>> Reader 0: OmniKey CardMan 3121-1 00 00
>>>>   Card state: Card removed,
>>>>
>>>> Thu Dec 28 16:05:25 2017
>>>> Reader 0: OmniKey CardMan 3121-1 00 00
>>>>   Card state: Card inserted,
>>>>   ATR: 3B F9 96 00 00 80 31 FE 45 53 43 45 37 20 03 00 20 46 42
>>>>
>>>> ATR: 3B F9 96 00 00 80 31 FE 45 53 43 45 37 20 03 00 20 46 42
>>>> + TS = 3B --> Direct Convention
>>>> + T0 = F9, Y(1): 1111, K: 9 (historical bytes)
>>>>   TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU
>>>>     250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s
>>>>   TB(1) = 00 --> VPP is not electrically connected
>>>>   TC(1) = 00 --> Extra guard time: 0
>>>>   TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
>>>> -----
>>>>   TD(2) = 31 --> Y(i+1) = 0011, Protocol T = 1
>>>> -----
>>>>   TA(3) = FE --> IFSC: 254
>>>>   TB(3) = 45 --> Block Waiting Integer: 4 - Character Waiting 
>>>> Integer: 5
>>>> + Historical bytes: 53 43 45 37 20 03 00 20 46
>>>>   Category indicator byte: 53 (proprietary format)
>>>> + TCK = 42 (correct checksum)
>>>>
>>>> Possibly identified card (using /root/.cache/smartcard_list.txt):
>>>> 3B F9 96 00 00 80 31 FE 45 53 43 45 37 20 03 00 20 46 42
>>>>     ActivIdentity Activkey Sim (PKI)
>>>> https://www.hidglobal.com/products/cards-and-credentials/activid/usb-tokens 
>>>>
>>>>
>>>>
>>>> sudo pcscd -df
>>>> 00000000 pcscdaemon.c:267:main() pcscd set to foreground with debug 
>>>> send to stderr
>>>> 00000632 utils.c:115:StatSynchronize() status file: 
>>>> /var/run/pcscd.events/event.19880.17023819
>>>> 00000158 utils.c:123:StatSynchronize() Can't open 
>>>> /var/run/pcscd.events/event.19880.17023819: Bad file descriptor
>>>> 00001404 pcscdaemon.c:506:main() pcsc-lite 1.5.2 daemon ready.
>>>> 00280801 hotplug_libhal.c:307:get_driver() Looking a driver for 
>>>> VID: 0x076B, PID: 0x3022
>>>> 00000008 hotplug_libhal.c:342:HPAddDevice() Adding USB device: 
>>>> usb_device_76b_3022_noserial_if0
>>>> 01001195 readerfactory.c:1024:RFInitializeReader() Attempting 
>>>> startup of OmniKey CardMan 3121-1 00 00 using 
>>>> /usr/lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
>>>> 00010605 readerfactory.c:877:RFBindFunctions() Loading IFD Handler 3.0
>>>> 00000062 ifdhandler.c:1377:init_driver() Driver version: 1.3.9
>>
>> The CCID driver says it is version 1.3.9.
>>
>> The reader name is "OmniKey CardMan 3121-1 00 00"
>> From the CCID driver 1.4.17 (or newer) the reader name should be 
>> "OMNIKEY AG 3121 USB 00 00".
>>
>> My guess is that someone edited the driver Info.plist file to add an 
>> entry for "OmniKey CardMan 3121-1"
>>
>>>> Although it reads the card it does not show up on reboot.
>>
>> I am not sure to understand what you mean here.
>>
>> Bye
>>
>




More information about the pcsclite-muscle mailing list