4

I'm currently doing some research and testing on multiple smart card reader identification to determine which reader is connected to which USB port.

Lets say that I plug in Reader A into USB port 1. By invoking SCardListReaders function, I retrieve the following friendly name:

  • ACS ACR1281 1S Dual Reader PICC 0

Then I plug in another reader (Reader B) into USB port 2. Now I have 2 readers connected to the same PC. Invoking SCardListReaders will give me:

  • ACS ACR1281 1S Dual Reader PICC 0
  • ACS ACR1281 1S Dual Reader PICC 1

I'm aware of how these names are generated (How are PCSC smart card reader 'friendly names' constructed?) and I know that plugging in the readers in different sequence (plug in Reader B first then Reader A) will change the SCARD_ATTR_DEVICE_UNIT thus affecting the friendly names.

Based on the above scenario, how can I ensure that the PC will always automatically connect to PICC reader in USB port 1 regardless of its friendly name?

Any help will be much appreciated. Thank you.

Community
  • 1
  • 1
  • Welcome new user. Note that there are limited number of persons available on this site for this particular purpose. Personally I would try and work around this issue; e.g. if you have a particular smart card in one reader, try to make a decision based on the ATR of that card. – Maarten Bodewes Sep 20 '12 at 20:05
  • Can't you use some reader-specific API to get the reader serial number (or any other identifier) and use it to distinguish the readers? – vlp Dec 12 '15 at 20:00

0 Answers0