Skip to content

Commit

Permalink
Add Feitain R502 dual interface reader into CCID driver
Browse files Browse the repository at this point in the history
Feitian R502 is a composite multislot reader.
Mac OS X does not yet support composite readers.
  • Loading branch information
FeitianSmartcardReader authored and LudovicRousseau committed Sep 16, 2015
1 parent 94142da commit 0fe9bda
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/ccid.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ typedef struct
#define HP_CCIDSMARTCARDKEYBOARD 0x03F00036
#define KOBIL_IDTOKEN 0x0D46301D
#define FUJITSUSMARTKEYB 0x0BF81017
#define FEITIANR502DUAL 0x096E060D

#define VENDOR_GEMALTO 0x08E6
#define GET_VENDOR(readerID) ((readerID >> 16) & 0xFFFF)
Expand Down
5 changes: 3 additions & 2 deletions src/ccid_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ status_t OpenUSBByName(unsigned int reader_index, /*@null@*/ char *device)

/* simulate a composite device as when libudev is used */
if ((GEMALTOPROXDU == readerID)
|| (GEMALTOPROXSU == readerID))
|| (GEMALTOPROXSU == readerID)
|| (FEITIANR502DUAL == readerID))
{
/*
* We can't talk to the two CCID interfaces
Expand Down Expand Up @@ -611,7 +612,7 @@ status_t OpenUSBByName(unsigned int reader_index, /*@null@*/ char *device)

/* reset for a next reader */
if (static_interface > 2)
static_interface = 1;
static_interface = (FEITIANR502DUAL == readerID) ? 0: 1;
#endif

/* Get Endpoints values*/
Expand Down
2 changes: 1 addition & 1 deletion src/ifdhandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ EXTERNAL RESPONSECODE IFDHGetCapabilities(DWORD Lun, DWORD Tag,
* multi-slot reader */
int readerID = get_ccid_descriptor(reader_index) -> readerID;

if ((GEMALTOPROXDU == readerID) || (GEMALTOPROXSU == readerID))
if ((GEMALTOPROXDU == readerID) || (GEMALTOPROXSU == readerID) || (FEITIANR502DUAL == readerID))
*Value = 2;
}
#endif
Expand Down

0 comments on commit 0fe9bda

Please sign in to comment.