ACR122 NFC 阅读器不适用于 libnfc ubuntu

C. *_*ann 5 ubuntu lib-nfc acr122

我刚给自己买了一个新的 ACR122U-A9 nfc 阅读器,我需要在 ubuntu 18.10 上使用 libnfc 进行设置。它需要与 libnfc 一起工作,因为 mfoc 接口机智(如果有一种方法可以在没有 libnf 的情况下使用 mfoc,太棒了!那个解决方案对我也有帮助!)安装 libnfc 1.7.1 并做了几个小时的研究后,我仍然这样做不让它工作。每次我使用sudo nfc-list并且 pcscd 未运行时,它都会给我以下错误:

nfc-list uses libnfc 1.7.1
error   libnfc.driver.acr122_usb    Unable to set alternate setting on USB interface (Connection timed out)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:004:005
Run Code Online (Sandbox Code Playgroud)

如果 pcscd 正在运行,则错误如下:

nfc-list uses libnfc 1.7.1
error   libnfc.driver.acr122_usb    Unable to set alternate setting on USB interface (Connection timed out)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:004:007
nfc-list: ERROR: Unable to open NFC device: acr122_pcsc:ACS ACR122U 00 00
Run Code Online (Sandbox Code Playgroud)

有时这也会出现:

nfc-list uses libnfc 1.7.1
error   libnfc.driver.acr122_usb    Unable to set alternate setting on USB interface (Connection timed out)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:004:007
error   libnfc.driver.acr122_pcsc   No ACR122 firmware received, Error: 80100016
nfc-list: ERROR: Unable to open NFC device: acr122_pcsc:ACS ACR122U 00 00
Run Code Online (Sandbox Code Playgroud)

我从中读到的是:

  • libnfc 作品
  • 有一些驱动程序问题
  • 有些东西挡住了读者
  • 那个东西是pcscd(根据互联网)

我已经做了以下事情:

  • nfc pn533 pn533_usb文件中的黑名单/etc/modprobe.d/blacklist-libnfc.conf
  • 停止 pcscd 守护进程
  • 使用手动删除上述驱动程序 sudo modprobe -r <driver>
  • 从这里安装设备驱动程序:https : //www.acs.com.hk/en/products/3/acr122u-usb-nfc-reader/
  • 重启我的笔记本电脑大约 100 次
  • 向NFC上帝祈祷

谁能帮助我和/或告诉我我做错了什么?先感谢您!

PS:我以某种方式让它与 pcscd 一起使用,但是由于我不知道如何让 mfoc 使用它(如果可能的话)它没有用。

Jua*_*uan 0

现在您可以从源安装 1.8.0 版本。这个版本已经解决了这个问题。

首先卸载libnfc-bin

下载版本1.8.0的源代码 这就是我所做的:

export CFLAGS="-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing \
      -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused \
      -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \
      -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs \
      -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition \
      -Wbad-function-cast -Wnested-externs -Wmissing-declarations"

autoreconf -Wall -vis
./configure --prefix=/usr --sysconfdir=/etc
sudo make clean
sudo make
sudo make install
Run Code Online (Sandbox Code Playgroud)

之后我尝试过nfc-list并且有效

nfc-list uses libnfc 1.8.0
NFC device: ACS / ACR122U PICC Interface opened
Run Code Online (Sandbox Code Playgroud)