Skip to main content
Visitor II
October 13, 2021
Solved

I would like to read an NFC tag , T2T with a ST25R95 reader

  • October 13, 2021
  • 8 replies
  • 2475 views

I'm trying to read a T2T tag with NFC card reader, Nucleo expasion board attached to STM32F103 Nucleo board. I'm using an example from X-CubeExpansion_NFC3

This tag is well formatted with NDEF, but when I try to read with this example, I get an error in ndefPollerNdefDetect(). This funtion returns ERR_PROTO.

If I read this tag with any other application, I can read it content.

Can you help me with this problem. I'm sure, I'm doing something wrong, but I don't know what is

Thank you in advance, looking forward to hearing from you

Carmen

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

    Hi Carmen,

    The tag you are using is not an NFC Forum T2T tag. It support NDEF in a proprietary way. The ST25 NDEF layer is NFC Forum based and does not implement the support of this proprietary stuff.

    I would suggest to use true T2T tags such as ST25TN.

    Rgds

    BT

    8 replies

    Technical Moderator
    October 14, 2021

    Hi Carmen,

    can you dump the content of the tag memory and share it with me so that I can have a look? You can use various Android apps to dump the tag memory.

    Some addition questions: Which tag do you use (model, manufacturer)? Is there any memory lock TLV or reserved area TLV in this tag? The current X-CUBE-NFC3 has some limitations regarding the memory lock TLV/reserved area TLV support. Can you try to update the RFAL and the NDEF from the latest ST25 Embedded NFC library that provides full support of the memory lock TLV and reserved area TLV?

    Rgds

    BT

    CCarr.14Author
    Visitor II
    October 14, 2021
    Hello,
    I write below the dump:
    +Sector: 0
    EC6FF20E7F880400C08E3B5165501113
    140103E103E103E103E103E103E103E1
    03E103E103E103E103E103E103E103E1
    ********************************
    +Sector: 1
    00000310D1010C5402656E5445434E41
    4C494120FE0000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 2
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 3
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 4
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 5
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 6
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 7
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 8
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 9
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 10
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 11
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 12
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 13
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 14
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    +Sector: 15
    00000000000000000000000000000000
    00000000000000000000000000000000
    00000000000000000000000000000000
    ********************************
    Thank you
    Carmen
    Technical Moderator
    October 14, 2021

    Hi Camem,

    i can see an NDEF Text record inside the memory ("TECNALIA " text) but the T2T Capability Container seems to be corrupted.

    The CC is supposed to be located at physical block #3 and is supposed to start with E1h magic number followed by version 10h.

    The current content is

    Block # content
    00 EC6FF20E Internal
    01 7F880400 Internal
    02 C08E3B51 Internal + lock
    03 65501113 <----Capability container

    Also I can see some strange 03E103E1 blocks before the NDEF TLV.

    As the CC file does not contain a valid E1h magic number, the ndefPollerNdefDetect returns an ERR_PROTO error.

    I would suggest to check the tag memory content and make sure it compliant with NFC T2T specification.

    Rgds

    BT

    CCarr.14Author
    Visitor II
    October 14, 2021
    Hi,
    I'm not very familiar with the NFC tags, but I have more tags as this, and the mobile reader can read them without any problema. Maybe the tag is not T2T type, but example application detects it as this type, I don´t know why
    Best regards
    Carmen
    Technical Moderator
    October 14, 2021

    Hi Carmen,

    can you share with me (in private message if needed) the tag model and manufacturer? Which mobile reader do you use? Does the mobile reader read only the tag memory content or as well the NDEF content? Note that many apps declare that tags are T2T even when not properly NDEF formatted. Which app have you used to write the NDEF message into the tag?

    Actually the memory dump you sent me is quite strange.

    Thanks

    Rgds

    BT

    CCarr.14Author
    Visitor II
    October 14, 2021

    Hi,

    I don't know the manufacturer or tag model. I used a Samsung mobile. I don't know what the reader reads.

    I have used the app called TagWriter from NXP.

    Maybe the tag is corrupted. In a few fays, I'll get new tags and I´ll try again the example.

    Don't worry, if in a fw days, I have the same problem, I'll contact you again.

    Thank you

    Carmen

    Technical Moderator
    October 14, 2021

    Hi Carmen,

    The tag you are using is not an NFC Forum T2T tag. It support NDEF in a proprietary way. The ST25 NDEF layer is NFC Forum based and does not implement the support of this proprietary stuff.

    I would suggest to use true T2T tags such as ST25TN.

    Rgds

    BT

    CCarr.14Author
    Visitor II
    October 15, 2021
    Hi Brian,
    Thank you very much for your help. I'll get a new tags, and I'll try to be true NFC Forum Tags. Then I'll test the example Project and for sure, I shalll not any problema, in any other case I'll get in touch with you again.
    Best regards
    Carmen
    Technical Moderator
    October 15, 2021

    Hi Carmen,

    there is a good chance that you are actually looking Mifare Classic tags formatted for NDEF format:

    • These tags don't exist in NFC Forum, therefore our software which follows NFC Forum procedures will treat them as T2T.
    • These tags are using a proprietary, since many years broken crypto scheme which our software does not support.
    • To my knowledge only some Android phones with NXP chipset will support those tags (read and write).

    Best Regards, Ulysses

    CCarr.14Author
    Visitor II
    October 15, 2021

    Hello Ulysses,

    I will take your advice into account and buy the NFC tags from the forum.

    Thank you very much for your help

    Best Regards

    Carmen

    CCarr.14Author
    Visitor II
    October 15, 2021

    Hello again,

    My customer wants to use Mifare Ultralight, or Mifare Ultralight C. Are these tags compatible with the ST25R95 RFAL and NDEF libraries?

    Thank you

    Best regards

    Carmen

    Technical Moderator
    October 15, 2021

    Hi Carmen,

    those 2 models can be configured as NFC Forum Type 2 tags. Once configured as NFC Forum Type 2 tags, they are compatible with the ST25R NDEF library. Make sure to check with the tag manufacturer for the proper tag configuration.

    I would recommend to base your application on latest RFAL and NDEF from the ST25 Embedded NFC library that provides full support of the memory lock TLV and reserved area TLV that may be used with some NFC Forum Type 2 tags.

    Please not that ST25TN tags are NFC Forum Type 2 tags and are ready to use.

    Rgds

    BT