This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bluetooth pairing problem with iOS

Hi,

I am developing a product, based on nrf52840 soc with SDK v15.3 and softdevice V14. I have a pairing problem with the recently released iOS, version14. while my product works well with older iOS versions and all android devices.

The problem is in this manner that, my device sends a pairing request to the iOS14 but iOS doesn't respond to the request and the request encounter with a timeout. the same problem occurs when I try to pair with iOS14 with the nrfConnect desktop version (which uses PCA10056 as a BLE adaptor).

But I could pair iOS14 with the nrfConnect android version and windows BLE interface.

i have attached the sniffer log for 

1) My product fails to pair with iOS14. ->  3187.ios_pair_failure.pcapng

2) Windows pairs successfully with iOS14. ->8372.ios_pair_success_windows.pcapng

Could anyone help me to solve the problem?

thanks

  • Thanks for your attention,

    I've tested that (waiting for BLE_GAP_EVT_CONNECTED to initiate the pairing process), but it didn't change anything and the problem is still remaining.

    Bests

  • I meant "waiting for insufficient authentication error message to initiate the pairing process"

  • Hi

    Okay, it was worth a try as this is how the Accessory Design Guidelines for Apple Devices describes the pairing process. 

    You're correct that the key distribution is different in the two pairing requests, so you can try changing these to match the successful request in the Windows pairing, but I don't know if this is a new necessity for iOS14, as I'm not an expert on Apple products.

    You can try adding the following lines to your peer_manager_init function that should enable key distribution for link and signature keys.

        sec_param.kdist_own.sign  = 1;
        sec_param.kdist_own.link   = 1;
        sec_param.kdist_peer.sign = 1;
        sec_param.kdist_peer.link  = 1;

    Best regards,

    Simon

  • Thanks.

    I have applied these options in the peer_manager_init function, but after adding these options pm_sec_params_set function fails with NRF_ERROR_INVALID_PARAM return code.

    sec_params_verify function in  security_manager.c file, executes below code:

    // Signing is not supported.
    if (p_sec_params->kdist_own.sign || p_sec_params->kdist_peer.sign)
    {
        return false;
    }
    
    // link bit must be 0.
    if (p_sec_params->kdist_own.link || p_sec_params->kdist_peer.link)
    {
        return false;
    }

    it seems that those options aren't supported by nordic.

    I have added another trace, which android pairs with iOS14 successfully, which also uses the same key distribution option as windows -> ios_pair_success_android.pcapng (packet 4289)

    I have a question, Did you test the scenario with nrf_connect desktop version? if yes, did you experience this problem with iOS v14? 

    nrf_connect Desktop fails to pair with iOS14 -> ios_pair_fail_nrfConnectDesktop.pcapng (packet 14540) 

  • I had not tested it with an iOS v14 device, as I didn't have one easily available. I wasn't aware that we didn't support the signature or link key either. I got my hands on an iOS device however, and I can confirm that this can be recreated on our side as well. I have reported this internally and we're looking into it, but as of yet, we don't have a workaround. It does indeed seem like iOS v14 requires signature or link keys (or both) in order to successfully pair and bond with a central device, and we're looking at potential workarounds.

    I will update you as soon as I know something.

    Best regards, Simon

Related