cancel
Showing results for 
Search instead for 
Did you mean: 

when should I use NDEF_writeNDEF() and TT4_WriteURI()? Also, If I want to send non URL NDEF messages through NFC, which API should I use in the example NFC code and what are the changes in the code I should keep in mind?

KUMAR SAURABH
Associate II
Posted on August 08, 2017 at 14:39

M24SR Cube Expansion example code

1 ACCEPTED SOLUTION

Accepted Solutions
Rene Lenerve
ST Employee
Posted on August 21, 2017 at 16:59

Hi Kumar,

The NDEF_WriteNDEF function is a function of the NDEF Lib and will directly send a write command to the M24SR driver without formatting and without first sending a command to select the application, files, ... (as defined for the M24SR in datasheet).

On the other hand, the function TT4_WriteURI is a function from the M24SR wrapper and allows to initialize and to format the NDEF tag (URI) before writing the NDEF message.

Using the TT4_NDEF API is better for your application, and in the file lib_TagType4 file you will find other functions for each type of NDEF also.

Hope this will help you.

Best Regards.

View solution in original post

1 REPLY 1
Rene Lenerve
ST Employee
Posted on August 21, 2017 at 16:59

Hi Kumar,

The NDEF_WriteNDEF function is a function of the NDEF Lib and will directly send a write command to the M24SR driver without formatting and without first sending a command to select the application, files, ... (as defined for the M24SR in datasheet).

On the other hand, the function TT4_WriteURI is a function from the M24SR wrapper and allows to initialize and to format the NDEF tag (URI) before writing the NDEF message.

Using the TT4_NDEF API is better for your application, and in the file lib_TagType4 file you will find other functions for each type of NDEF also.

Hope this will help you.

Best Regards.