Re: [RFC] NFC subsystem prototype

From: Lauro Ramos Venancio
Date: Mon Apr 11 2011 - 19:31:17 EST

Hi Harald,

2011/4/9 Harald Welte <laforge@xxxxxxxxxxxx>:
> Hi Lauro,
> On Wed, Apr 06, 2011 at 07:17:19PM -0300, Lauro Ramos Venancio wrote:
>> As previously mentioned in this list, a NFC (Near Field Communication)
>> subsystem is required to standardize the NFC device drivers
>> development and create an unified userspace interface. This email
>> describes our NFC subsystem proposal.
> given that I've done quite some work on RFID (mifare, iso14443) and NFC
> software + hardware some years ago, here is some feedback from my side:
> 0) why not create a general RFID subsystem instead of locking it down to
> Â NFC? ÂNFC is sort-of a superset of ISO 14443, so it would make more
> Â sense to have a generic framework that can support not only Mifare + NFC
> Â but all types of ISO 14443 (A / B) as well as ISO 15693. ÂThis would mean
> Â other applications like electronic ID cards and ICAO-compliant passports
> Â would fit into the picture - even though not being NFC

The prototype supports ISO 14443 (A/B), MIFARE, Felica and Jewel. It's
straightforward to add ISO 15693 support. So I think it is possible to
support these applications using the NFC subsystem.

> 1) do you really think a kernel subsystem is the best idea for this?
> Â normally, the RFID/NFC ASIC is attached either to USB or serial lines,
> Â and there are no timing constraints against userspace drivers using libusb,
> Â like the existing libnfc or librfid.
> Â Yes, there may be multiple applications using RFID/NFC services, but
> Â if you look at e.g. the smart card frameworks like OpenCT and/or pcsc-lite,
> Â they can do that very well in userspace, without any kernel support.
> Â If you're worried about SPI-attached RFID/NFC ASICs, then I think the
> Â propper approach is to have a generic support for exporting SPI devices to
> Â userspace (similar to what we have with usb + libusb).
> Â I simply do not see the advantage of having this in the kenrel. ÂThere are
> Â no latency/timing constraints, and the amount of data you are moving is so
> Â small, that performance considerations also don't really play any role.

The advantages appear when you consider the NFC peer-to-peer use case
(LLCP). A socket interface for LLCP would fit better for implementing
some features, such as OBEX over LLCP and IP over LLCP.
The prototype implements in the kernel the minimal set of operations
that will be required by a future LLCP implementation. The same set of
operations are used by userspace applications to implements tag


Lauro Ramos Venancio
INdT - Instituto Nokia de Tecnologia
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at