This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TRF7970A: TRF7970A APDU Demo

Part Number: TRF7970A
Other Parts Discussed in Thread: MSP-EXP430G2ET, DLP-7970ABP, , MSP-EXP430F5529LP

Tool/software: Code Composer Studio

Hello!

I want to use TRF7970A as a smart card/bank card reader. I've got MSP-EXP430G2ET LP + DLP-7970ABP.

As a starting point i need an example with APDU functionality.

Can you point me to proper APDU example? 

  • Hello Rustem,

    See our Card Emulation app note: http://www.ti.com/cn/lit/pdf/sloa208

    You will need an MSP-EXP430F5529LP as the MSP-EXP430G2ET does not have enough memory space to support Card Emulation mode.

  • Hello! Thank you for the answer!

    Why do i need Card emulation? I want to create bank card reader.

  • Hello Rustem,

    Sorry, I misread your post and didn't see the Reader portion. You can reject my prior reply as it's incorrect.

    For a reader, the app note would be: http://www.ti.com/cn/lit/pdf/sloa227

    Few notes:

    1) If you need to do EMVCo certification for this application, you cannot use the TRF7970A. See the device silicon errata for details.

    2) We don't have explicit support for bank card commands in our SLOA227 software, but the hooks are all present. The ISO7816-4 interface is what you would use.

    3) We don't have knowledge with bank card commands due to the issue highlighted in point 1 so you'd need to handle full application implementation on your end.

  • 1. Can you advise me another TI NFC chip, that meets EMVCO requirements? 

  • Hello Rustem,

    We do not have such a device available.

  • Hello!

    I've tried this example:  http://www.ti.com/lit/zip/sloc297c

    I've successfully pass Chanel level (REQA, Anticollision, SELECT, RATS) and got correct response from VISA card:

    TX: E0 70

    RX: 05 78 80 70 02 a5 46

    But after that i can't get response in return to any APDU (i've tried SELCET PPSE, SELECT AID). Always: NO_RESPONSE_RECEIVED. Then i do the same thing with other NFC-reader (ACR35) - all works fine. I also tried PPS command (106 kbps) after RATS and got correct response (D0), but APDU after that also failed.

    Do i need any additional tuning on TRF7970A side before i can switch from Channel level to Protocol level?

    I've send APDU using this SPI command:

    8F 91 3D 01 40 (header) 00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00 (body)

  • Hello Rustem,

    As noted in my original post, you should start from SLOA227 software. SLOC297 has minimal ISO7816-4 support and hasn't been tested for compliance with NFC standards unlike SLOA227. SLOC297 is meant for bare bones RFID applications like reading a UID and a few blocks of data. We won't support implementing APDU commands on it when SLOA227 already has APDU's implemented in an easier to use setup.

  • Hello!

    I've already ordered  MSP-EXP430F5529LP to run SLOA227.

    But i've checked the code, SLOA227 and SLOC297 do the same things at the stages, that i pointed to (REQA, Anticollision, SELECT, RATS, SELECT AID). Even AID's are the same.

    Ok, forget about examples, let me rephrase my question:

    I send the below commands to TRF7970A via SPI and get the below answers:

    TX>> 26       // REQA
    RX<< 04 00       // ATQA (Answer To Request type A)
    TX>> 93 20       // Select cascade 1 (Anti Collision CL1 SEL)
    RX<< 08 fe e4 ec fe        // UID (4 bytes) + BCC (Bit Count Check)
    TX>> 93 70 08 fe e4 ec fe + CRC16        // SEL (select tag 0x9370) + UID + CRC16
    RX<< 20 fc 70          // SAK (Select Acknowledge 0x20) + CRC16
    TX>> e0 70 + CRC16        // RATS (Request Answer to Select 0xE070) + CRC16
    RX<< 05 78 80 70 02 a5 46        // ATS (Answer to select response)
    TX>> 00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00 + CRC16    //(SELECT PPSE) + CRC16

    Why i do not get response after last TX? Then i do it with other NFC reader (ACR35) - a get correct response. 

  • Hello Rustem,

    The formatting of the command may be incorrect or your timeout for waiting for a reply may be off. I am not familiar enough with payment cards to know what is missing. The Select PPSE name makes me think this could also be related to the PPS command, if so, there is a Send PPS API to use instead which sets the data rates for the device if you are changing it higher than 106kbps.

    The stages that are the same are the standard stages for ISO14443A communication to read any data from the tags. After those stages, the application defines how to read data and SLOC297 just has a rudimentary hardcoded set of ISO7816-4 to read a simple NDEF message from a Type 4A tag and nothing beyond that.

  • Hello!

    I found the mistake: i forgot 0x02 at the start of the command. Thank you for pointing me to formatting!

  • Hello!

    I've got  MSP-EXP430F5529LP and run SLOA227. 

    How can i send APDU using SLOA227?

    I can' find it in GUI NFC TI Tool v.1.8 and in code.

    I found ISO_7816_4_sendAPDU() function, but it's not called anywhere.

  • Hello Rustem,

    You would modify the application layer such as t4t_app.c in nfc_gui_statemachines. This is where API's like the following are used:

    ISO_7816_4_sendSelectApplication
    ISO_7816_4_sendSelectFile
    ISO_7816_4_sendReadFile
    ISO_7816_4_sendWriteFile

    You would use ISO_7816_4_sendAPDU for any APDU's not already accounted for by commands included in the provided NFC stack.