3

树莓派 3B 上安装 libnfc 配合 acr122u 读取 nfc

 2 years ago
source link: https://violarulan.github.io/blog/nfc-on-raspberry-3b-with-acr122u-using-libnfc/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Programmer, Data Analyst and Gamer

树莓派 3B 上安装 libnfc 配合 acr122u 读取 nfc

Oct 17, 2016
已阅读了一分钟

acr122u model a9

ACR122U 是一个通过 USB 接口进行 13.56 MHz 频率下进行非接触式交互数据(近场通信)的模块,可以在深水宝买到,虽然据说水货很多(水货的提示灯在顶部左侧)。

推荐在 Linux 环境下使用,驱动据说会比 Windows 下(有时会硬件假死)稳定很多。

首先需要树莓派,在这里以官方 Raspbian Jessie 介绍。

安装 libudev-dev

sudo apt-get install libudev-dev

安装 libusb

sudo apt-get install libusb-dev

编译安装 libnfc

wget https://bintray.com/artifact/download/nfc-tools/sources/libnfc-1.7.1.tar.bz2
tar xjf libnfc-1.7.1.tar.bz2
cd libnfc-1.7.1
./configure –prefix=/usr –sysconfdir=/etc
make
sudo make install

接下来是与其他 Linux 系统有些不一样的地方,需要 Blacklist 掉两个无关 mod 否则会 lock 设备造成 device is busy 错误

sudo nano /etc/modprobe.d/blacklist.conf

将下面内容加入进去

blacklist pn533
blacklist nfc
sudo modprobe -r pn533 nfc
sudo reboot
sudo nfc-list

It works!

回到文章列表


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK