cancel
Showing results for 
Search instead for 
Did you mean: 

M24SR NDEF with multiple records

Posted on March 11, 2015 at 16:23

Hi,

I'm trying to set up a NDEF with multiple records.

    // write NDEF message (command C-APDU - datasheet 5.2.1 p32)

    ndef[0] = 0x02;                // PCB:

    ndef[1] = 0x00;                // CLA: class byte

    ndef[2] = 0xD6;                // INS: instruction byte

    ndef[3] = 0x00;                // P1: param byte 1

    ndef[4] = 0x02;                // P2: param byte 2

    ndef[5] = 5 + 5 + 7 + 5 + 1;        // Lc: number of bytes of the data field

    // record &sharp1

    ndef[6] = 0x91;             // MB | ME | CF | SR | IL | TNF

    ndef[7] = 0x01;                // type length

    ndef[8] = 5+1;               // payload length

    ndef[9] = 'U';              // Type field: 'U' - URL, 'T' - text, ...

    ndef[10] = 0x01;               // URI identifier -> 0x01 = ''http://www.'', 0x03 = ''http://''

    ndef[11]='s';

    ndef[12]='t';

    ndef[13]='.';

    ndef[14]='d';

    ndef[15]='e';

    // record &sharp2

    ndef[16] = 0x51;             // MB | ME | CF | SR | IL | TNF

    ndef[17] = 0x01;                // type length

    ndef[18] = 5+1;               // payload length

    ndef[19] = 'T';              // Type field: 'U' - URL, 'T' - text, ...

    ndef[20] = 0x02;               //

    ndef[21] = 'e';               //

    ndef[22] = 'n';               //

    ndef[23]='H';

    ndef[24]='a';

    ndef[25]='l';

    ndef[26]='l';

    ndef[27]='o';

    send_command(ndef, 30);                                  // 28bytes DEF length + 2bytes CRC

    delay_ms(NDEF_WRITE_DELAY);

    i2c_read_n_reg_M24SR(M24SR_ADDR,0,5);

Unfortunatly the data does not get written to the M24SR chip. What is wrong?

#multiple-ndef #m24sr
1 ACCEPTED SOLUTION

Accepted Solutions
Anais GALLIGANI
Senior II
Posted on June 30, 2015 at 13:37

Hi ,

Have you tried to use ''Multiple NFC NDEF Records App'' available on google play?

And the source code are available on our website STSW-M24SR005 

http://www.st.com/web/en/catalog/tools/PF261531

I hope this is helping,

Have a nice day,

All the best,

ST NFC/RFID support

View solution in original post

1 REPLY 1
Anais GALLIGANI
Senior II
Posted on June 30, 2015 at 13:37

Hi ,

Have you tried to use ''Multiple NFC NDEF Records App'' available on google play?

And the source code are available on our website STSW-M24SR005 

http://www.st.com/web/en/catalog/tools/PF261531

I hope this is helping,

Have a nice day,

All the best,

ST NFC/RFID support