[Pcsclite-muscle] Can't access to read Omnikey Card

Carlos Rodrigues cmar
Fri Mar 8 06:55:35 PST 2013


Hi,

I have problems accessing to Omnikey using pcsclite and ccid with
passthrough KVM virtualization machine.

I am using Centos 6.3 with:

# ccid-1.3.9-3
# 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

when i run the following command i get error "02141963
ccid_usb.c:526:ReadUSB() usb_bulk_read(001/009): Resource temporarily
unavailable":

# LIBCCID_ifdLogLevel=0x000F /usr/sbin/pcscd --foreground --debug
00000000 pcscdaemon.c:267:main() pcscd set to foreground with debug send
to stderr
00000065 debuglog.c:239:DebugLogSetLevel() debug level=debug
00000471 pcscdaemon.c:506:main() pcsc-lite 1.5.2 daemon ready.
00144192 hotplug_libhal.c:307:get_driver() Looking a driver for VID:
0x076B, PID: 0x3021
00000019 hotplug_libhal.c:342:HPAddDevice() Adding USB device:
usb_device_76b_3021_noserial_if0
01001457 readerfactory.c:1024:RFInitializeReader() Attempting startup of
OmniKey CardMan 3121 00 00
using /usr/lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000232 readerfactory.c:877:RFBindFunctions() Loading IFD Handler 3.0
00000036 ifdhandler.c:1377:init_driver() Driver version: 1.3.9
00000313 ifdhandler.c:1390:init_driver() LogLevel: 0x0003
00000012 ifdhandler.c:1400:init_driver() LogLevel from
LIBCCID_ifdLogLevel: 0x000F
00000248 ifdhandler.c:1410:init_driver() DriverOptions: 0x0000
00000012 ifdhandler.c:81:IFDHCreateChannelByName() lun: 0, device:
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0
00000016 ccid_usb.c:158:OpenUSBByName() Reader index: 0, Device:
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0
00000407 ccid_usb.c:236:OpenUSBByName() Manufacturer: Ludovic Rousseau
(ludovic.rousseau at free.fr)
00000442 ccid_usb.c:246:OpenUSBByName() ProductString: Generic CCID
driver
00000293 ccid_usb.c:252:OpenUSBByName() Copyright: This driver is
protected by terms of the GNU Lesser General Public License version 2.1,
or (at your option) any later version.
00019688 ccid_usb.c:311:OpenUSBByName() Checking device: 001/009
00000012 ccid_usb.c:361:OpenUSBByName() Trying to open USB bus/device:
001/009
00000038 ccid_usb.c:408:OpenUSBByName() Found Vendor/Product: 076B/3021
(OmniKey CardMan 3121)
00000008 ccid_usb.c:410:OpenUSBByName() Using USB bus/device: 001/009
00000007 ccid_usb.c:836:ControlUSB() request: 0x03
00019192 receive: 00 2A 00 00 01 54 00 00 02 A8 00 00 05 50 01 00 0B A0
02 00 16 40 05 00 08 F8 01 00 0D 48 03 00 67 32 00 00 CE 64 00 00 9C C9
00 00 39 93 01 00 73 26 03 00 E7 4C 06 00 D6 5C 02 00 10 F0 03 00 00 1C
00 00 00 38 00 00 01 70 00 00 03 E0 00 00 07 C0 01 00 0E 80 03 00 09 30
02 00 9A 21 00 00 34 43 00 00 68 86 00 00 D1 0C 01 00 A2 19 02 00 44 33
04 00 00 15 00 00 04 FC 00 00 06 A4 01 00 33 19 00 00 6B 2E 01 00 80 1F
00 00 01 3F 00 00 02 7E 00 00 06 7A 01 00 0A 76 02 00 00 0E 00 00 04 18
01 00 CD 10 00 00 80 0A 00 00 03 D2 00 00 99 0C 00 00 35 97 00 00 C0 0F
00 00 03 BD 00 00 05 3B 01 00 66 08 00 00 14 0A 00 00 29 14 00 00 52 28
00 00 A5 50 00 00 4A A1 00 00 94 42 01 00 F7 78 00 00 84 1E 00 00 09 3D
00 00 12 7A 00 00 24 F4 00 00 48 E8 01 00 90 D0 03 00 36 6E 01 00 5A 62
02 00 9F 24 00 00 3E 49 00 00 7C 92 00 00 F8 24 01 00 F0 49 02 00 E0 93
04 00 74 B7 01 00 6C DC 02 00 58 14 00 00 B0 28 00 00 61 51 00 00 C2 A2
00 00 85 45 01 00 0A 8B 02 00 E6 96 01 00 6A 18 00 00 D4 30 00 00 A8 61
00 00 50 C3 00 00 A0 86 01 00 40 0D 03 00 42 0F 00 00 1B B7 00 00 2D 31
01 00 4F 12 00 00 BA DB 00 00 E3 16 00 00 C6 2D 00 00 8D 5B 00 00 A8 12
01 00 C3 C9 01 00 2C 0A 00 00 73 CB 00 00 35 0C 00 00 A1 07 00 00 96 98
00 00 27 09 00 00 DD 6D 00 00 71 0B 00 00 54 89 00 00 E1 E4 00 00 C4 26
00 00 89 4D 00 00 12 9B 00 00 25 36 01 00 38 D1 01 00 D8 19 00 00 B0 33
00 00 61 67 00 00 C3 CE 00 00 87 9D 01 00 62 13 00 00 9C E8 00 00 AF 83
01 00 EC 0C 00 00 74 02 01 00 B1 09 00 00 4E 74 00 00 D7 C1 00 00 C0 07
00 00 81 0F 00 00 03 1F 00 00 07 3E 00 00 0F 7C 00 00 1E F8 00 00 0B 5D
00 00 2A 1C 00 00 55 38 00 00 AB 70 00 00 57 E1 00 00 AF C2 01 00 03 52
01 00 C7 12 00 00 8E 25 00 00 1D 4B 00 00 3A 96 00 00 74 2C 01 00 91 77
01 00 15 0E 00 00 01 A9 00 00 AD 19 01 00 63 09 00 00 C8 BB 00 00 0A 07
00 00 80 54 00 00 D6 8C 00 00 43 AB 01 53 B6 F7 53 AB FE 85 AC 21 30 55
05 30 54 07 A1 C4 20 54 02 A1 C4 EF 33 D2 0A 92 0B 85 21 AC C2 0A 85 21
AC 33 D2 0A 92 0B 85 21 AC C2 0A 85 21 AC 33 D2 0A 92 0B 85 21 AC C2 0A
85 21 AC 33 D2 0A 92 0B 85 21 AC ...
00000033 ccid_usb.c:798:get_data_rates() Got 256 data rates but was
expecting 106
00000009 ccid_usb.c:816:get_data_rates() declared: 10752 bps
00000006 ccid_usb.c:816:get_data_rates() declared: 21505 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 43010 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 86021 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 172043 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 344086 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 129032 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 215053 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 12903 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 25806 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 51612 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 103225 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 206451 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 412903 bps
00000004 ccid_usb.c:816:get_data_rates() declared: 154838 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 258064 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 7168 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 14336 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 28673 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 57347 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 114695 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 229390 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 143369 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 8602 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 17204 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 34408 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 68817 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 137634 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 275268 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 5376 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 64516 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 107526 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 6451 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 77419 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 8064 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 16129 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 32258 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 96774 bps
00000006 ccid_usb.c:816:get_data_rates() declared: 161290 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 3584 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 71684 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 4301 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 2688 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 53763 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 3225 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 38709 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 4032 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 48387 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 80645 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 2150 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 2580 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 5161 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 10322 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 20645 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 41290 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 82580 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 30967 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 7812 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 15625 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 31250 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 62500 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 125000 bps
00000006 ccid_usb.c:816:get_data_rates() declared: 250000 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 93750 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 156250 bps
00001680 ccid_usb.c:816:get_data_rates() declared: 9375 bps
00000008 ccid_usb.c:816:get_data_rates() declared: 18750 bps
00000006 ccid_usb.c:816:get_data_rates() declared: 37500 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 75000 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 150000 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 300000 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 112500 bps
00000006 ccid_usb.c:816:get_data_rates() declared: 187500 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 5208 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 10416 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 20833 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 41666 bps
00000042 ccid_usb.c:816:get_data_rates() declared: 83333 bps
00000006 ccid_usb.c:816:get_data_rates() declared: 166666 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 104166 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 6250 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 12500 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 25000 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 50000 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 100000 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 200000 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 3906 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 46875 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 78125 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 4687 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 56250 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 5859 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 11718 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 23437 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 70312 bps
00000035 ccid_usb.c:816:get_data_rates() declared: 117187 bps
00000006 ccid_usb.c:816:get_data_rates() declared: 2604 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 52083 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 3125 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 1953 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 39062 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 2343 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 28125 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 2929 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 35156 bps
00000005 ccid_usb.c:816:get_data_rates() declared: 58593 bps
00000017 ifdhandler.c:1243:IFDHICCPresence()
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0 (lun: 0)
00000013 -> 000000 65 00 00 00 00 00 00 00 00 00 
00008501 <- 000000 81 00 00 00 00 00 00 01 00 01 
00000020 ifdhandler.c:1359:IFDHICCPresence() Card present
00000012 ifdhandler.c:334:IFDHGetCapabilities() tag: 0xFB0,
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0 (lun: 0)
00000007 readerfactory.c:249:RFAddReader() Using the pcscd polling
thread
00000007 ifdhandler.c:1243:IFDHICCPresence()
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0 (lun: 0)
00000008 -> 000000 65 00 00 00 00 00 01 00 00 00 
00008813 <- 000000 81 00 00 00 00 00 01 01 00 01 
00000013 ifdhandler.c:1359:IFDHICCPresence() Card present
00000101 ifdhandler.c:334:IFDHGetCapabilities() tag: 0xFAE,
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0 (lun: 0)
00000012 ifdhandler.c:377:IFDHGetCapabilities() Reader supports 1
slot(s)
00000093 ifdhandler.c:1243:IFDHICCPresence()
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0 (lun: 0)
00000021 -> 000000 65 00 00 00 00 00 02 00 00 00 
00008612 <- 000000 81 00 00 00 00 00 02 01 00 01 
00000014 ifdhandler.c:1359:IFDHICCPresence() Card present
00000008 ifdhandler.c:1243:IFDHICCPresence()
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0 (lun: 0)
00000008 -> 000000 65 00 00 00 00 00 03 00 00 00 
00006147 hotplug_libhal.c:307:get_driver() Looking a driver for VID:
0x1D6B, PID: 0x0001
00002822 <- 000000 81 00 00 00 00 00 03 01 00 01 
00000013 ifdhandler.c:1359:IFDHICCPresence() Card present
00000007 ifdhandler.c:964:IFDHPowerICC() action: PowerUp,
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0 (lun: 0)
00000016 -> 000000 62 00 00 00 00 00 04 01 00 00 
00034070 <- 000000 80 14 00 00 00 00 04 00 00 00 3B FA 18 00 FF 81 31 FE
45 4A 43 4F 50 32 31 56 32 33 31 65 
00000030 Card ATR: 3B FA 18 00 FF 81 31 FE 45 4A 43 4F 50 32 31 56 32 33
31 65 
00004068 ifdhandler.c:1243:IFDHICCPresence()
usb:076b/3021:libhal:/org/freedesktop/Hal/devices/usb_device_76b_3021_noserial_if0 (lun: 0)
00000015 -> 000000 65 00 00 00 00 00 05 00 00 00 
02141963 ccid_usb.c:526:ReadUSB() usb_bulk_read(001/009): Resource
temporarily unavailable
00000014 ifdwrapper.c:469:IFDStatusICC() Card not transacted: 612
00000023 eventhandler.c:333:EHStatusHandlerThread() Error communicating
to: OmniKey CardMan 3121 00 00



I am not able to read certificates from card.

# modutil -list  -dbdir /etc/pki/nssdb/ 

Listing of PKCS #11 Modules
-----------------------------------------------------------
  1. NSS Internal PKCS #11 Module
	 slots: 2 slots attached
	status: loaded

	 slot: NSS Internal Cryptographic Services
	token: NSS Generic Crypto Services

	 slot: NSS User Private Key and Certificate Services
	token: NSS Certificate DB

  2. safesign
	library name: /usr/lib64/libaetpkss.so.3
	 slots: 5 slots attached
	status: loaded

	 slot: OmniKey CardMan 3121 00 00
	token: Blank Token

	 slot: UNAVAILABLE 1
	token: 

	 slot: UNAVAILABLE 2
	token: 

	 slot: UNAVAILABLE 3
	token: 

	 slot: UNAVAILABLE 4
	token: 

# lsusb -v  -d 0x076b:0x3021

Bus 001 Device 009: ID 076b:3021 OmniKey AG CardMan 3121
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x076b OmniKey AG
  idProduct          0x3021 CardMan 3121
  bcdDevice            3.02
  iManufacturer           1 OMNIKEY AG
  iProduct                2 Smart Card Reader USB
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           93
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          3 CCID
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass        11 Chip/SmartCard
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ChipCard Interface Descriptor:
        bLength                54
        bDescriptorType        33
        bcdCCID              1.00
        nMaxSlotIndex           0
        bVoltageSupport         7  5.0V 3.0V 1.8V 
        dwProtocols             3  T=0 T=1
        dwDefaultClock       4800
        dwMaxiumumClock      8000
        bNumClockSupported      4
        dwDataRate          10752 bps
        dwMaxDataRate      412903 bps
        bNumDataRatesSupp.    106
        dwMaxIFSD             254
        dwSyncProtocols  00000007  2-wire 3-wire I2C
        dwMechanical     00000000 
        dwFeatures       000207B2
          Auto configuration based on ATR
          Auto clock change
          Auto baud rate change
          Auto PPS made by CCID
          CCID can set ICC in clock stop mode
          NAD value other than 0x00 accpeted
          Auto IFSD exchange
          Short APDU level exchange
        dwMaxCCIDMsgLen       271
        bClassGetResponse    echo
        bClassEnvelope       echo
        wlcdLayout           none
        bPINSupport             0 
        bMaxCCIDBusySlots       1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)


Any suggestions for debug or solve the problem?

Best regards,

-- 
Carlos Rodrigues <cmar at eurotux.com>

Engenheiro de Software S?nior

Eurotux Inform?tica, S.A. | www.eurotux.com

(t) +351 253 680 300


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20130308/f92d40c5/attachment.pgp>



More information about the pcsclite-muscle mailing list