[Pcsclite-muscle] Yubikey init failed

Robin Lambertz robinlambertz+dev
Mon Feb 13 16:53:22 PST 2017


Hello,

I'm trying to get my Yubikey NEO to work with GPG in an archlinux VM on 
Qubes OS. Unfortunately, it seems that PCSCD is unable to work with my 
yubikey, it doesn't appear when running pcsc_scan.

I started pcscd with `sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground 
--debug --apdu --color | tee log.txt` to get more info about where the 
problem could come from. The full logs are attached, but the interesting 
bits are here :

```
00000206 ccid_usb.c:621:OpenUSBByName() Found Vendor/Product: 1050/0111 
(Yubico Yubikey NEO OTP+CCID)
00000012 ccid_usb.c:623:OpenUSBByName() Using USB bus/device: 2/4
00000010 ccid_usb.c:680:OpenUSBByName() bNumDataRatesSupported is 0
00001997 ccid_usb.c:1244:InterruptRead() before (0)
00103904 ccid_usb.c:1290:InterruptRead() after (0) (2)
00000072 -> 000000 65 00 00 00 00 00 00 00 00 00
00002614 <- 000000 81 00 00 00 00 00 00 00 00 00
00000050 -> 000000 65 00 00 00 00 00 01 00 00 00
00103063 ccid_usb.c:836:ReadUSB() read failed (2/4): -7 LIBUSB_ERROR_TIMEOUT
00000224 -> 000000 65 00 00 00 00 00 02 00 00 00
05002241 ccid_usb.c:797:WriteUSB() write failed (2/4): -7 
LIBUSB_ERROR_TIMEOUT
00000242 ifdhandler.c:188:CreateChannelByNameOrChannel() failed
00000159 ccid_usb.c:879:CloseUSB() Closing USB device: 2/4
00000151 ccid_usb.c:889:CloseUSB() Last slot closed. Release resources
00000240 ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00000476 readerfactory.c:1110:RFInitializeReader() Open Port 0x200000 
Failed (usb:1050/0111:libudev:1:/dev/bus/usb/002/004)
00000161 readerfactory.c:375:RFAddReader() Yubico Yubikey NEO OTP+CCID 
init failed.
```

ReadUSB returns immediately with the TIMEOUT error (isn't that weird ?), 
while the WriteUSB times out after 5 seconds. I'm not sure what to do to 
further debug this. Any hint as to what I could do to figure out where 
the issue is coming from ?

Additional info :

# Versions

- CCID driver version : 1.4.25

- pcsc-lite version : 1.8.20

- smart card reader : Yubico Yubikey NEO OTP+CCID

- output of /usr/sbin/pcscd --version :
```
pcsc-lite version 1.8.20.
Copyright (C) 1999-2002 by David Corcoran <corcoran at musclecard.com>.
Copyright (C) 2001-2015 by Ludovic Rousseau <ludovic.rousseau at free.fr>.
Copyright (C) 2003-2004 by Damien Sauveron <sauveron at labri.fr>.
Report bugs to <pcsclite-muscle at lists.alioth.debian.org>.
Enabled features: Linux x86_64-pc-linux-gnu serial usb libudev 
usbdropdir=/usr/lib/pcsc/drivers ipcdir=/run/pcscd 
configdir=/etc/reader.conf.d
```

- OS: ArchLinux in a VM, kernel version 4.4.38-11.pvops.qubes.x86_64
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20170214/e8271008/attachment.html>
-------------- next part --------------
00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug
00000275 debuglog.c:310:DebugLogSetCategory() Debug options: APDU
00000029 pcscdaemon.c:351:main() Force colored logs
00000428 configfile.l:282:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000063 configfile.l:319:DBGetReaderListDir() Skipping non regular file: ..
00000014 configfile.l:319:DBGetReaderListDir() Skipping non regular file: .
00000013 configfile.l:358:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000201 pcscdaemon.c:655:main() pcsc-lite 1.8.20 daemon ready.
00006163 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000661 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
13709193 hotplug_libudev.c:648:HPEstablishUSBNotifications() USB Device add
00000196 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1050, PID: 0x0111, path: /dev/bus/usb/002/004
00000014 hotplug_libudev.c:433:HPAddDevice() Adding USB device: Yubico Yubikey NEO OTP+CCID
00000060 readerfactory.c:1079:RFInitializeReader() Attempting startup of Yubico Yubikey NEO OTP+CCID 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00049489 readerfactory.c:954:RFBindFunctions() Loading IFD Handler 3.0
00000115 ifdhandler.c:1953:init_driver() Driver version: 1.4.25
00000818 ifdhandler.c:1970:init_driver() LogLevel: 0x0003
00000033 ifdhandler.c:1981:init_driver() DriverOptions: 0x0000
00000164 ifdhandler.c:1994:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000011 ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:1050/0111:libudev:0:/dev/bus/usb/002/004
00000009 ccid_usb.c:237:OpenUSBByName() Reader index: 0, Device: usb:1050/0111:libudev:0:/dev/bus/usb/002/004
00000030 ccid_usb.c:269:OpenUSBByName() interface_number: 0
00000042 ccid_usb.c:270:OpenUSBByName() usb bus/device: 2/4
00000035 ccid_usb.c:287:OpenUSBByName() Using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00000474 ccid_usb.c:305:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau at free.fr)
00000010 ccid_usb.c:306:OpenUSBByName() ifdProductString: Generic CCID driver
00000007 ccid_usb.c:307: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.
00001679 ccid_usb.c:391:OpenUSBByName() Try device: 2/4
00000016 ccid_usb.c:401:OpenUSBByName() vid/pid : 1050/0111
00000005 ccid_usb.c:448:OpenUSBByName() Checking device: 2/4
00000004 ccid_usb.c:519:OpenUSBByName() Trying to open USB bus/device: 2/4
00000085 ccid_usb.c:599:OpenUSBByName() Found interface 1 but expecting 0
00000051 ccid_usb.c:601:OpenUSBByName() Wrong interface for USB device 2/4. Checking next one.
00000081 ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00000147 ccid_usb.c:749:OpenUSBByName() Device not found?
00000014 ifdhandler.c:144:CreateChannelByNameOrChannel() failed
00000014 readerfactory.c:1110:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0111:libudev:0:/dev/bus/usb/002/004)
00000008 readerfactory.c:375:RFAddReader() Yubico Yubikey NEO OTP+CCID init failed.
00000013 readerfactory.c:608:RFRemoveReader() UnrefReader() count was: 1
00000015 readerfactory.c:1130:RFUnInitializeReader() Attempting shutdown of Yubico Yubikey NEO OTP+CCID 00 00.
00000005 readerfactory.c:991:RFUnloadReader() Unloading reader driver.
00000232 hotplug_libudev.c:648:HPEstablishUSBNotifications() USB Device add
00000200 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1050, PID: 0x0111, path: /dev/bus/usb/002/004
00000018 hotplug_libudev.c:433:HPAddDevice() Adding USB device: Yubico Yubikey NEO OTP+CCID
00000074 readerfactory.c:1079:RFInitializeReader() Attempting startup of Yubico Yubikey NEO OTP+CCID 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000435 readerfactory.c:954:RFBindFunctions() Loading IFD Handler 3.0
00000047 ifdhandler.c:1953:init_driver() Driver version: 1.4.25
00000703 ifdhandler.c:1970:init_driver() LogLevel: 0x0003
00000016 ifdhandler.c:1981:init_driver() DriverOptions: 0x0000
00000223 ifdhandler.c:1994:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000014 ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:1050/0111:libudev:1:/dev/bus/usb/002/004
00000012 ccid_usb.c:237:OpenUSBByName() Reader index: 0, Device: usb:1050/0111:libudev:1:/dev/bus/usb/002/004
00000016 ccid_usb.c:269:OpenUSBByName() interface_number: 1
00000007 ccid_usb.c:270:OpenUSBByName() usb bus/device: 2/4
00000008 ccid_usb.c:287:OpenUSBByName() Using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00000893 ccid_usb.c:305:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau at free.fr)
00000024 ccid_usb.c:306:OpenUSBByName() ifdProductString: Generic CCID driver
00000015 ccid_usb.c:307: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.
00003468 ccid_usb.c:391:OpenUSBByName() Try device: 2/4
00000030 ccid_usb.c:401:OpenUSBByName() vid/pid : 1050/0111
00000013 ccid_usb.c:448:OpenUSBByName() Checking device: 2/4
00000020 ccid_usb.c:519:OpenUSBByName() Trying to open USB bus/device: 2/4
00000206 ccid_usb.c:621:OpenUSBByName() Found Vendor/Product: 1050/0111 (Yubico Yubikey NEO OTP+CCID)
00000012 ccid_usb.c:623:OpenUSBByName() Using USB bus/device: 2/4
00000010 ccid_usb.c:680:OpenUSBByName() bNumDataRatesSupported is 0
00001997 ccid_usb.c:1244:InterruptRead() before (0)
00103904 ccid_usb.c:1290:InterruptRead() after (0) (2)
00000072 -> 000000 65 00 00 00 00 00 00 00 00 00 
00002614 <- 000000 81 00 00 00 00 00 00 00 00 00 
00000050 -> 000000 65 00 00 00 00 00 01 00 00 00 
00103063 ccid_usb.c:836:ReadUSB() read failed (2/4): -7 LIBUSB_ERROR_TIMEOUT
00000224 -> 000000 65 00 00 00 00 00 02 00 00 00 
05002241 ccid_usb.c:797:WriteUSB() write failed (2/4): -7 LIBUSB_ERROR_TIMEOUT
00000242 ifdhandler.c:188:CreateChannelByNameOrChannel() failed
00000159 ccid_usb.c:879:CloseUSB() Closing USB device: 2/4
00000151 ccid_usb.c:889:CloseUSB() Last slot closed. Release resources
00000240 ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00000476 readerfactory.c:1110:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0111:libudev:1:/dev/bus/usb/002/004)
00000161 readerfactory.c:375:RFAddReader() Yubico Yubikey NEO OTP+CCID init failed.
00000133 readerfactory.c:608:RFRemoveReader() UnrefReader() count was: 1
00000127 readerfactory.c:1130:RFUnInitializeReader() Attempting shutdown of Yubico Yubikey NEO OTP+CCID 00 00.
00000123 readerfactory.c:991:RFUnloadReader() Unloading reader driver.
00000695 hotplug_libudev.c:520:HPAddDevice() Failed adding USB device: Yubico Yubikey NEO OTP+CCID



More information about the pcsclite-muscle mailing list