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

ccid_usb.c ReadUSB read failed: -7 LIBUSB_ERROR_TIMEOUT #29

Closed
nicolasbadia opened this issue Dec 22, 2017 · 5 comments
Closed

ccid_usb.c ReadUSB read failed: -7 LIBUSB_ERROR_TIMEOUT #29

nicolasbadia opened this issue Dec 22, 2017 · 5 comments

Comments

@nicolasbadia
Copy link

I'm having trouble with an "Identiv uTrust 3700 F CL Reader".
Here is the full pcscd debug log.
I don't know if it is a bug or if I'm missing something...
Can anyone help me with that?

I'm using a Raspberry Pi 3 with Raspbian GNU/Linux 9 (stretch) and Linux version 4.9.59-v7+

00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug
00000270 debuglog.c:310:DebugLogSetCategory() Debug options: APDU
00000021 pcscdaemon.c:351:main() Force colored logs
00000414 configfile.l:282:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000074 configfile.l:358:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000259 configfile.l:319:DBGetReaderListDir() Skipping non regular file: ..
00000024 configfile.l:319:DBGetReaderListDir() Skipping non regular file: .
00000028 pcscdaemon.c:655:main() pcsc-lite 1.8.20 daemon ready.
00015027 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000853 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000895 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
00000956 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x0424, PID: 0xEC00, path: /dev/bus/usb/001/003
00000894 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
05118061 hotplug_libudev.c:648:HPEstablishUSBNotifications() USB Device add
00000956 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x04E6, PID: 0x5790, path: /dev/bus/usb/001/008
00000181 hotplug_libudev.c:433:HPAddDevice() Adding USB device: Identiv uTrust 3700 F CL Reader
00000553 readerfactory.c:1079:RFInitializeReader() Attempting startup of Identiv uTrust 3700 F CL Reader [uTrust 3700 F CL Reader] (55021722283450) 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00001448 readerfactory.c:954:RFBindFunctions() Loading IFD Handler 3.0
00000333 ifdhandler.c:1961:init_driver() Driver version: 1.4.26
00005946 ifdhandler.c:1978:init_driver() LogLevel: 0x0003
00000187 ifdhandler.c:1989:init_driver() DriverOptions: 0x0000
00001088 ifdhandler.c:2002:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000107 ifdhandler.c:111:CreateChannelByNameOrChannel() Lun: 0, device: usb:04e6/5790:libudev:0:/dev/bus/usb/001/008
00000092 ccid_usb.c:237:OpenUSBByName() Reader index: 0, Device: usb:04e6/5790:libudev:0:/dev/bus/usb/001/008
00000153 ccid_usb.c:269:OpenUSBByName() interface_number: 0
00000086 ccid_usb.c:270:OpenUSBByName() usb bus/device: 1/8
00000080 ccid_usb.c:287:OpenUSBByName() Using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00006031 ccid_usb.c:305:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau ([email protected])
00000160 ccid_usb.c:306:OpenUSBByName() ifdProductString: Generic CCID driver
00000091 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.
00011185 ccid_usb.c:391:OpenUSBByName() Try device: 1/8
00000218 ccid_usb.c:401:OpenUSBByName() vid/pid : 04E6/5790
00000089 ccid_usb.c:448:OpenUSBByName() Checking device: 1/8
00000084 ccid_usb.c:519:OpenUSBByName() Trying to open USB bus/device: 1/8
00000442 ccid_usb.c:621:OpenUSBByName() Found Vendor/Product: 04E6/5790 (Identiv uTrust 3700 F CL Reader)
00000105 ccid_usb.c:623:OpenUSBByName() Using USB bus/device: 1/8
00000085 ccid_usb.c:680:OpenUSBByName() bNumDataRatesSupported is 0
00006731 ccid_usb.c:1244:InterruptRead() before (0)
00100314 ccid_usb.c:1290:InterruptRead() after (0) (2)
00000172 -> 000000 65 00 00 00 00 00 00 00 00 00
00890566 <- 000000 81 00 00 00 00 00 00 42 FE 01
00000280 -> 000000 65 00 00 00 00 00 01 00 00 00
00100927 ccid_usb.c:836:ReadUSB() read failed (1/8): -7 LIBUSB_ERROR_TIMEOUT
00000415 -> 000000 65 00 00 00 00 00 02 00 00 00
00100553 ccid_usb.c:836:ReadUSB() read failed (1/8): -7 LIBUSB_ERROR_TIMEOUT
00000188 ifdhandler.c:195:CreateChannelByNameOrChannel() failed
00000126 ccid_usb.c:879:CloseUSB() Closing USB device: 1/8
00000117 ccid_usb.c:889:CloseUSB() Last slot closed. Release resources
00000460 ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00000626 readerfactory.c:1110:RFInitializeReader() Open Port 0x200000 Failed (usb:04e6/5790:libudev:0:/dev/bus/usb/001/008)
00000351 readerfactory.c:375:RFAddReader() Identiv uTrust 3700 F CL Reader [uTrust 3700 F CL Reader] (55021722283450) init failed.
00000154 readerfactory.c:608:RFRemoveReader() UnrefReader() count was: 1
00000123 readerfactory.c:1130:RFUnInitializeReader() Attempting shutdown of Identiv uTrust 3700 F CL Reader [uTrust 3700 F CL Reader] (55021722283450) 00 00.
00000125 readerfactory.c:991:RFUnloadReader() Unloading reader driver.
00000301 hotplug_libudev.c:520:HPAddDevice() Failed adding USB device: Identiv uTrust 3700 F CL Reader
@LudovicRousseau
Copy link
Owner

Does the reader works with a "normal" PC?

Have a look at https://ludovicrousseau.blogspot.fr/2014/04/usb-issues-with-raspberry-pi.html

@nicolasbadia
Copy link
Author

Thanks for the quick anwser. Yes the reader works on a "normal" PC.

I've updated the Pi to the latest firmware and set dwc_otg.speed=1 to /boot/cmdline.txt bu
t it doesn't solve the issue.
But, it now works after reboot (I don't think it was the case before), but if I unplug the reader and plug it back, I still get the error.
Here is the messages I get when I remove the reader:

14957972 hotplug_libudev.c:642:HPEstablishUSBNotifications() USB Device removed
00001050 hotplug_libudev.c:360:HPRemoveDevice() Removing USB device[0]: Identiv uTrust 3700 F CL Reader [uTrust 3700 F CL Reader] (55021722283450) at /dev/bus/usb/001/004
00000866 readerfactory.c:608:RFRemoveReader() UnrefReader() count was: 1
00000117 eventhandler.c:176:EHDestroyEventHandler() Stomping thread.
00000093 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFB1, usb:04e6/5790:libudev:0:/dev/bus/usb/001/004 (lun: 0)
00000085 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFB2, usb:04e6/5790:libudev:0:/dev/bus/usb/001/004 (lun: 0)
00000083 eventhandler.c:201:EHDestroyEventHandler() Request stopping of polling thread
00000097 ifdhandler.c:347:IFDHStopPolling() usb:04e6/5790:libudev:0:/dev/bus/usb/001/004 (lun: 0)
00395819 eventhandler.c:502:EHStatusHandlerThread() Die
00000395 eventhandler.c:216:EHDestroyEventHandler() Thread stomped.
00000116 readerfactory.c:1130:RFUnInitializeReader() Attempting shutdown of Identiv uTrust 3700 F CL Reader [uTrust 3700 F CL Reader] (55021722283450) 00 00.
00000090 ifdhandler.c:285:IFDHCloseChannel() usb:04e6/5790:libudev:0:/dev/bus/usb/001/004 (lun: 0)
00000139 ccid_usb.c:797:WriteUSB() write failed (1/4): -4 LIBUSB_ERROR_NO_DEVICE
00000178 ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00000473 readerfactory.c:991:RFUnloadReader() Unloading reader driver.

@LudovicRousseau
Copy link
Owner

I suspect a hardware and/or software problem with the USB on Raspberry Pi 3.
I don't think I can help.

@marknijboer
Copy link

I had the same issue and could not find a way to get it fixed. I tried every software change on the web. In the end, I came across this link from the brand of NFC reader I used:

https://www.acs.com.hk/en/press-release/2266/advanced-card-systems-ltd.-declaration-against-counterfeit-acr122u-nfc-readers/

It appeared that I was using a counterfeited ACR122U reader that I bought from China. Later I got the same reader from a trustworthy reseller and that had no problems at all. Even comparing the readers, they look identical. We have the batch (10 pieces) of China readers that all have the issue and don't work, and a batch of readers from the reseller from my country that all DO work. The fake reader was the issue for me.

@LudovicRousseau
Copy link
Owner

Thanks for the link @marknijboer.
I was no aware of Chinese counterfeit readers.

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