[Pcsclite-muscle] Know the interface connection type with a card
Ludovic Rousseau
ludovic.rousseau at gmail.com
Wed Aug 24 09:08:29 PDT 2022
Le mar. 16 août 2022 à 12:53, Antoine FERRON <aferron at cardhoc.com> a écrit :
>
> > SCardGetAttrib with SCARD_ATTR_CURRENT_PROTOCOL_TYPE should get you
> > what you want...
> > Forgot to mention that T=CL is probably encoded as T=15
>
> Well, I tried similar things, and this provides always 1, 2 or 3 (T0, T1, T0/T1), at least on Windows. It never provides 8 nor 15 value. Maybe in Linux ?
> For now, I'm using pyscard connection.getProtocol(), and this is the same? This reads SCARD_ATTR_CURRENT_PROTOCOL_TYPE ? You think SCARD_ATTR_CURRENT_PROTOCOL_TYPE will provide a different value from connection.getProtocol() ? That will provide 8 or 15 on Windows? To me, the Winscard interface never tells you about contactless protocol used.
connection.getProtocol() will not return what you want.
Use something like attrib =
card_connection.getAttrib(SCARD_ATTR_CURRENT_PROTOCOL_TYPE)
See https://ludovicrousseau.blogspot.com/2020/04/scardattrchannelid-and-usb-devices.html
Bye
--
Dr. Ludovic Rousseau
More information about the pcsclite-muscle
mailing list