LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
379 stars 108 forks source link

Does not support multi-tag reading, selecting specific cards in range of reader? #83

Closed anthnyprschka closed 4 years ago

anthnyprschka commented 4 years ago

Hi there,

not sure if this is really an issue of this project, but seemed like the appropriate place to ask my question. I've been reading into RFID for the past couple of days and bought an ACR122U reader alongside some compatible tags.

Been trying to use it on a Mac that apparently uses the pcsc-lite middleware (although I couldn't find any information about the middleware on macOS except that it is located in /System/Library/Frameworks/PCSC.framework).

Afaik, smartcard as well smartcard.scard do not support use cases in which I want to read from multiple tags that are present in the range of the reader? I guess the SCardUIDlgSelectCardA driver function could serve as a means to control which tags to select but I guess it will only work on Windows and with some sort of UI?

Also afaik, the ACR122U reader also does not support multi-tag reading, as it has some "anti-collision" mechanism built-in that controls the way the reader selects a card?

I would be very thankful to get some hints on what reader hardware, driver software and ideally Python SDK I might be able to use to build an application that can read multiple cards simultaneously or rather control which cards to select (mustn't be a macOS host necessarily, Linux/Windows will also be possible).

Best, Anthony

LudovicRousseau commented 4 years ago

You are right SCardUIDlgSelectCardA is implemented in Windows only. pcsc-lite implements the functions documented at https://pcsclite.apdu.fr/api/group__API.html They should be the same functions implemented by the PCSC framework.

I am not sure it is possible to access multiple cards at the same time using only one reader. It is not an issue in pyscard so I close it here.

You should ask on the pcsclite-muscle mailing list. See https://lists.infradead.org/mailman/listinfo/pcsclite-muscle You can find contactless experts there.