我刚给自己买了一个新的ACR122U-A9NFC阅读器,我需要在ubuntu18.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我从中读到的是:
我已经做了以下几件事:
nfc pn533 pn533_usb中的文件/etc/modprobe.d/blacklist-libnfc.confsudo modprobe -r <driver>手动删除上述驱动程序有人能帮我和/或告诉我我做错了什么吗?提前谢谢你!
PS:我以某种方式让它与pcscd一起工作,但是由于我不知道如何让mfoc使用它(如果可能的话),这是没有用的。
发布于 2021-12-10 23:03:46
现在,您可以从源代码安装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 openedhttps://stackoverflow.com/questions/57762831
复制相似问题