MrBug
Posts: 2
Joined: Sun Apr 18, 2021 9:16 pm

PN532 with Raspberry SPI card emulation

Sun Apr 18, 2021 9:35 pm

Hello, I am trying to create a small project with my friend using Rpi4 with a PN532 NFC module. We are trying to communicate with an android smartphone. The smartphone supposed to read data from NFC first, then sends a data to NFC. But the problem is the documentation is very much limited. We are using Rpi4 with SPI communication on a PN532 and couldn't even find any usefull examples or libraries for this.
We tried libnfc:
  • nfc-emulate-tag
    nfc-emulate-forum-tag4
    nfc-emulate-forum-tag2
and tried read with applications (android mobile phone samsung j7) which is nfc tools, nfc write, mifare classic tool but didn't get any response.
We used connect the nfc board for following gpio pins:
  • sck = gpio 11
    miso= gpio 9
    mosi= gpio 10
    ce(ssel/scl/rx) = gpio5
If you know a way for communication or any documentation about this subject, can you help us?
Have a great day.

User avatar
topguy
Posts: 7092
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: PN532 with Raspberry SPI card emulation

Tue Apr 20, 2021 9:42 am

You should start with something simple if you are unsure of your wiring.

Run the read-tag/card/phone examples first to see if you can detect your phone or other NFC tags. If you dont have proper connection the code should spit out errors about just that.

MrBug
Posts: 2
Joined: Sun Apr 18, 2021 9:16 pm

Re: PN532 with Raspberry SPI card emulation

Thu Apr 22, 2021 10:42 pm

topguy wrote:
Tue Apr 20, 2021 9:42 am
You should start with something simple if you are unsure of your wiring.

Run the read-tag/card/phone examples first to see if you can detect your phone or other NFC tags. If you dont have proper connection the code should spit out errors about just that.
Thanks for answer. There is no problem with the wiring (I tried passive communication with nfc tags).

Return to “General discussion”