首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ACR122 NFC读取器不适用于libnfc ubuntu。

ACR122 NFC读取器不适用于libnfc ubuntu。
EN

Stack Overflow用户
提问于 2019-09-02 21:27:14
回答 1查看 4.2K关注 0票数 5

我刚给自己买了一个新的ACR122U-A9NFC阅读器,我需要在ubuntu18.10上安装libnfc。它需要与libnfc一起工作,因为mfoc接口就是这样的(如果有一种不用libnf的方法使用mfoc,那就太好了!)这个解决方案对我也有帮助!)在安装libnfc 1.7.1并做了几个小时的研究之后,我仍然没有让它开始工作。每次使用sudo nfc-list和pcscd不运行时,都会出现以下错误:

代码语言:javascript
复制
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正在运行,则错误如下:

代码语言:javascript
复制
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

有时它也会出现:

代码语言:javascript
复制
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 deamon
  • 使用sudo modprobe -r <driver>手动删除上述驱动程序
  • 从这里安装设备驱动程序:https://www.acs.com.hk/en/products/3/acr122u-usb-nfc-reader/
  • 重新启动我的笔记本大约100次
  • 向nfc神祈祷

有人能帮我和/或告诉我我做错了什么吗?提前谢谢你!

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

EN

回答 1

Stack Overflow用户

发布于 2021-12-10 23:03:46

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

首先卸载libnfc-bin

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

代码语言:javascript
复制
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,它起作用了

代码语言:javascript
复制
nfc-list uses libnfc 1.8.0
NFC device: ACS / ACR122U PICC Interface opened
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57762831

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档