Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to init usb readers #44

Closed
qxlsz opened this issue Jul 25, 2018 · 3 comments
Closed

Unable to init usb readers #44

qxlsz opened this issue Jul 25, 2018 · 3 comments

Comments

@qxlsz
Copy link

qxlsz commented Jul 25, 2018

Loading libscmccid 5.0.35
04236586 ifdhandler.c:1158:IFDHPowerICC() action: PowerDown, usb:04e6/5721:libudev:1:/dev/bus/usb/001/003 (lun: 0)
00016897 eventhandler.c:481:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
10761997 readerfactory.c:1043:RFInitializeReader() Open Port 0x200006 Failed (usb:04e6/5721:libudev:0:/dev/bus/usb/001/005)
00000048 readerfactory.c:335:RFAddReader() Identiv uTRust 4710 F CL + SAM Reader [CLOUD 4710 F SAM Reader] (53241322202448) init failed.
00000012 readerfactory.c:558:RFRemoveReader() UnrefReader() count was: 1
00000008 readerfactory.c:1063:RFUnInitializeReader() Attempting shutdown of Identiv uTRust 4710 F CL + SAM Reader [CLOUD 4710 F SAM Reader] (53241322202448) 05 00.
00000012 hotplug_libudev.c:507:HPAddDevice() Failed adding USB device: Identiv uTRust 4710 F CL + SAM Reader
00000017 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFAF, usb:04e6/5721:libudev:1:/dev/bus/usb/001/003 (lun: 0)
00000010 readerfactory.c:680:RFSetReaderName() Support 16 simultaneous readers
00000015 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFAD, usb:04e6/5721:libudev:1:/dev/bus/usb/001/003 (lun: 0)
00000006 readerfactory.c:297:RFAddReader() Driver is thread safe
00000010 readerfactory.c:1012:RFInitializeReader() Attempting startup of Identiv uTRust 4710 F CL + SAM Reader [CLOUD 4710 F SAM Reader] (53241322202448) 01 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000026 readerfactory.c:811:RFLoadReader() Reusing already loaded driver for /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000026 readerfactory.c:897:RFBindFunctions() Loading IFD Handler 3.0
00000033 ifdhandler.c:111:CreateChannelByNameOrChannel() Lun: 10000, device: usb:04e6/5721:libudev:0:/dev/bus/usb/001/005
00000019 ccid_usb.c:302:OpenUSBByName() Using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00001309 ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau ([email protected])
00000015 ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver
00000009 ccid_usb.c:322: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.
00000354 ccid_usb.c:656:OpenUSBByName() Found Vendor/Product: 04E6/5721 (Identive Identive CLOUD 4510 F Contactless + SAM Reader)
00000012 ccid_usb.c:658:OpenUSBByName() Using USB bus/device: 1/5
00000008 ccid_usb.c:717:OpenUSBByName() bNumDataRatesSupported is 0
07541745 ccid_usb.c:849:WriteUSB() write failed (1/5): -7 LIBUSB_ERROR_TIMEOUT
05000193 ccid_usb.c:849:WriteUSB() write failed (1/5): -7 LIBUSB_ERROR_TIMEOUT
05000182 ccid_usb.c:849:WriteUSB() write failed (1/5): -7 LIBUSB_ERROR_TIMEOUT
00000025 ifdhandler.c:195:CreateChannelByNameOrChannel() failed
00000078 readerfactory.c:1043:RFInitializeReader() Open Port 0x200006 Failed (usb:04e6/5721:libudev:0:/dev/bus/usb/001/005)
00000041 readerfactory.c:335:RFAddReader() Identiv uTRust 4710 F CL + SAM Reader [CLOUD 4710 F SAM Reader] (53241322202448) init failed.
00000019 readerfactory.c:558:RFRemoveReader() UnrefReader() count was: 1
00000014 readerfactory.c:1063:RFUnInitializeReader() Attempting shutdown of Identiv uTRust 4710 F CL + SAM Reader [CLOUD 4710 F SAM Reader] (53241322202448) 01 00.
00000017 hotplug_libudev.c:517:HPAddDevice() Failed adding USB device: Identiv uTRust 4710 F CL + SAM Reader
00000407 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x04E6, PID: 0x5721, path: /dev/bus/usb/001/005

Not sure what is it struggling for

@LudovicRousseau
Copy link
Owner

Please always provide a FULL log. See https://ccid.apdu.fr/#support

Do you use a virtual machine?

@Wonfee
Copy link

Wonfee commented Oct 17, 2018

When porting it to android, seems got the same problem.

./parse

Parsing USB bus/device: 0BDA:0169 (bus 1, device 22)
idVendor: 0x0BDA iManufacturer: Generic
idProduct: 0x0169 iProduct: USB2.0-CRW
Found a CCID/ICCD device at interface 0
idVendor: 0x0BDA
iManufacturer: Generic
idProduct: 0x0169
iProduct: USB2.0-CRW
bcdDevice: 61.23 (firmware release?)
bLength: 9
bDescriptorType: 4
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 3
bulk-IN, bulk-OUT and Interrupt-IN
bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
bInterfaceSubClass: 0
bInterfaceProtocol: 0
bulk transfer, optional interrupt-IN (CCID)
iInterface: Smart Card Reader Interface
CCID Class Descriptor
bLength: 0x36
bDescriptorType: 0x21
bcdCCID: 1.10
bMaxSlotIndex: 0x00
bVoltageSupport: 0x07
5.0V
3.0V
1.8V
dwProtocols: 0x0000 0x0003
T=0
T=1
dwDefaultClock: 3.750 MHz
dwMaximumClock: 7.500 MHz
bNumClockSupported: 0 (will use whatever is returned)
IFD does not support GET CLOCK FREQUENCIES request: Try again
dwDataRate: 10080 bps
dwMaxDataRate: 312500 bps
bNumDataRatesSupported: 0 (will use whatever is returned)
IFD does not support GET_DATA_RATES request: Try again
dwMaxIFSD: 254
dwSynchProtocols: 0x00000000
dwMechanical: 0x00000000
No special characteristics
dwFeatures: 0x00010030
....10 Automatic ICC clock frequency change according to parameters
....20 Automatic baud rate change according to frequency and Fi, Di params
01.... TPDU level exchange
dwMaxCCIDMessageLength: 271 bytes
bClassGetResponse: 0x00
bClassEnvelope: 0x00
wLcdLayout: 0x0000
bPINSupport: 0x00
bMaxCCIDBusySlots: 1


LIBCCID_ifdLogLevel=0x000F=0x000F ./pcscd --foreground --debug --apdu --color

00000000 smartCard_src/jni/pcsc-lite-1.8.24/src/debuglog.c:299:DebugLogSetLevel() debug level=debug
00000154 smartCard_src/jni/pcsc-lite-1.8.24/src/debuglog.c:320:DebugLogSetCategory() Debug options: APDU
00000067 smartCard_src/jni/pcsc-lite-1.8.24/src/pcscdaemon.c:352:main() Force colored logs
00000401 configfile.l:360:DBGetReaderList() Parsing conf file: /data/pcsc/etc/reader.conf.d
00000094 smartCard_src/jni/pcsc-lite-1.8.24/src/pcscdaemon.c:662:main() pcsc-lite 1.8.24 daemon ready.
00007112 smartCard_src/jni/pcsc-lite-1.8.24/src/hotplug_libusb.c:536:HPAddHotPluggable() Adding USB device: 1:22:0
00015518 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:1075:RFInitializeReader() Attempting startup of Generic USB2.0-CRW (20070818000000000) 00 00 using /data/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000597 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0
00000000 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:1961:init_driver() Driver version: 1.4.30
00002981 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:1978:init_driver() LogLevel: 0x0003
00000043 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:1989:init_driver() DriverOptions: 0x0000
00000977 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:2002:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000038 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:0bda/0169:libhal:/org/freedesktop/Hal/devices/usb_device_0bda_0169_serialnotneeded_if0
00000036 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:237:OpenUSBByName() Reader index: 0, Device: usb:0bda/0169:libhal:/org/freedesktop/Hal/devices/usb_device_0bda_0169_serialnotneeded_if0
00000049 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:302:OpenUSBByName() Using: /data/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00002883 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau ([email protected])
00000037 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver
00000028 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:322: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.
00001380 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:406:OpenUSBByName() Try device: 1/22
00000115 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:416:OpenUSBByName() vid/pid : 0BDA/0169
00000066 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:483:OpenUSBByName() Checking device: 1/22
00000066 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:554:OpenUSBByName() Trying to open USB bus/device: 1/22
00000300 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:660:OpenUSBByName() Found Vendor/Product: 0BDA/0169 (Generic USB2.0-CRW)
00000112 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:662:OpenUSBByName() Using USB bus/device: 1/22
00000071 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:722:OpenUSBByName() bNumDataRatesSupported is 0
00031306 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:1306:InterruptRead() before (0)
00064430 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:1352:InterruptRead() after (0) (0)
NotifySlotChange: 50 03
-> 000000 65 00 00 00 00 00 00 00 00 00
00000829 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:898:ReadUSB() read failed (1/22): -1 LIBUSB_ERROR_IO
-> 000000 65 00 00 00 00 00 01 00 00 00
00248341 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:898:ReadUSB() read failed (1/22): -1 LIBUSB_ERROR_IO
-> 000000 65 00 00 00 00 00 02 00 00 00
00248312 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:898:ReadUSB() read failed (1/22): -1 LIBUSB_ERROR_IO
00000072 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:194:CreateChannelByNameOrChannel() failed
00000025 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:941:CloseUSB() Closing USB device: 1/22
00000025 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:951:CloseUSB() Last slot closed. Release resources
00000108 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00602902 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:1106:RFInitializeReader() Open Port 0x200000 Failed (usb:0bda/0169:libhal:/org/freedesktop/Hal/devices/usb_device_0bda_0169_serialnotneeded_if0)
00000031 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:376:RFAddReader() Generic USB2.0-CRW (20070818000000000) init failed.
00000027 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:610:RFRemoveReader() UnrefReader() count was: 1
00000024 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:1126:RFUnInitializeReader() Attempting shutdown of Generic USB2.0-CRW (20070818000000000) 00 00.
00000025 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:987:RFUnloadReader() Unloading reader driver.
00000201 smartCard_src/jni/pcsc-lite-1.8.24/src/hotplug_libusb.c:536:HPAddHotPluggable() Adding USB device: 1:22:1
00015616 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:1075:RFInitializeReader() Attempting startup of Generic USB2.0-CRW (20070818000000000) 00 00 using /data/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000689 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0
00000000 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:1961:init_driver() Driver version: 1.4.30
00002970 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:1978:init_driver() LogLevel: 0x0003
00000038 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:1989:init_driver() DriverOptions: 0x0000
00000967 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:2002:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000037 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:0bda/0169:libhal:/org/freedesktop/Hal/devices/usb_device_0bda_0169_serialnotneeded_if1
00000035 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:237:OpenUSBByName() Reader index: 0, Device: usb:0bda/0169:libhal:/org/freedesktop/Hal/devices/usb_device_0bda_0169_serialnotneeded_if1
00000050 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:302:OpenUSBByName() Using: /data/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00002881 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau ([email protected])
00000036 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver
00000029 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:322: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.
00000998 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:406:OpenUSBByName() Try device: 1/22
00000036 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:416:OpenUSBByName() vid/pid : 0BDA/0169
00000025 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:483:OpenUSBByName() Checking device: 1/22
00000025 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:554:OpenUSBByName() Trying to open USB bus/device: 1/22
00000264 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:660:OpenUSBByName() Found Vendor/Product: 0BDA/0169 (Generic USB2.0-CRW)
00000036 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:662:OpenUSBByName() Using USB bus/device: 1/22
00000034 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:722:OpenUSBByName() bNumDataRatesSupported is 0
00031499 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:1306:InterruptRead() before (0)
00100827 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:1352:InterruptRead() after (0) (2)
-> 000000 65 00 00 00 00 00 00 00 00 00
00101939 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:898:ReadUSB() read failed (1/22): -1 LIBUSB_ERROR_IO
-> 000000 65 00 00 00 00 00 01 00 00 00
00248271 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:898:ReadUSB() read failed (1/22): -1 LIBUSB_ERROR_IO
-> 000000 65 00 00 00 00 00 02 00 00 00
00248295 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:898:ReadUSB() read failed (1/22): -1 LIBUSB_ERROR_IO
00000077 smartCard_src/jni/ccid-1.4.30/src/ifdhandler.c:194:CreateChannelByNameOrChannel() failed
00000024 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:941:CloseUSB() Closing USB device: 1/22
00000025 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:951:CloseUSB() Last slot closed. Release resources
00000112 smartCard_src/jni/ccid-1.4.30/src/ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00739840 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:1106:RFInitializeReader() Open Port 0x200001 Failed (usb:0bda/0169:libhal:/org/freedesktop/Hal/devices/usb_device_0bda_0169_serialnotneeded_if1)
00000031 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:376:RFAddReader() Generic USB2.0-CRW (20070818000000000) init failed.
00000028 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:610:RFRemoveReader() UnrefReader() count was: 1
00000025 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:1126:RFUnInitializeReader() Attempting shutdown of Generic USB2.0-CRW (20070818000000000) 00 00.
00000025 smartCard_src/jni/pcsc-lite-1.8.24/src/readerfactory.c:987:RFUnloadReader() Unloading reader driver.
00000458 smartCard_src/jni/pcsc-lite-1.8.24/src/hotplug_libusb.c:440:HPEstablishUSBNotifications() Driver ifd-ccid.bundle does not support IFD_GENERATE_HOTPLUG. Using active polling instead.
00000034 smartCard_src/jni/pcsc-lite-1.8.24/src/hotplug_libusb.c:449:HPEstablishUSBNotifications() Polling forced every 1 second(s)

@LudovicRousseau
Copy link
Owner

It looks like your libusb is not working as expected on Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants