Forced PC / SC driver on ACR122U NFC reader
I am having problems using my ACR122U card ACS RFID card reader. I need to connect it to Mac using PC / SC driver. I installed the driver from the ACS website and confirmed that it works.
However, whenever I test the command nfc-list
, I get the following error:
nfc-list uses libnfc libnfc-1.7.1-189-g2869ae2
error libnfc.driver.acr122_usb Unable to claim USB interface (Permission denied)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:020:002
As far as I understood from Google, this is that the Mac is intercepting the USB, which prevents the PC / SC from using the device, but how do I force the computer to use the PC / SC driver instead of the standard Apple USB?
PS: I installed libusb
source to share
You seem to be mixing two different options for connecting the ACR122U to libnfc:
-
You can use the direct USB driver for the ACR122U, which
libnfc.driver.acr122_usb
is what you are currently using. In this case, you need to make sure that the PC / SC daemon does not take over control of the reader (since only one instance can access the USB interface of the reader at a time).- The quick and dirty fix is ββto disable the PC / SC daemon that is taking control of the ACR122U. While not directly on Mac OS X, a detailed explanation can be found in the Ludovic blog .
-
Alternatively, you can prevent the PC / SC daemons from controlling that particular reader by editing
/usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist
. You will need a record search<key>ifdProductID</key>
Below this entry there is an array of form entries
<string>0xXXXX</string>
You will need to look for records containing the values ββ0x2200, 0x90CC and 0x2214. Remove those lines, but remember the relative line number (i.e. Offset in
<array>
). Then also remove the relevant lines under<key>ifdVendorID</key>
They must all contain the value 0x072F and therefore have the form
<string>0x072F</string>
In addition, you also need to remove the corresponding lines in
<key>ifdFriendlyName</key>
They will all probably start with
<string>ACS
.
-
Alternatively you can use the libnfc driver on PC / SC for ACR122U (
libnfc.driver.acr122_pcsc
). This driver uses the system PC / SC daemon to access the reader and not directly control the USB interface. For this option to work, you need to configure lib-nfc to use the PC / SC driver instead of the direct USB driver. When you compile libnfc yourself, you can do this by explicitly activating only the PC / SC based driver:./configure --with-drivers=acr122_pcsc make
Note, however, that this driver has been deprecated and the libnfc authors strongly discourage its use.
source to share