I want to write an NDEF message (containing a text NDEF record) to an NFC tag (Mifare Ultralight TYPE 2) using APDU commands. Tag has 4 byte memory banks starting form 0x00 to 0x2B. Which memory location should I write raw binary representation of my NDEF message?
1
votes
If you don't have a very good reason to do what you've asked: Don't do it. The Type2 memory layout is very complex and you'll likely end up writing several hundret lines of code
– Nils Pipenbrinck
After lots of research including various code implementations, now I have the knowledge about NDEF protocol and its memory mappings. What I supposed to find was creating an NDEF message and dumping its memory sequentally starting from a block (maybe 0x05) but this doesn't work. I couldn't find any open source implementation on desktop (android has currently built in) so I want to implement this and contribute to open source community (and of course also use it in my current project).
– Gökçer Gökdal
1 Answers
1
votes
In Type 2 specification, the data blocks start at byte 0x10
See page 5 for a brief overview of type2 memory spec and memory structures on page 29:
http://apps4android.org/nfc-specifications/NFCForum-TS-Type-2-Tag_1.1.pdf
Also, here is an example empty NDEF message written to the tag memory