Topic: Why ACR122 devices are not recommended with libnfc ?

Hello,

As there are many users who ask about ACR122, I would like to clarify why this is a bad idea to use ACR122 (and derivated like Touchatag), at least with libnfc.

First, I have to say these devices are well-packaged, are cheap, have a nice look and work perfectly as RFID @13.56Mhz reader using PC/SC on common platforms as these devices are CCID compliant.

Internally, an ACR122 device is made with an MCU, a NFC chip (PN532) and an antenna.
MCU made the device CCID compliant and provide an USB connection.

Now let's talk about NFC and underlying requierements: to do more than RFID reader, you will need to:
- Poll for different targets (NFC-A, NFC-B, NFC-F and DEP)
- Act as target in ISO/IEC 14443-4 emulation mode (optionnal regarding NFC Forum but very useful to be backward compatible with device that are not able to do P2P)
- Do P2P as defined in "Logical Link Control Protocal" (LLCP) from NFC-Forum

Polling and acting as target need to be cancellable, ie. you start a target emulation but no initiator comes, you will have to abort the target emulation.
Next, LLCP defines some timeouts for command sending/receiving but long timeouts relies on "abortable" commands.

In actual architecture, libnfc directly talk to NFC Chip (PN532).
To do that, libnfc's ACR122 driver passthrough PC/SC (and internal MCU) by using some special commands that allow to send frames directly to the PN532.
So with ACR122, the libnfc relies on PC/SC but there is no timeout on command and no way to cancel a running command in PC/SC API.

Conclusion, we can't do reliable and robust NFC with ACR122 and libnfc.

Of course, any contributions are more than welcome to fully support ACR122 devices in libnfc.

Romuald Conty

Re: Why ACR122 devices are not recommended with libnfc ?

Hi Romuald, this post clarify many things about this nfc device, because as you said is popular and cheap.

But, the acr122 it's the same as the acr122u? I know that acr122 was launched in 2009 and acr122u a few months ago, there's any improvement in acr122u?

Also, wich model of nfc device reader do you recommend?

thanks a lot

Re: Why ACR122 devices are not recommended with libnfc ?

kavastudios wrote:

But, the acr122 it's the same as the acr122u?

Yes, ACR122U is a "new" ACR122 version (understand less bogus than before).

kavastudios wrote:

Also, which model of nfc device reader do you recommend?

ATM, SCL3711 from SCM and StickID from SensorID are the best choice for doing NFC with libnfc.

If you don't need a case, ie. made a NFC kiosk, the best choice is the opensource PN532 breakout board from microbuilder.eu (now sold at adafruit).

http://www.libnfc.org/documentation/har … patibility

Romuald Conty

Re: Why ACR122 devices are not recommended with libnfc ?

rconty wrote:

ATM, SCL3711 from SCM and StickID from SensorID are the best choice for doing NFC with libnfc.


Hi! Where i can purchase StickID device? I'm italian, as the producer of this device, but  on their site there isn't a commercial section..

Last edited by pavlon (2012-03-08 08:30:39)

Re: Why ACR122 devices are not recommended with libnfc ?

A Power of Attorney is a written document that you can use to give another person the authority to act in your place. The person you name to act in yourAttorneyplace is referred to as your agent and may only do what you have specifically authorized them to do in your document. They must also act in good faith and in your best interest. They cannot give their authority to somebody else to complete the task for them.