[Pcsclite-git-commit] [CCID] 02/02: ElatecTWN4: use a 400 ms timeout instead of 100 ms
Ludovic Rousseau
rousseau at moszumanska.debian.org
Wed May 4 16:34:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository CCID.
commit 5bea205f085a6b5ddd263843f410abab728550b7
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Wed May 4 18:31:57 2016 +0200
ElatecTWN4: use a 400 ms timeout instead of 100 ms
The ElatecTWN4 reader is a contactless reader that needs 280 ms to
answer to the PC_to_RDR_GetSlotStatus CCID command when no card is in
the field.
---
src/ccid.c | 12 ++++++++++++
src/ccid.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/src/ccid.c b/src/ccid.c
index 09a0465..3e42be5 100644
--- a/src/ccid.c
+++ b/src/ccid.c
@@ -71,6 +71,13 @@ int ccid_open_hack_pre(unsigned int reader_index)
case OZ776_7772:
ccid_descriptor->dwMaxDataRate = 9600;
break;
+
+ case ElatecTWN4:
+ /* use a timeout of 400 ms instead of 100 ms in CmdGetSlotStatus()
+ * used by CreateChannelByNameOrChannel()
+ * The reader answers after 280 ms if no tag is present */
+ ccid_descriptor->readTimeout = DEFAULT_COM_READ_TIMEOUT * 4;
+ break;
}
/* CCID */
@@ -511,6 +518,11 @@ int ccid_open_hack_post(unsigned int reader_index)
ccid_descriptor->dwFeatures |= CCID_CLASS_EXTENDED_APDU;
}
break;
+
+ case ElatecTWN4:
+ /* restore default timeout (modified in ccid_open_hack_pre()) */
+ ccid_descriptor->readTimeout = DEFAULT_COM_READ_TIMEOUT;
+ break;
}
/* Gemalto readers may report additional information */
diff --git a/src/ccid.h b/src/ccid.h
index b9d2c6a..59a14aa 100644
--- a/src/ccid.h
+++ b/src/ccid.h
@@ -209,6 +209,7 @@ typedef struct
#define FEITIANR502DUAL 0x096E060D
#define MICROCHIP_SEC1100 0x04241104
#define CHERRY_KC1000SC 0x046A00A1
+#define ElatecTWN4 0x09D80427
#define VENDOR_GEMALTO 0x08E6
#define GET_VENDOR(readerID) ((readerID >> 16) & 0xFFFF)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git
More information about the Pcsclite-cvs-commit
mailing list