BLE 5 advertising does not permit iOS 17 devices to connect.

Hi,

I am using nRF52840, and have set up BLE 5 advertising. I was able to connect with the nRF Connect app to nrf52840 device using iPhone 11, 12, 13 running iOS 16.

Recently after updating to iOS 17, I can only discover the BLE device, but can't manage to connect to the device from the app. I can only connect to the device via iPhone 11, running iOS 17. However, all the other later versions of iPhone do not permit me to connect with the nrf device. As a test switching to BLE4 advertising, devices are both discoverable and connectable, on these same iPhone versions running iOS 17. I need to use BLE5 and can't switch to BLE 4 for production release.

Also, the same devices can be both discovered and connected to, using Android phones that support BLE 5.

No log data shows up on nRF Connect app, hence making it hard to debug the issue.

Has anyone else faced this issue? Any pointers/ tips are appreciated.

Parents
  • I am using extended advertising which is BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED (238 bytes) from SDK. The advertisement itself is seen and shows up with the right data on nRF connect app.

    Now, since the device is connectable, pressing connect, there is no log output on nRF connect app (it just feels like it's trying to connect forever with the rotating wheel). However, on the FW side, I receive events in the evt_handler, first connect (that is handled) and immediately afterward it receives disconnect evt (which is also handled). It tries this connect and disconnect a few times before calling quits and failing to connect. I am kinda blind from the app side if some event isn't handled.
    Nope, I haven't tried a sniffer. 
Reply
  • I am using extended advertising which is BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED (238 bytes) from SDK. The advertisement itself is seen and shows up with the right data on nRF connect app.

    Now, since the device is connectable, pressing connect, there is no log output on nRF connect app (it just feels like it's trying to connect forever with the rotating wheel). However, on the FW side, I receive events in the evt_handler, first connect (that is handled) and immediately afterward it receives disconnect evt (which is also handled). It tries this connect and disconnect a few times before calling quits and failing to connect. I am kinda blind from the app side if some event isn't handled.
    Nope, I haven't tried a sniffer. 
Children
  • I see. Can you you share logs from the nRF side and nRF Connect, as well as make a sniffer trace? You can use the nRF Sniffer for Bluetooth LE for that as long as you have an nRF DK or dongle.

  • Hi,

    Here is the capture from the sniffer, for both android (working) and iOS (not working). It seems like adv_param is NON_SCANNABLE and CONNECTABLE, but when we try to connect, it responds with NON_SCANNABLE and NON_CONNECTABLE in the extended advertising header. Not sure if it is supposed to be that way, maybe you can give more details.

    Android: 0508.android.pcapng

    iOS: ipados.pcapng

    Log from nRF52840:

    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected
    XBUS_BLE: Connected
    XBUS_BLE: Disconnected

  • Also, on nRF Connect, there is o log, just the rotating icon saying connecting, but nothing happens.

  • Hi,

    Thank you for the sniffer traces. The phone sends the connection request, and then nothing. I am checking with our mobile developers to see if they have any ideas about what could be happening on the iPhone side here.

    Can you share the code you have that configures advertising so that we can test the exact same on our end?

  • Hi, thanks for your reply, the APP_ ADV_INTERVAL is 1022.5 ms. The advertising parameters are as follows:

    void ble_advertise_init()
    {
        uint32_t ret;
    
        static ble_advdata_t advdata;
    
        ble_uuid_t adv_uuids[] = {{LBS_UUID_SERVICE, ble_xbus_service.uuid_type}};
    
        // Build and set advertising data
        memset(&advdata, 0, sizeof(advdata));
    
        advdata.name_type = BLE_ADVDATA_FULL_NAME;
        advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
        advdata.uuids_complete.uuid_cnt = sizeof(adv_uuids) / sizeof(adv_uuids[0]);
        advdata.uuids_complete.p_uuids = adv_uuids;
    
        update_adv_data();
        advdata.p_manuf_specific_data = &manuf_data;
    
        m_adv_data.adv_data.len =
            BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED;
    
        ret = ble_advdata_encode(
            &advdata,
            m_adv_data.adv_data.p_data,
            &m_adv_data.adv_data.len);
        if (ret != NRF_SUCCESS) {
            PRINTF("ERROR[%lu]: ble_advdata_encode()\n", ret);
        }
    
        ble_gap_adv_params_t adv_params;
    
        // Set advertising parameters.
        memset(&adv_params, 0, sizeof(adv_params));
    
        adv_params.primary_phy = BLE_GAP_PHY_1MBPS;
        adv_params.secondary_phy = BLE_GAP_PHY_2MBPS;
        adv_params.properties.type =
            BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED;
        adv_params.p_peer_addr = NULL;
        adv_params.filter_policy = BLE_GAP_ADV_FP_ANY;
        adv_params.interval = APP_ADV_INTERVAL;
    
        ret = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &adv_params);
        if (ret != NRF_SUCCESS) {
            PRINTF("ERROR[%lu]: sd_ble_gap_adv_set_configure()\n", ret);
        }
    
    }

Related