Hello,

I'm trying to make my Yubikey Neo (a PGP smartcard) accessible to my GPG Qube in a split-gpg + sys-usb setup. When attaching the Yubikey to the GPG VM, however, PCSCD doesn't seem to detect my Yubikey (which leads it to being unusable with gpg). I tried both an up-to-date archlinux and the default fedora-23 templates, and in both cases the yubikey neo doesn't show up in `pcsc_scan`.

I started pcscd with `sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee log.txt` to get more info. The 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.
```

When attaching the yubikey to the VM, ReadUSB returns immediately with the TIMEOUT error (isn't that weird ?), while the WriteUSB times out after 5 seconds. I'm wondering if it was possible the Qubes USB proxy could cause those timeouts ? Anyone knows what else could cause those errors ?

Thank you for your time :)

Robin Lambertz

--
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/o7tt6k%24v4i%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.
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.rouss...@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.rouss...@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

Reply via email to