使用PN532和Raspberry Pi检测徽章的问题 [英] Problem with detecting badge with PN532 and Raspberry Pi

查看:131
本文介绍了使用PN532和Raspberry Pi检测徽章的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用从亚马逊这里购买的PN532模块检测标签:

I have been trying to detect an tag using the PN532 module that I bought from amazon here:

https://www.amazon.ca/ASHATA -Controller-Raspberry-Interface-Switching/dp/B07XFNDHNS

我在这里遵循了本教程:

I followed the tutorial here:

http://wiki.sunfounder.cc/index.php?title=PN532_NFC_Module_for_Raspberry_Pi

我尝试同时使用I2C或SPI,但是当我运行nfc-poll时,两种结果都只为我提供以下信息:

I tried using both I2C or SPI, but both results just give me the following when I run nfc-poll:

nfc-poll uses libnfc 1.7.1
NFC reader: pn532_spi:/dev/spidev0.0 opened
NFC device will poll during 30000 ms (20 pollings of 300 ms for 5 modulations)
nfc_initiator_poll_target: Success

似乎PN532已正确连接到Pi,但未检测到标签或未打印任何信息.我开始怀疑问题是否出在PN352设备本身上.也许我有一个毛病?

It seems like the PN532 is connected to the Pi properly, but the tag is not being detected or printing any info. I am beginning to wonder if the problem is with the PN352 device itself. Maybe I got a faulty one?

谢谢

推荐答案

答案

Answer

更新2020mar29hkt2040

第1部分-已通过libnfc v1.17 I2C配置测试OK

OP无法测试libnfc I2C模式和SPI模式.我尝试了I2C模式,发现一切正常.我猜OP尚未设置配置文件,或者尚未设置自动扫描= true".请参阅附录A中的示例libnfc171配置文件.PS-(1)我的NFC阅读器可以毫无问题地检测到标签. (2)我正在使用Rpi4B克星2020mar13.

The OP has no luck in testing libnfc I2C mode and SPI mode. I tried I2C mode and found everything OK. I guess the OP has not set the config file, or has not set "auto scan = true". See my example libnfc171 config file in Appendix A. PS - (1) My NFC reader can detect a tag without any problem. (2) I am using Rpi4B buster 2020mar13.

第2部分-现在正在测试SPI模式2020mar29hkt2044

Sunfounder配置说明建议将SPI速度降低50kHz.因此,我更改了/bbo/config.txt文件,如附录F所示.

Sunfounder config instructions recommends lowering SPI speed 50kHz. So I have changed the /bbo/config.txt file as shown in Appendix F.

/继续,...

参考

References

(1) OP的NFC RFID控制器模块

(2) SunFounder Rpi PN532 NFC模块教程

(3) Libnfc NFC库

(4) Libnfc配置手册

(5) Libnfc主页

(6) Libnfc:配置

(7) Libnfc:nfc-list

(8) MIFARE卡

附录

Appendices

附录A-安装libnfc 1.7.1

附录B-读取标签

附录C-已通过NFC阅读器测试

附录D-我的NFC阅读器和标签

附录E-PN532 NFC阅读器V3接线

附录F-使用libnfc 1.1.7测试PN532的SPI配置

这篇关于使用PN532和Raspberry Pi检测徽章的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆