cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the system file of an NFC TAG?

mwhitecliff
Associate II

I have a STM32U5 with an ST25R3911B and an ST25TV02KC NFC TAG using RFAL.

I would like to format an empty NFC TAG to store an NDEF text message. My setup works perfectly if I initially write an NDEF text record with my smartphone. But if I write to an empty NFC out of the shelf, the NfcType5_NDEFDetection() function reports the NDEF_ERROR_NOT_FORMATED error. Sure I can write the CC-File, but how do I know the size of the memory? Well yes, I know the size of the memory for this TAG (datasheet) but I would like to make it dynamically to support other TAGs too.

So my intention was, to read the RFAL_NFCV_SYSINFO_REQ_ALL where I can get the MEM_SIZE_INFO of the TAG. But this does not work. I use the rfalNfcvPollerGetSystemInformation() function for this which reports a timeout.

On my Smartphone, I have the ST25 Application and I can read the system file with the memory size of the TAG.

How can I read this with my ST25R3911B? Or is there even an easier way to format the TAG? The only thing missing from the CC-File is the memory size...

Regards

Marc

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

I would recommand to use the NDEF middleware from the latest delivery of the ST25R embedded library. This includes a ndefT5TPollerTagFormat API.

rfalNfcvPollerGetSystemInformation should work to retrieve the mem size (if you have a timeout, then probably one of the parameters is incorrect).

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Brian TIDAL
ST Employee

Hi,

I would recommand to use the NDEF middleware from the latest delivery of the ST25R embedded library. This includes a ndefT5TPollerTagFormat API.

rfalNfcvPollerGetSystemInformation should work to retrieve the mem size (if you have a timeout, then probably one of the parameters is incorrect).

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
mwhitecliff
Associate II

Hi Brian

Thank you for the hint. I will have a look at the new library. I used an older one.