I'm building an NFC jukebox where I want each NFC tag to contain the uri to a song or playlist.
I've connected an adafruit PN532 reader with an ESP32 via I2C and am having some success. Using the adafruit libraries, I can format to NDEF, read, and write cards.
The problem is that I can't write a long enough uri. It looks like only one sector of the Mifare 1k card is initialized as NDEF (along with the MAD sector 0). And the one record seems like it can only hold about 38 characters.
What can I do to have longer NDEF messages?
Thanks!
Rudy
Longer NDEF messages using PN532?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67391
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Longer NDEF messages using PN532?
I don't know any way to increase the size of the NDEF partition, so your best bet will probably be to use a lookup table for the URLs. A 64-bit hash of the URL (16 hex characters) would easily identify as many URLs as you want.
You'd have to build the table that maps hashes to URLs, but that isn't awful.
You'd have to build the table that maps hashes to URLs, but that isn't awful.
Please be positive and constructive with your questions and comments.