2

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

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

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?

Thanks

1
  • Your nfc-poll results looks OK, implying that the PN532 module should be working properly. I have followed your tutorial and installed libnfc 1.7.1 smoothly, EXCEPT I could not find and config file and needed to write the config file myself. My reader can detect a tag OK. Please read my answer for more details. Please feel free to ask me to do other tests for you. Cheers.
    – tlfong01
    Mar 25, 2020 at 13:17

1 Answer 1

1

Answer

Update 2020mar29hkt2040

Part 1 - libnfc v1.17 I2C config tested OK

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.


Part 2 - Now testing SPI mode 2020mar29hkt2044

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

/ to continue, ...


References

(1) The OP's NFC RFID Controller Module

(2) SunFounder Rpi PN532 NFC Module Tutorial

(3) Libnfc NFC Library

(4) Libnfc Configuration Manual

(5) Libnfc Main Page

(6) Libnfc: configuration

(7) Libnfc: nfc-list

(8) MIFARE Card


Appendices

Appendix A - Installing libnfc 1.7.1

nfc config


Appendix B - Reading a tag

reading a tag


Appendix C - NFC Reader Tested

NFC


Appendix D - My NFC readers and tags

nfc readers and tags


Appendix E - PN532 NFC reader V3 Wiring

pn532 v3


Appendix F - SPI configuration for testing PN532 using libnfc 1.1.7

spi config


2
  • 1
    Goddammit. allow_autoscan=true fixed this. Was wondering if there was something wrong with my PN532. Thank you. Jul 8 at 15:50
  • 1
    Gald that you solved the problem. Cheers.
    – tlfong01
    Jul 9 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.