PCSC
PCSC copied to clipboard
LIBUSB_ERROR_TIMEOUT on first connect
Versions
- smart card reader driver name and version
I'm not sure, AFAICT only the ccid plugin is installed. pn533_usb loaded itself but (as detailed later) I had to rmmod that.
- pcsc-lite version
- the output of the command
/usr/sbin/pcscd --version
pcsc-lite version 2.2.3
Copyright (C) 1999-2002 by David Corcoran <[email protected]>.
Copyright (C) 2001-2024 by Ludovic Rousseau <[email protected]>.
Copyright (C) 2003-2004 by Damien Sauveron <[email protected]>.
Report bugs to <[email protected]>.
Enabled features: USB serial libudev polkit systemd Linux x86_64 ipcdir=/run/pcscd usbdropdir=/var/lib/pcsc/drivers serialconfdir=/etc/reader.conf.d
MAX_READERNAME: 128, PCSCLITE_MAX_READERS_CONTEXTS: 16
Platform
- Operating system or GNU/Linux distribution name and version
NixOS unstable from the last couple days.
- Smart card middleware name and version
- Smart card reader manufacturer name and reader model name
ACR122U-A9, same as detected by pcscd, although the amazon listing was somewhat light on details (brand is "cyrank")
https://www.amazon.co.jp/gp/product/B0CNQNHBSY/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
- Smart card name
N/A
Issue
The smartcard reader works fine, but when I boot with it attached I get either LIBUSB_ERROR_BUSY or LIBUSB_ERROR_TIMEOUT and it's unusable until I make additional manual changes.
There's two scenarios:
- I start the host with the reader attached, pcscd starts at boot (well, it's socket activated and a command that reads an nfc card runs at boot). The
pn533_usbkernel module gets loaded automatically.pcscdstarts withLIBUSB_ERROR_BUSY(during_pn533_usb.txt). Doingrmmodand restartingpcscdallows it to start and interact with the card fine (after_pn533_usb.txt). - I start the host with the reader attached, pcscd setup as above, and the
pn533_usbkernel module blacklisted.pcscdstarts withLIBUSB_ERROR_TIMEOUTuntil I disconnect and reconnect the reader (physically), while pcscd is still running (reconnect.txt sorry, I did truncate this one but after it recognized the device). Stoppingpcscdseems before reconnecting the reader doesn't do anything positive (theTIMEOUTerror stays).
My current workaround is to let pn533_usb load then immediately rmmod it, which allows pcscd to start with no errors, but this is timing sensitive.
Log
I attached the logs above.
Thanks for all your work on this project, it's super cool and I've had almost no issues!