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

SDK 14.0 BLE Connection slower than SDK 11.0

I recently upgraded from SDK 11.0 to SDK 14.0 and am seeing much slower connection speeds from the new SDK. The old version would connect in about 400ms, but the new SDK takes over 1000ms for the connection to complete. I think I'm probably missing some configuration changes in the SDK, but I have been unable to identify any discrepancies between my old project and the new one.

Parents Reply
  • Hi Nate, 

    Thanks for the trace, this one is much better. 

    From the trace it looks like its the switch from 1Mbit to 2Mbit PHY that is the main contributor to the service discovery taking longer time than SDK 11 where 2Mbit was not supported. This PHY change postpones the service discovery, which is not started until after the LL_Channel_Map_Request

    You can try to force the nRF52 to stay in 1Mbit mode by modifying the BLE_GAP_EVT_PHY_UPDATE_REQUEST case in ble_evt_handler() in main.c to the following

    case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
    {
        NRF_LOG_DEBUG("PHY update request.");
        ble_gap_phys_t const phys =
        {
            .rx_phys = BLE_GAP_PHY_1MBPS,
            .tx_phys = BLE_GAP_PHY_1MBPS,
        };
        err_code = sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys);
        APP_ERROR_CHECK(err_code);
    } break;

    It would also be useful if you could capture a trace of the SDK v11.0.0 application connecting to the same central used to connect to the SDK 14.0.0 application

Children
Related