jacekkow / controlvault2-nfc-enable

Enable NFC on Linux for pcscd on Dell E7470 (and others) with ControlVault2
BSD 3-Clause "New" or "Revised" License
75 stars 21 forks source link

Writing NFC driver for linux #7

Open JuniorJPDJ opened 4 years ago

JuniorJPDJ commented 4 years ago

Don't you maybe want to just write nfc driver for linux for this bcm? You seem to know chip and every user would benefit from this. We wouldn't need to do workarounds like this script ;/

There are some docs: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/nfc https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/networking/nfc.rst

AAAnd other drivers: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nfc

And some wiki: https://elinux.org/NFC_driver_notes

jacekkow commented 4 years ago

Writing NFC driver in kernel would not help at all as pcscd uses completely different protocol to contact the reader and does not deal with NFC stack at all (instead it only communicates through USB endpoints using well-defined protocol).

As far as I understand this script (from limited information I was able to get through decoding some of the messages) it sets up the routing so that relevant cards are routed to that USB interface.

Also, most of the "interesting" tools use libnfc, which has nothing to do with NFC stack in kernel - moreover, it specifically requires unloading of nfc modules!

I also does not know how different is libnfc-nci from libnfc - I would assume it might not be a drop-in replacement.

There are no docs on these chips (or at least no that I know of) so I can't say whether it is even possible to have NFC + PC/SC at the same time in the form you would prefer.

To conclude:

I'll leave this issue open if anyone's interested to experiment.

JuniorJPDJ commented 4 years ago

As far as I know libnfc and libnfc-nci is completely other things where only common thing is NFC in name. You are right that libnfc seem to be more interesting, but there is only one device supported and I've seen efforts in issues of people wanting it to port to use linux-nfc Thank you for your response and leaving issue open :D