NFC (PN532): how to transfer Data from smartphone app

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
NFCJunkie
 
Posts: 2
Joined: Sun Jun 04, 2023 3:21 pm

NFC (PN532): how to transfer Data from smartphone app

Post by NFCJunkie »

I am using this awesome library https://github.com/adafruit/Adafruit-PN532 for the PN532 NFC breakout.

What is the recommended way to transfer some (~ 20 bytes) data from a smartphone to this chip?
Host based Card Emulation (HCE) (how authenticate?) on the smartphone and then read from that emulated tag or better other variants? Peer to Peer?
I would be grateful for any hints and /or existing applications (and Android/iOS - APP using NFC)

regards
Matthias

User avatar
barshatriplee
 
Posts: 200
Joined: Wed Mar 22, 2023 10:11 am

Re: NFC (PN532): how to transfer Data from smartphone app

Post by barshatriplee »

Host-based Card Emulation allows your smartphone to emulate an NFC card, allowing it to communicate with the PN532 as if it were a physical card.
In this approach, you can develop an Android or iOS application that implements the HCE feature to emulate an NFC card.
On the PN532 side, you can use the Adafruit-PN532 library to read the data from the emulated tag.
The authentication for HCE depends on your specific use case. You can implement various authentication mechanisms within your application, such as password-based authentication or BANNED authentication protocols.

User avatar
NFCJunkie
 
Posts: 2
Joined: Sun Jun 04, 2023 3:21 pm

Re: NFC (PN532): how to transfer Data from smartphone app

Post by NFCJunkie »

thanks a lot, @barshatriplee! Do you know of any Android Demo application and also of any implementation on the reader-side, that uses https://github.com/adafruit/Adafruit-PN532 ?

I was able to read the UID from smartphone. But reading from the emulated tag
like in this example
https://github.com/adafruit/Adafruit-PN ... ic_memdump
from this app
https://play.google.com/store/apps/deta ... e_CH&gl=US
did not work due to autentication errors

hints for any working demo very welcome :-)

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”