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

USB timeout error with ACR122U REV 1.14C #93

Closed
Toxicable opened this issue Jan 21, 2021 · 1 comment
Closed

USB timeout error with ACR122U REV 1.14C #93

Toxicable opened this issue Jan 21, 2021 · 1 comment

Comments

@Toxicable
Copy link

I've been using pyscard to to read smart cards with a ACR122U readers.
However the last batch of readers I've got have a new PCB revision, they're the same model but the PCB's are now "REV 1.14C" compared to the old "REV 1.14B".
Comparing the PCB's they're quite different, but I assume since they're the same model number that the interfaces remain working.
For Software i've been doing most of the validation on Ubuntu with these versions:

pcsc-lite version 1.8.23.
Copyright (C) 1999-2002 by David Corcoran <[email protected]>.
Copyright (C) 2001-2015 by Ludovic Rousseau <[email protected]>.
Copyright (C) 2003-2004 by Damien Sauveron <[email protected]>.
Report bugs to <[email protected]>.
Enabled features: Linux x86_64-pc-linux-gnu libsystemd serial usb libudev usbdropdir=/usr/lib/pcsc/drivers ipcdir=/var/run/pcscd configdir=/etc/reader.conf.d

and pyscard==1.9.7

The error can be reproduced when I start the host with the reader plugged into any USB slot.
I've also validated this on another host

Jan 21 13:36:40 SOME_HOST systemd[1]: Started PC/SC Smart Card Daemon.
Jan 21 13:36:40 SOME_HOST pcscd[1282]: 00000000 ccid_usb.c:888:ReadUSB() read failed (1/3): -7 LIBUSB_ERROR_TIMEOUT
Jan 21 13:36:40 SOME_HOST pcscd[1282]: 00158634 ccid_usb.c:888:ReadUSB() read failed (1/3): -7 LIBUSB_ERROR_TIMEOUT
Jan 21 13:36:40 SOME_HOST pcscd[1282]: 00000013 ifdhandler.c:194:CreateChannelByNameOrChannel() failed
Jan 21 13:36:40 SOME_HOST pcscd[1282]: 00000079 readerfactory.c:1106:RFInitializeReader() Open Port 0x200000 Failed (usb:072f/2200:libudev:0:/dev/bus/usb/001/003)
Jan 21 13:36:40 SOME_HOST pcscd[1282]: 00000003 readerfactory.c:376:RFAddReader() ACS ACR122U PICC Interface init failed.
Jan 21 13:36:40 SOME_HOST pcscd[1282]: 00000029 hotplug_libudev.c:523:HPAddDevice() Failed adding USB device: ACS ACR122U PICC Interface

The service eventually goes to "Active: inactive (dead)" as reported by systemctl
However, while the service is "active (running)" if I unplug the reader then plug it back into the same usb port or another, it throws just one line

Jan 21 13:51:33 SOME_HOST pcscd[8818]: 48681205 ccid_usb.c:888:ReadUSB() read failed (1/6): -7 LIBUSB_ERROR_TIMEOUT

Then I'm able to connect to the reader via pyscard.
If I start the host without the reader plugged in then, then once booted plug it in, I'm able to access it via pyscard.
While this work around works for development, it's not suitable for deployment.

@LudovicRousseau
Copy link
Owner

The "ACS ACR122U PICC" reader is in the Unsupported list
https://ccid.apdu.fr/ccid/unsupported.html#0x072F0x2200

You can try to use the ACS driver instead https://packages.ubuntu.com/focal/libacsccid1

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

2 participants