ubuntu - ACR122 NFC 阅读器不适用于 libnfc ubuntu
问题描述
我刚给自己买了一个新的 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
如果 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
有时这也会出现:
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
我从中读到的是:
- 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 使用它(如果这甚至可能的话)它没有用。
解决方案
现在你可以从源版本 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
之后我尝试过nfc-list
并且它有效
nfc-list uses libnfc 1.8.0
NFC device: ACS / ACR122U PICC Interface opened
推荐阅读
- excel - 在另一个 UDF 中调用 UDF
- java - 在另一个列表中累积列表的计数
- excel - 尝试根据“0”是否在电子邮件旁边的 C、D 和 E 列中发送不同的 Outlook 邮件
- c# - 为什么不能使用 sendgrid 通过邮件附加附件?
- typescript - 无法理解 Typescript 中的 ArrayLike 接口
- excel - 当我为循环计算不同的标准时,如何停止重复代码?
- ionic4 - 删除离子4中输入的边缘
- javascript - ReactJS - 不能为回调函数返回 jsx?
- node.js - 在 if 语句中使用带有参数的请求路径
- cmd - 我们可以使用 forfiles 命令根据修改时间隐藏文件吗?