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,

Parents
  • Hi. 

    I am currently working on a program utilizing the nRF52840 with NFC capabilities.

    Which NFC capabilities are you referring to here?

    It might be due to the strict security on NFC on iOS devices, but I'm not 100% sure. 

    You mention iPhone 13 and above. Have you tested using iPhone 12 and below? Is this only related to phone model, not iOS version?

    Br, 
    Joakim

  • Hello Joakim,

    Thank you for your prompt response. I'm utilizing the nRF52840 example program 'record_URL' from SDK 17.0.2.

    I've tested the application on iOS versions 16 and 17 across various iPhone models, including iPhone 13, 13 Pro, 14 Pro, and 15 Pro Max.

    Interestingly, a year ago, I employed the same example to develop a similar application and did not encounter this type of problem. Additionally, there are instances where my iPhone recognizes the URL, but more often than not, it does not. However, the magnetic field is being detected, as I've programmed an LED to indicate whether the field is ON or OFF.

    Any insights or suggestions on resolving this inconsistency would be greatly appreciated.

    Best regards,

  • Thanks. 

    I don't have an iPhone 13 or later to test this at the moment. But I will try to get my hands on one so that I can perform some tests myself. 
    However, I tried reproducing with an iPhone 12 Pro (iOS 16), and there are no problems with the NFC sample there.

    I saw from various forums that there are several reports of NFC problems in iOS15 and later, but I don't know if that is fixed or if it's related to your problems. 
    Some users reported that the problems were fixed after a network setting reset. Other users reported that the problems were fixed after turning Airdrop off. 

    I will investigate further and get back to you with more information. 

    Br, 
    Joakim

  • Thank you very much for your effor. At the end, I have solved the problem by using an older version of the SDK. I am using the 15.3.0 version right now.

    However, I will try what you have just said with the newest SDK version.

    Cheers,

  • Thanks.

    I would not recommend downgrading to an older version of the nRF5 SDK.

    The nRF5 SDK is in maintenance mode (ref: this statement) and we highly recommend using NCS (nRF Connect SDK) for new designs.

    _______________

    I got an iPhone 13 and will perform some tests tomorrow. Will check how the NFC behaves in both nRF5 SDK and NCS and get back to you.

    Br,
    Joakim

  • 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

Reply Children
  • 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