1

I have a Pi Zero v1.3:

PI - pn532

5v to 5v
gnd to gnd
BCM10 to MOSI
BCM9 to MISO
BCM11 to SCK
BCM5 to SS

I think the issue is BCM5 to SS? I believe this should be CE0 or CE1?

I have closed both SEL0 and SEL1. The only other thing is instead of using the DI/O 1-6 corresponding to the "MISO/MOSI/ETC", I plugged the wire directly into the hole for MISO/MOSI/etc.

Link to the product.

12
  • but which tutorial says "bcm5 to ss"?
    – tlfong01
    Apr 13, 2020 at 0:48
  • 1
    I'll have to find it.Is there another it should connect to?
    – Denis
    Apr 14, 2020 at 2:28
  • You might like to show us a photo of your module, similar to the photos in these NFC questions: (1) stackoverflow.com/questions/60819793/…, (2) raspberrypi.stackexchange.com/questions/109773/…. Cheers.
    – tlfong01
    Apr 14, 2020 at 3:49
  • I googled the tutorial for your module and found it is for I2C. (3) learn.adafruit.com/adafruit-pn532-rfid-nfc/shield-wiring. Actually your module can do I2C, SPI, and UART. My answer in Ref 1 above is for PN532 in I2C mode, and I successfully followed the libnfc tutorial to setup the mdules OK. I can show it in SPI mode if you prefer to do SPI. BTW, the tutorial in your mdoules is for Arduino, you need to find other NFC tutorials for Rpi, such as libnfc for PN532 or simpleMFRC522 etc.
    – tlfong01
    Apr 14, 2020 at 3:56
  • 1
    Hey thank you for all of this!! I checked the spi an that was good. Here is what I posted in the forum. I looked it up and matched the arduino connections to the shield and I have rewired up the nfc pn532. I will post a new photo tonight but it is still not workin :( forums.adafruit.com/viewtopic.php?f=60&t=164398
    – Denis
    Apr 15, 2020 at 2:11

1 Answer 1

4

Answer

Part A - PN532 NFC testing setup

pn532 test


Part B - libnfc 1.7.1 SPI Mode tested OK

libnfc 1.7.1 test ok

/ to continue, ...


References

(1) Problem with detecting badge with PN532 and Rpi - Asked 2020mar23, Viewed 74 times

(2) How can Rpi python read a MFRC522/PN532 NFC/RFID MIFARE smart card/tag? - Asked 2020mar28 Viewed 271 times

(3) PN532 NFC Controller Datasheet Rev 3.6 — 2017nov28 NXP

(4) PN532 UM0701-02 80C51 Firmware User Manual Rev 02 - NXP 2007

(5) PN532 NFC RFID Module - Comoponents101 2018oct06

(6) Raspberry Pi Interface with PN532 NFC Module, with python demo program - Wilfrid Laurier University 2019

(7) Youtube Interfacing Raspberry Pi to PN532 NFC Module - Terry Sturtevant, Wilfrid Laurier University, 10,490 views 2017may04

(8) PN532 NFC HAT for Raspberry Pi, I2C/SPI/UART - WaveShare USD$14

(9) PN532 NFC HAT for Raspberry Pi, I2C/SPI/UART - Wiki WaveShare

(10) PN532 UM0701-02 User Manual - NXP

(11) NTAG213/215/216 Datasheet - NXP

(12) MIFARE Classic 1K Smart Card Datasheet R3.2 2018may23 - NXP

(13) PN532 Demo Code - WaveShare

(14) OsoYoo (with schematic) PN532 NFC RFID module for Raspberry Pi

/ to continue, ...


Appendices

Appendix A - Suggestion to wire AdaFruit's Arduino compatible PN532 NFC shield to Rpi.

PN532 NFC HAT for Rpi Datasheet - WaveShare

PN532 NFC HAT for Rpi Wiki - WaveShare


pn532 wiring


Appendix B - PN532 NFC Module I2C/SPI/UART Jumper Setting

i2c/spi/uart jumper setting


Appendix C - PN532 Register Map

pn532 reg map


Appendix D - PN532 Schematic

PN532 NFC RFID module for Raspberry Pi

pn532 schematic


Appendix E - PN532 UART Mode Quick testing - WaveShare

Quick testing of the module by connecting it to PC with USB to TTL cable/adapter instead of Raspberry Pi

  1. Hardware connection

PN532 NFC HAT USB to TTL Module

3V3 3.3V
GND GND
TX  RX
RX  TX
  1. Set L0 to L and L1 to L by jumpers

  2. Connect USB to TTL Module to PC by USB cable

  3. Open Serial assistant software, set it

    Baud rate:115200 Data bits:8 Stop bits:1 Parity:None Flow control:None

  4. Check "HEX send” and “HEX display”

  5. Select correct serial port and open

  6. Send data below to wake up FN532 module:

    55 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 03 FD D4 14 01 17 00

(Please refer to PN532 User Manual HSU wake up condition Chapter)

The response from PN532 module should be:

00 00 FF 00 FF 00 00 00 FF 02 FE D5 15 16 00
  1. Send data below to scan Mifare Classic card(The blue card provided, hereafter called as "card")

    00 00 FF 04 FC D4 4A 01 00 E1 00

Closing card to coil part of module, module scan it and response:

00 00 FF 0C F4 D5 4B 01 01 00 04 08 04 XXXXXXXXXX 00

XXXXXXXXXX in response data is ID (3 bytes) and checksum (1 byte) of card.

(Please refer to PN532 User Manual InListPassiveTarget Chapter)

def wakeup():
  # Send command to wake up PN532
  uart.write(b'\x55\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') # wake up!
  return

/ to continue, ...


End of answer


2
  • 1
    Hey, so I switched back to try i2c. I'll use all your info. Your amazing really. Taking this time just to help me. Thank You. Your setup is incredible! I'd love to ask you some business questions? Can you email me? denis@harpangell.com
    – Denis
    Apr 17, 2020 at 5:10
  • But I am not interested in business at all. Perhaps you can try StackOverflow: stackoverflow.com/jobs/remote-developer-jobs. Cheers.
    – tlfong01
    Apr 17, 2020 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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