Search code examples
androidnfcndefmemory-layoutiso-15693

Write and read multiple values to and from specific memory block (location) in NFC-V


I am working on a project where I'm using M24LR64E-R ISO 15693. My problem is that I have written a simple program that can write and read an NDEF message with multiple text records using a normal NFC tag (NFC type V - ISO 15693).

How can I write my NDEF message to a specific location on memory and eventually read these records and display them on my application using M24LR64E-R ISO 15693.

I have been searching both here and online for how to write and read NDEF message with multiple records to and from a specific memory location on NFC-V but couldn't find anything.


Solution

  • The NDEF abstraction layer was designed to be an astraction of the actual memory layout of NFC tags. It works on top of several different tag platforms (which have different memory structures and layout). As a result, NDEF is not well-suited for storing data to specific memory locations inside a tag.

    As a result, NDEF APIs do not support writing to specific locations inside a tag. From the perspective of the NDEF API, the NFC tag is a container that contains exactly one NDEF message (potentially consisting of multiple NDEF records).

    What you could do, however, is to use only parts of the NDEF API (i.e. NdefRecord and NdefMessage) and take care of reading and writing to the yourself using low-level IO methods.