cancel
Showing results for 
Search instead for 
Did you mean: 

ST25DV Append NDEF records

Rajeev Piyare
Associate III

Has anyone implemented or does ST provides a library where the NDEF records can be appended or chained together for data logging such as long term sensor data etc without overwriting the old records?

Looking at the current NDEF library of the ST25DV it does not seem to do so.

Does anyone has any workaround or solution for this?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Rene Lenerve
ST Employee

Hi @Rajeev Piyare​ ,

Yes appending records can be done easily. But be aware that on smartphone side it would take some time if the memory is full of records to read the NDEF (data rate = 26kbits/s).

This was a work to do, but not implemented in this library. The lib has been rewrite to be more efficient and more flexible to use with all our products reader and tags. In our readers package this new version is available. We need to propagate it in tags package too as the ST25DV.

Regards.

View solution in original post

16 REPLIES 16
Damien G.
ST Employee

​Hello Rajeev,

what platform will your application run on ? PC, Android, STM32 ?

Thanks,

Damien

Hi @Damien G._O​ ,

The ST25DV04K NFC tag is connected to ARM-Cortex-M3 via I2C since we have a custom sensor device. However, for the low-level implementation, we are utilizing the same drivers and NDEF libraries provided by STM.

It would be great if there is a library for appending the data via I2C with correctly updating the NDEF header (possibly NDEF TEXT format) until the memory gets full. Currently, this is the major hurdle we are facing before mass producing our sensors with NFC for long term data logging.

Any form of support from ST and or community will be highly appreciated!

Thanks so much.

Rajeev

Rajeev,

​You may find resources related to the STEVAL-SMARTAG1 to be of value for your project as it sounds very similar to your use case.

Especially the page related to the STM32Cube function pack that contains firmware code examples.

Best regards,

Damien

@Damien G._O​ ,

I did look at those codes. I could be wrong, but it seems that the header and other payload format is very customized and can only be read with a custom reader APP. If one wants to read the data out with a standard NFC App might not be possible, is it?

What I am looking for is a standardized format that can be read out easily, lets say as text showing the full logs...

Please let me know if I am missing something!

Thanks for your feedback Damien.

Rene Lenerve
ST Employee

Hi @Rajeev Piyare​ ,

In the NDEF lib provided with the ST25DV firmware, there is a function to append a record on an NDEF file. It is used with the NDEF AAR record type to append an AAR record in the memory, it can be adapted for the text record I think.

Writing multiple records with the lib can generate memory issues or time consuming, as the whole NDEF file must be read, modified then rewrite into EEPROM.

Is this the only way you can implement for your use case?

Regards.

Hi @Rene Lenerve​ ,

Thanks for your feedback. I think, I may have figured out how to implement appending of text records without breaking the library.

This will be very customized for my own application but the main parameters that I need to keep track are the TLV and the payload length together with block offsets to slot in new data.

In this manner, I will not need to read the whole NDEF message (which after long term logging will be long), but to modify the above parameters accordingly and then write the new data to EEPROM.

Thanks and I appreciate the feedback from the ST.

*PS. Was there any particular reason as to why this was not initially implemented in the ST25DV library, especially for writing data via I2C?

Regards

Rene Lenerve
ST Employee

Hi @Rajeev Piyare​ ,

Yes appending records can be done easily. But be aware that on smartphone side it would take some time if the memory is full of records to read the NDEF (data rate = 26kbits/s).

This was a work to do, but not implemented in this library. The lib has been rewrite to be more efficient and more flexible to use with all our products reader and tags. In our readers package this new version is available. We need to propagate it in tags package too as the ST25DV.

Regards.

@Rene Lenerve​ ,

On my end, with the current RF data rate of 26kbits/s, I think it's not a problem for reading. We do not have any strict latency issue there.

But good to know that the reader package contains this update.

Looking forward to the updates on the ST25DV MCU library side.

Thanks for the continuous feedback.

Cheers

Sorry for rewiving this post many monts later, but could you please specify where I can get this "readers package" that you mention?

I have not been successful in finding this on st.com.

BR

Anders