cancel
Showing results for 
Search instead for 
Did you mean: 

How to add data to an NDEF message?

GThab.1
Associate II

Hi,

I'm using an ST25DV04KC tag with the STM32L476 microcontroller as the host. I can write and read from the tag without issues through I2C. However, I'd like to inquire about the feasibility of gradually adding data to an existing NDEF message stored in the tag's memory.

I looked into some older topics, and I saw that this might be implemented in future versions. Has this been implemented in any library?

I see that it is possible by completely rewriting the message with the new aggregated data. However, this would wear down the memory unnecessarily. So, I would like to simply add the new data to the end of the previous message. I know that to achieve this, I will need to modify the NDEF header to identify these new data. I'd like to know if I should implement this myself or if ST already provides this feature in any library.

12 REPLIES 12

Hi Olivier,

After Brian's explanations and suggestions, and now yours, yes, we are getting on the right direction!

Is there any recent example using FTM for transferring a large volume of data? I see that there are old example firmwares that implement firmware updates, file transfer... more complex things. However, the SDK I am using and from what I understood, which is the latest one (X-CUBE-NFC7), only has basic functionalities, like just writing and reading with FTM or NDEF. So, is there anything current that demonstrates more complex applications using the latest features?

This left me a bit confused because the latest releases seem to have much less functionality and demonstrations than the old stacks. Could you point me in a direction?

For example, I see that SMARTAG1 has exactly what I would like; this application logs sensor data. However, it is not compiled for STM32CubeIDE. Is there any more recent similar application that I can use as a reference?

Thank you.

Olivier L
ST Employee

Hi,

For my information, what do you plan to use to communicate with the ST25DV Tag? An NFC Reader connected to a PC? A smartphone?

The ST25SDK has an API to transmit large about of data (for example 100kB) through ST25DV's FTM. For example, if you install the Android application ST25 NFC Tag, you can tap a ST25DV tag and, in the user menu, go to "FTM demos".

From here, you can:

  • send or receive pictures
  • send or receive data (you will be asked the size to transfer)
  • perform firmware upgrade.

In my opinion, this is an interesting starting point to see the FTM functionalities. 

The same features are available with the PC app.

The source code of those applications is available if you want to do step by step debugging.

Regards

 

GThab.1
Associate II

Hi Olivier,

I intend to use a smartphone with a proprietary application in my final application. However, for development purposes, I am already using the ST NFC Tap.

On the reader side, I'm familiar with ST's applications that can assist me, and I have no doubts about their functionalities. My uncertainty lies more in the firmware for the tag. I find it a bit confusing with the software stacks that can be used on the tag. I see that there are several options, and nothing clearly specifies the differences between the stacks and which one would be more suitable. Until now, I thought the correct and most up-to-date stack would be X-CUBE-NFC7. It turns out that it's not the most comprehensive one, but I didn't know which one is recommended.

When you mention ST25SDK, are you referring to the link below? This stack pertains to the application, right? All my questions and requests are related to the Tag's firmware. I don't handle the application, which is the responsibility of another team. My focus is solely on the firmware for the ST25DV64KC.

https://www.st.com/en/embedded-software/stsw-st25sdk001.html