Skip to main content
sach.56215330888194E12
Associate II
September 27, 2019
Solved

Mifare DesFire Read Write(T4T)

  • September 27, 2019
  • 4 replies
  • 1833 views

Hi,

    I'm using ST25r3911 for my project and have to work on DESFire card. I know there is code support for ISO/IEC 14443 cards on ​STSW-ST25R002. We can use DESFire as T4T for read and write. Is there any example of how to perform read/write?

Also is there any support for Authentication on STSW SDK?

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

    Hi,

    for your information,

    • the memory footprint can be reduced thanks to the RFAL_FEATURE_*** macros in your platform.h file. e.g. set RFAL_FEATURE_NFC_DEP to false if NFC_DEP is not used in your project
    • if you are using Keil tools, the linker can be instructed to remove unused code/data/section
    • if you are using Iar tools, the linker by default remove unused code

    I personally would recommend to move to the latest version of the RFAL.

    Rgds

    BT

    4 replies

    Brian TIDAL
    ST Technical Moderator
    September 30, 2019

    Hi,

    rfal_t4t.c provides API to compose ISO 7816 APDU. Some examples of how to use these API can be found in X-CUBE-NFC5 package (file ndef_t4t.c).

    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.
    Ulysses HERNIOSUS
    ST Technical Moderator
    September 30, 2019

    Hi,

    we don't have sample code showing how to do things like authentication. However the interface described by Brian allows you to send any APDUs to perform authentication.

    Regards, Ulysses

    sach.56215330888194E12
    Associate II
    October 1, 2019

    ​Hi Brain/Ulysses,

              Thanks a lot for your recommendations. Actually I have an old version of NFC5 package(ver 1.2) which apparently doesn't have ndef files.

              So I started working on the code which was provided on that version in demo.c to send APDU for select app, select file and read binary.

              I was able to communicate successfully with the tag for the select functions but somehow got stuck on read binary which I'm sorting out now.

              Meanwhile I downloaded NFC5&NFC6 latest versions to check the functionalities.

               When I compare the main function(ISO-DEP Blocking Transceive) to exchange APDU on these 2 versions and the older one which I have it's still the same. Which means nothing much have changed on the Tx/Rx part but yes there is lot of changes when it comes to how the apdu's are packaged and other variables.

             Just want to confirm...Can I continue working on NFC5 version 1.2 for the other apdu's like read and write or should I get the latest NFC package version?

            My only worry is that I need to port in lot of code changes from the new version and I'm kind of going low on memory.

    Regard,

    Sach

    Brian TIDAL
    Brian TIDALBest answer
    ST Technical Moderator
    October 1, 2019

    Hi,

    for your information,

    • the memory footprint can be reduced thanks to the RFAL_FEATURE_*** macros in your platform.h file. e.g. set RFAL_FEATURE_NFC_DEP to false if NFC_DEP is not used in your project
    • if you are using Keil tools, the linker can be instructed to remove unused code/data/section
    • if you are using Iar tools, the linker by default remove unused code

    I personally would recommend to move to the latest version of the RFAL.

    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.