[Pcsclite-muscle] problem with scanning OMNIKEY card

Ludovic Rousseau ludovic.rousseau at free.fr
Fri Dec 29 03:32:56 PST 2017


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

-- 
  Dr. Ludovic Rousseau



More information about the pcsclite-muscle mailing list