cancel
Showing results for 
Search instead for 
Did you mean: 

What procedure to follow for writing into the tag in NDEF format?

RP
Associate II

I am working on M24Sr64-Y chip. I am able to read Chip using I2C as per application note AN4433. But in that application note there is nothing mentioned about writing to the NFC chip using I2C. So I followed commands as for RF writing,Because Reading commands for both are same.

Now I want to know in which format it writes the data in chip? If I write '1' to the chip, it shows one extra byte '0x05' in memory before '1'. What does that byte mean?What procedure to follow for writing into the tag in NDEF format?

1 ACCEPTED SOLUTION

Accepted Solutions
JP Miller
Senior

Dear customer,

Writing M24SR64 through I2C follows indeed the NDEF write procedure, which is similar to the NDEF Read procedure, with some extra steps needed. The data has to be written into NDEF format.

The procedure is as follows:

* Open the I2C session

* Select the NDEF Tag Application

* Read CC file (this is optional)

* Select NDEF file

* Unlock the NDEF file if necessary

* Updatebinary of 2 bytes at address 0, to write the NDEF messsage length at 0 (2 bytes written to 0)

* Updatebinary with the NDEF message content, starting from address 2, with one or more Updatebinary commands.

* Updatebinary of 2 bytes at address 0 with the NDEF message length.

In following these steps, there should not be any extra bytes written into memory.

Have a good day,

Regards

View solution in original post

1 REPLY 1
JP Miller
Senior

Dear customer,

Writing M24SR64 through I2C follows indeed the NDEF write procedure, which is similar to the NDEF Read procedure, with some extra steps needed. The data has to be written into NDEF format.

The procedure is as follows:

* Open the I2C session

* Select the NDEF Tag Application

* Read CC file (this is optional)

* Select NDEF file

* Unlock the NDEF file if necessary

* Updatebinary of 2 bytes at address 0, to write the NDEF messsage length at 0 (2 bytes written to 0)

* Updatebinary with the NDEF message content, starting from address 2, with one or more Updatebinary commands.

* Updatebinary of 2 bytes at address 0 with the NDEF message length.

In following these steps, there should not be any extra bytes written into memory.

Have a good day,

Regards