Reading NDEF pn532

Tags: #<Tag:0x00007fe22311b6d0>


My project I made for my daughter using nfc tags and the dfplayer mini was a hit, so much that I’m getting requests from family members for birthdays, Christmas, etc. I’m glad everyone is happy with it, but with this many requests and the fact that its for children who will inevitably lose or destroy the nfc tags, I need a way to produce them in quantity. Right now I’m using the UID from each tag, unfortunately this requires reprogramming the xenon for a replacement, which is unrealistic.

I’ve searched for hours, through the forums and Google, but nobody seems to need to read the ndef data on a tag, or at least didn’t come up with a solution. So is there a way to write to multiple tags, and read that data with a PN532, using the adafruit library, to accomplish this?


You could stick with the simplicity of just reading the UID from a card but instead of hard coding one UID number have a small database (list) in eeprom which the xenon could search through. To update the list you could expose Cloud functions (add UID, clear all UIDs). If you want to try BLE you could add the UID through BLE!


Have you tried something along the line of the Adafruit Samples


@ScruffR That looks like it would do what I’m looking for, if I’m reading it right. The “page” portion is the user defined data?

@armor that would be an alternative, but I should point out, I’m only able to read the hard coded UID. I know either way its just a matter of adding code to read which additional part I want, but not knowing what that is, or how to assign a soft coded UID for that matter, is the problem.


I think @armor’s approach was actually offering a solution for the hard coded UID part.
You won’t need to flash individual code for each of the hard coded UIDs but only keep your code UID “agnostic” while adding some functionality to register a set of given hard coded UIDs with the device which should be stored in EEPROM and your “agnostic” code will just take these registered UIDs for its internal logic.