Closed antonio-fr closed 1 year ago
I do not know a reliable way to know if the card is contact or contactless using PC/SC. If the card can tell you the communication mode that should work fine. It is up to you to define it.
Ask you question on the mailing list to get a broader audience. See https://ludovicrousseau.blogspot.com/2020/11/how-to-get-smart-card-support.html
I spent some time to build a detection method to know whether the card connection is through contactless or with contacts. And so far, I didn't find any reliable method to get this information. This is needed as some cards behave differently depending of the access interface, mostly because internally the applet knows which interface is currently used, and can act accordingly. Also some standards like EMV instruct to behave differently depending of the access interface. All that makes the need for knowing the access interface when talking to a smartcard.
My idea is to have in the card object a _iscontactless attribute which is true when the connection is done through the wireless interface. How can it be done ?
On Windows ? On Mac ? On Linux?