-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
LIBUSB_ERROR_TIMEOUT on first connect #206
Comments
From
The reader answers the first command (frame 0). But failed to answer in time to the second command (frame 1). Maybe the reader needs more time. Try this patch: diff --git a/src/ccid.c b/src/ccid.c
index fe08b87..1948080 100644
--- a/src/ccid.c
+++ b/src/ccid.c
@@ -81,6 +81,7 @@ int ccid_open_hack_pre(unsigned int reader_index)
case ElatecTWN4_CCID_CDC:
case ElatecTWN4_CCID:
+ case ACS_ACR122U:
/* Use a timeout of 1000 ms instead of 100 ms in
* CmdGetSlotStatus() used by CreateChannelByNameOrChannel()
* The reader answers after up to 1 s if no tag is present */
@@ -590,6 +591,7 @@ int ccid_open_hack_post(unsigned int reader_index)
case ElatecTWN4_CCID_CDC:
case ElatecTWN4_CCID:
case SCM_SCL011:
+ case ACS_ACR122U:
/* restore default timeout (modified in ccid_open_hack_pre()) */
ccid_descriptor->readTimeout = DEFAULT_COM_READ_TIMEOUT;
break;
diff --git a/src/ccid.h b/src/ccid.h
index 92415bf..e9c2a43 100644
--- a/src/ccid.h
+++ b/src/ccid.h
@@ -263,6 +263,7 @@ typedef struct
#define ACS_ACR1552 0x072F2303
#define KAPELSE_KAPLIN2 0x29470105
#define KAPELSE_KAPECV 0x29470112
+#define ACS_ACR122U 0x072f2200
#define VENDOR_KAPELSE 0x2947
#define VENDOR_GEMALTO 0x08E6 |
Oh awesome! I'll try that, it might take me a few days though. Thanks for looking at this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Versions
I'm not sure, AFAICT only the
ccid
plugin is installed.pn533_usb
loaded itself but (as detailed later) I had to rmmod that./usr/sbin/pcscd --version
Platform
NixOS unstable from the last couple days.
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
N/A
Issue
The smartcard reader works fine, but when I boot with it attached I get either
LIBUSB_ERROR_BUSY
orLIBUSB_ERROR_TIMEOUT
and it's unusable until I make additional manual changes.There's two scenarios:
pn533_usb
kernel module gets loaded automatically.pcscd
starts withLIBUSB_ERROR_BUSY
(during_pn533_usb.txt). Doingrmmod
and restartingpcscd
allows it to start and interact with the card fine (after_pn533_usb.txt).pn533_usb
kernel module blacklisted.pcscd
starts withLIBUSB_ERROR_TIMEOUT
until 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). Stoppingpcscd
seems before reconnecting the reader doesn't do anything positive (theTIMEOUT
error stays).My current workaround is to let
pn533_usb
load then immediatelyrmmod
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!
The text was updated successfully, but these errors were encountered: