Important!

Blog moved to https://blog.apdu.fr/

I moved my blog from https://ludovicrousseau.blogspot.com/ to https://blog.apdu.fr/ . Why? I wanted to move away from Blogger (owne...

Friday, November 1, 2013

Linux NFC driver conflicts with CCID driver for ACS ACR122U

Linux NFC subsystem

Since 2011 the Linux kernel provides a NFC subsystem for some NFC devices. The same device can be used by the Linux NFC subsystem and also my CCID driver. We then have a conflict!

The kernel driver will use the device before the CCID driver has a chance to use it. Loading the CCID driver in pcsc-lite will then fail with an error message: "Can't claim interface"

Devices supported by linux NFC drivers

According to drivers/nfc/pn533.c

NameidVendoridProduct
PN5330x4CC0x2533
SCM SCL37110x4E60x5591
SONY PASORI0x054c0x02e1
ACS ACR122U0x072f0x2200

The ACS ACR122U reader is also in the (unsupported) list of readers for my CCID driver.

So if you have such a reader and a "recent" Linux kernel (version 3.5 or more) you may not be able to use the CCID driver with this device.

Work around

So the CCID driver can use the ACS ACR122U you need to first unload the pn533 kernel driver.

[update April 14th 2017]

To remove the pn533 kernel module use:
$ sudo rmmod pn533

[update December 15th 2018]

The Linux kernel driver is loaded each time you plug the device. So using rmmod to unload the kernel driver will work only once and you would have to do it again and again.

To permanently remove the pn533 kernel module use something like:
$ sudo rm -r /lib/modules/*/kernel/drivers/nfc/pn533