wizzomafizzo / tapto

Launch games using physical objects
GNU General Public License v3.0
64 stars 9 forks source link

Support for CCID USB readers #60

Closed drebes closed 1 month ago

drebes commented 1 month ago

I have a Sony CCID based NFC reader. Being CCID, it is supported by libnfc (as of 1.8.0) if libnfc is compiled with the pcsc driver (./configure --with-drivers=all since by default the pcsc is not included in the default driver list)

Would it be possible to include the PCSC driver to support CCID based readers like this?

drebes commented 1 month ago

I just saw wizzomafizzo/tapto#4 which I see is related. As noted above there's a driver for pcsc in libnfc but it's not compiled by default. When using that driver there's no need for a connection string.

wizzomafizzo commented 1 month ago

Hi. I have not been able to compile libnfc successfully myself with pcsc enabled, for some reason it will not link to libpcsclite. I've attached a version of tapto compiled against the stock libnfc in ubuntu, which I think includes pcsc support. You're welcome to try it out! I haven't had much luck with it myself

tapto-ubuntu-libnfc.zip

drebes commented 1 month ago

Thanks, I'll give it a try. I'll try to setup an environment to try to compile it myself but that may take a bit longer.

drebes commented 1 month ago

I managed to compile it with pcsc support and have the reader detected, but so far only when running tapto on a Debian VM. But I get Last scan: never despite putting tags on the reader, I may be missing something.

Screenshot 2024-05-24 at 21 48 05

drebes commented 1 month ago

I think I'm having issues with libnfc and this reader. While it detects the reader it has trouble reading cards. I'll close this for now and reopen once I have sorted this out.

drebes commented 1 month ago

The PCSC driver lacks an implementation for InitiatorPollTarget/initiator_poll_target, which explains I couldn't read my tags with the reader. I could only read my tag with InitiatorListPassiveTargets.