LudovicRousseau / PCSC

pcsc-lite: PC/SC implementation
https://pcsclite.apdu.fr/
Other
268 stars 109 forks source link

Bluetooth smart card reader #186

Closed siddhantmishra1305 closed 6 months ago

siddhantmishra1305 commented 6 months ago

I am working on to create a bluetooth smart card reader (ex: ex: https://www.youtube.com/watch?v=RPm3VPsIfvg ). Since IFDHandler is only for USB based readers it wouldn't detect a smart card over bluetooth.

I need to create a driver that could interface between bluetooth reader and OS.

Any idea how I can proceed with this ? or any other way to achieve this ?

LudovicRousseau commented 6 months ago

The API is also for serial (or non-USB) readers. See https://pcsclite.apdu.fr/api/group__IFDHandler.html

siddhantmishra1305 commented 6 months ago

@LudovicRousseau Is it possible to achieve this in macOS ? I was under the impression that Mac OS X 10.10+ ships with a proprietary implementation of the PC/SC layer instead of with PCSC-Lite and it only supports USB.

LudovicRousseau commented 6 months ago

Yes, it is a bit different on macOS. But is it still possible.

siddhantmishra1305 commented 6 months ago

Okay I am new to this so do not have much idea but I was thinking in below direction and got stuck on Step 3.

Step 1. Connect Reader over Multipeer/bluetooth.

Step 2. SCardEstablishContext -> This would provide context

Step3. SCardListReaders -> This would provide list of readers but I guess this would only return readers connected over USB right ?



Since BT reader won’t be part of list, how to connect to the reader and transmit APDU commands ?

I think I might need to add custom implentation for functions SCardListReaders, SCardConnect, SCardTransmit in winscard.c . So I could add code to detect a BT reader and transmit/recieve APDU commands.

Please let me know If I am thinking in the right direction ? Also if you see any better way to achieve this please share your inputs.

Thank you

LudovicRousseau commented 6 months ago

It does not work like that.

github issue is not the place to discuss. Contact me by email. See https://blog.apdu.fr/articles/about_me/

LudovicRousseau commented 5 months ago

Hello, I received your email but lost it before I was able to read it. Can you send it again? sorry.