From 4841404e12dfeffd06d57686427b6c89f910fd56 Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Thu, 10 Oct 2024 18:29:58 +0200 Subject: [PATCH] Give more time to initialize the ACS ACR122U Thanks to Andrew Baxter for the bug report " LIBUSB_ERROR_TIMEOUT on first connect #206 " fixes: https://github.com/LudovicRousseau/PCSC/issues/206 --- src/ccid.c | 2 ++ src/ccid.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ccid.c b/src/ccid.c index fe08b875..1948080d 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 92415bf6..e9c2a431 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