Skip to content

Commit

Permalink
Give more time to initialize the ACS ACR122U
Browse files Browse the repository at this point in the history
Thanks to Andrew Baxter for the bug report
" LIBUSB_ERROR_TIMEOUT on first connect #206 "
fixes: LudovicRousseau/PCSC#206
  • Loading branch information
LudovicRousseau committed Oct 10, 2024
1 parent a14077c commit 4841404
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ccid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/ccid.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4841404

Please sign in to comment.