Skip to main content
Visitor II
May 24, 2023
Solved

How to read the system file of an NFC TAG?

  • May 24, 2023
  • 2 replies
  • 1307 views

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

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    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

    2 replies

    Technical Moderator
    May 24, 2023

    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

    Visitor II
    May 24, 2023

    Hi Brian

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