wizzomafizzo / tapto

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

pcsc-lite support for MiSTer #4

Open wizzomafizzo opened 5 months ago

wizzomafizzo commented 5 months ago

This is an example of getting pcsc-lite working on MiSTer which could potentially add support for the "clone" ACR readers. With pcscd running on the MiSTer I can now see the reader are detected and reporting reads.

On repo:

mage makemisterimage
mage makemisterapp pcsc-lite

This will results the file pcscd and folder drivers appearing in scripts/misterbuild/_build. Copy these to (for example) /tmp on the MiSTer.

On MiSTer ssh:

mkdir -p /usr/local/lib/pcsc
cp -r /tmp/drivers /usr/local/lib/pcsc/
/tmp/pcscd -f -d

You can now see hotplugged pcsc compatible readers show up in the output and see some read output.

I don't know yet the best way to implement this support. The only way I can think of is to embed the pcscd binary and drivers folder in the TapTo binary, like we do with the sound files, and deploy them to /tmp on first startup. They're not that big, so I think it's ok, but it still feels like a funny solution.

I haven't tested it yet but I believe there's a pcsc driver included in libnfc. So it could just be a case of updating the connection string with pcscd running.

sigboe commented 5 months ago

Does pcscd-lite support vpcd functionaility? https://frankmorgner.github.io/vsmartcard/remote-reader/README.html

wizzomafizzo commented 5 months ago

Does pcscd-lite support vpcd functionaility? https://frankmorgner.github.io/vsmartcard/remote-reader/README.html

Pretty cool! Looks a bit awkward to get this running but could be worth a shot. I reckon we'd have a shot a replicating it with an app too! I was thinking it would be good to include a, much more cut down, REST API like Remote