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.

NFC p2p on Samsung Galaxy S5 Android 5.0

Other Parts Discussed in Thread: TRF7970A, MSP430F5529

The TI p2p sample code works on our device using the TRF7970A for the following mobile phones:

  • Samsung Galaxy S4
  • Samsung S4 mini, (Android 4.4.2)
  • Samsung Fame,
  • Samsung A3 (Android 4.4.4)

The Galaxy S5 only vibrates but does not show the message "touch to beam". The debug trace shows:

LLCP init
LLCP init
LLCP init
Target In : Target In :DEP RX I-PDU 2 bytes
LLCP RX 2 bytes
LLCP RX: SYMM 0 0

LLCP TX: SYMM
Target In :P2P Passive Target F Activated
DEP RX I-PDU 2 bytes
LLCP RX 2 bytes
LLCP RX: SYMM 0 0

LLCP TX: SYMM
DEP RX I-PDU 2 bytes
LLCP RX 2 bytes
LLCP RX: SYMM 0 0

.... (and so on, always only SYMM)


When using together with the working phones the log looks like that:
LLCP init
LLCP init
LLCP init
Target In :Target In : Target In :P2P Passive Target F Activated
DEP RX I-PDU 2 bytes
LLCP RX 2 bytes
LLCP RX: SYMM 0 0

LLCP TX: SYMM
DEP RX I-PDU 2 bytes
LLCP RX 2 bytes
LLCP RX: SYMM 0 0

.... (some ms later)

LLCP TX: SYMM
DEP RX I-PDU 2 bytes
LLCP RX 2 bytes
LLCP RX: CONNECT

LLCP TX: CC
DEP RX I-PDU 133 bytes
LLCP RX 133 bytes
LLCP RX: I
SNEP RX 130 bytes

Why the Galaxy S5 never sends a CONNECT or why is this connect never received on the TRF7970A?

Does someone have an idea how to investigate this?

  • Hello Christoph,

    I have tested the Galaxy S5 with our standalone Peer to Peer and Card Emulation Code (www.ti.com/lit/pdf/sloa208).

    If you have a MSP430F5529 Experimenter Board + TRF7970ATB or MSP430F5529 Launchpad + DLPTRF7970 boosterpack, you should be able to replicate the same behavior.

    Best regards,

    Erick M.

    Note: The excel files below include the log of the communication with the S5 when the TRF7970A is in:

    Initiator Mode (communication started at 212kbps and increased to 424kbps):

    Initiator_Receive.xlsm

    Target Mode (communication started and remains at 212kbps, since the phone does not send a PSL request ):

    Target_Receive.xlsm

  • Dear Erick

    Thank you for your prompt response.
    You refer sloa208 for card emulatin mode. What p2p code do you use? Also the one from sloa192 or the other one with the Stollman stack?

    I am using the one described in sloa192. The document is from april last year. I there possibliy a new version of code somewhere?

    And what App on the phone do you use? I am using the "NDEF Tools for Android".

    Best regards,
    Christoph

  • Hi Christoph,

    The sloa208 app note is for Card Emulation, but the code that is included with it is for both Card Emulation and Peer-to-Peer.

    The sloa192 app note and software was released prior to the Galaxy S5 being tested by our team. However the software in sloa208 was improved after that and therefore should work fine with Galaxy S5, and it is the newest version of the Peer-to-Peer code that is released.

    One of the apps we use most is the NFC TagReader app from KDDI.

    Hope this helps.

  • Hi Ralph


    Thank you for this information.

    Could it be, that I am using an old version of the code? Could you provide me with a link to the latest version?
    Regrettfully I have always the problem to decide if the files have the correct version because they lack version information in the header.


    In the meantime I found a solution:

    Change in nfc_p2p.c / NFC_P2P_sendNdefPacket():

    //32RemainingBytes = (uint32_t) ui8FragmentLength; // original sample code
    ui32RemainingBytes =  ui32PacketSize - ui32PacketIndex - (uint32_t) ui8FragmentLength;

    Changes in llcp.c / LLCP_processReceivedData()

    In any case other than SNEP_SERVIE:
    
    //g_eNextPduQueue = LLCP_SYMM_PDU;
    
    g_eDMReason = DM_REASON_LLCP_RECEIVED_CONNECT_PDU_NO_SERVICE;
    g_eNextPduQueue = LLCP_DM_PDU;

    Could you please check if this is the optimal solution?

    In addition to this changes I had to increase the uart debug baud rate from 38'400 to 115'200. Our system runs with 12 MHz CPU clock speed. Otherwise the system failed due to timeouts.

    Regards,
    Christoph

  • Hey Christoph,

    The latest P2P + CE code can be found in the zip file linked in the abstract of this app note:  

    The Direct link for the code is this: www.ti.com/lit/zip/sloa208

    Once you have loaded the code and connected with the GUI, it should tell you the FW Version number at the bottom.  

    Thanks,

    JD

  • Hello Christoph,
    The change you did for the LLCP layer is the fix you needed for the Samsung S5.
    I'm getting reading to release an update for all the three NFC modes which will include that modification. I'll send you an update when it's published.
    Please let me know if you have any other issues with the handsets.Best regards,
    Erick M.
  • Hello John

    Thanks for your reply. But we ported the core of that code to our uController. We did not port the communication to an external PC nor the PC application. This means there is no way for me to get the version number.

    I would expect to see a version number in each file or at least in the downloaded zip's filename.

    Regards,
    Christoph
  • Hello Erick

    Thank you very much.
    When approximately do you expect to publish them?

    Regards,
    Christoph
  • Hello Christoph,

    The code should be published end of April.

    Best regards,

    Erick M.