NFC does not work with iphone 13 and above

Hello,

I am currently working on a program utilizing the nRF52840 with NFC capabilities. I have successfully compiled and tested the application on Android, but unfortunately, it does not seem to be functioning on iPhone.

After some research, I suspect that this issue may be related to the SDK version. Specifically, I am using SDK 17.0.2 for this project.

I would greatly appreciate your assistance in resolving this matter. If anyone has encountered a similar problem or has insights into compatibility issues with iPhone, your guidance would be invaluable.

Thank you in advance for your help.

Best regards,

  • Hi.

    Did some tests on an iPhone 13 and nRF5 SDK v.17.1.0 (and 17.0.2). I am not able to reproduce the issue you describe.

    As of now I'm not sure what the root cause of this could be. But I highy recommend you to consider NCS and test the NFC features there.
    If the issue persists there, I'll be happy to help you debug the issue further.

    Br,
    Joakim

  • I've encountered a problem where my iPhone fails to initiate the reading of an NDEF message it prepares, despite an external app successfully reading the NFC.

    I've confirmed that the NDEF message is correctly formatted, leading me to suspect that the issue might be tied to the behavior of the iPhone. Here's the relevant portion of my code. The format mirrors that of this link: https://devzone.nordicsemi.com/f/nordic-q-a/104593/what-is-the-maximum-url-length-that-can-be-transmitted-via-nfc-using-the-nrf52840

    Within the provided code, I've implemented a machine state to control various aspects of the device. Could this non-functional characteristic be linked to timing considerations?

    typedef enum
    {
        NFC_STATE_WAIT       = 0, 
        NFC_STATE_CREATE_URI    , 
        NFC_STATE_DEPLOY_PYLD   ,
    
        NFC_STATE_NUM_STATES    ,
    } NFC_STATE;
    
    typedef struct
    {
      //HANDLER del enigne
      HANDLER hNFC_SE;
    
    #ifdef TESTBOARD
      HANDLER hLED1;
      HANDLER hLED2;
    #endif
    
        //NDEF BUFFER
        uint8_t m_ndef_msg_buf[988];
    } NFCDESC,*PNFCDESC;
    
    #define NFCDESCSIZE sizeof(NFCDESC)
    NFCDESC nfcdesc = {0};
    
    
    char m_url[978] = "null";
    
    
    uint8_t NFC_STATE_CREATE_URI_CB(HANDLER hSE,void *pParam,uint8_t uParam)
    {
        SEGGER_RTT_printf(0, "NFC_STATE_CREATE_URI\n");
    
        uint32_t errCode;
        uint32_t len = sizeof(nfcdesc.m_ndef_msg_buf);
    
        /* Encode URI message into buffer */
        errCode = nfc_uri_msg_encode(NFC_URI_HTTPS,
                                    m_url,
                                    sizeof(m_url) ,
                                    nfcdesc.m_ndef_msg_buf,
                                    &len);
    
    
        SEGGER_RTT_printf(0, "Error: %s\n",NRFX_LOG_ERROR_STRING_GET(errCode));
        APP_ERROR_CHECK(errCode);
    
        /* Set created message as the NFC payload */
        errCode = nfc_t2t_payload_set(nfcdesc.m_ndef_msg_buf, len);
        SEGGER_RTT_printf(0, "Error: %s\n",NRFX_LOG_ERROR_STRING_GET(errCode));
        APP_ERROR_CHECK(errCode);
    
        return NFC_STATE_DEPLOY_PYLD;
    }
    
    uint8_t NFC_STATE_DEPLOY_PYLD_CB(HANDLER hSE,void *pParam,uint8_t uParam)
    {
        SEGGER_RTT_printf(0, "NFC_STATE_DEPLOY_PYLD\n");
        uint32_t errCode;
    
        errCode = nfc_t2t_emulation_start();
        APP_ERROR_CHECK(errCode);
    
        return NFC_STATE_WAIT;
    }
    
    //*INTERRUPCIOS, CALLBACKS
    
    static void nfc_callback(void * p_context, nfc_t2t_event_t event, const uint8_t * p_data, size_t data_length)
    {
        (void)p_context;
    
        switch (event)
        {
            case NFC_T2T_EVENT_FIELD_ON:
                WRGPIO_OUT_value(nfcdesc.hLED2,false);
                break;
    
            case NFC_T2T_EVENT_FIELD_OFF:
                WRGPIO_OUT_value(nfcdesc.hLED2,true );
                break;
    
            default:
                break;
        }
    }

  • Hi.

    Just wanted to let you know that I'm looking into this. Waiting for some assistance from our developers with more insight to NFC.

    Br,
    Joakim

  • Are you working with a custom board or an nRF52840-DK?

    Br,
    Joakim

  • I have a following observation regarding NFC and iPhones:

    PCA10040, with nrf52832, running some modified NFC sample.

    Works great with Android AND iphone Xr running iOS 16.5.1

    Does not work at all with iphone 13 running iOS 17.1.1

    Using NFC Tools I'm also not able to get it working. Will try to test different antennas.

Related