[Pcsclite-muscle] pcsc-lite & SCardLocateCardsByATR() function

Ludovic Rousseau ludovic.rousseau
Fri Oct 14 05:22:41 PDT 2011


2011/10/14 Lev Serebryakov <lev at serebryakov.spb.ru>:
> Hello, Pcsclite-muscle.

Hello new member,

> ?I'm porting some software, which uses WinSCard API, from Windows to
> ?Linux with pcsc-lite.
>
> ?Almost everything is Ok, but this software uses one call, which is
> ?absent in PCSC-Lite implementation: SCardLocateCardsByATR(), and
> ?structure SCARD_ATRMASK.
>
> ? This API is used to find cardreader with card of specific vendor,
> ?with which this software works: it looks like, tat call returns all
> ?available cradreaders and cards, seen by them, and select cards,
> ?which have specific attributes (it checks many bytes in returned
> ?SCARD_ATRMASK to be specific one, looks like long "magic number").
>
> ? How this API could be emulated in terms of pcsc-lite API? I could
> ?not find any similar APIs in pcsc-lite.

If you want to know in which reader is inserted the card you are
looking for you can use SCardListReaders() to list the readers and
then SCardGetStatusChange() to get the ATR of the cards in the
different readers.

SCardLocateCardsByATR() is not provided by pcsc-lite. But it should
not be too complex to add it.
If you want it to be implemented just contact me.

Regards,

-- 
?Dr. Ludovic Rousseau




More information about the pcsclite-muscle mailing list