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

BLE connection parameter update fails on certains devices

Hello,

We are working on the NRF52840 with the SDK15.3 and the softdevice 6.1.1, we are trying to connect to different mobile centrals via ble. We are facing problems on both iOS and Android. 

For iOS, we use directly the apple stack to establish a connection and on iphone 7 (os 12.3), we manage to connect easily. But on iphone XS (os 13.5), the delegate func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) is never called. On the device side the following ble event are detected : BLE_GAP_EVT_CONNECTED and BLE_CONN_CFG_GATTC.

We also tried to use the nrf connect app with the iphone XS and it doesn't manage to connect at the first try, but the second time it succeeds.

For Android, we use the nordic stack to establish a connection ('no.nordicsemi.android:ble:2.1.1). We can always connect without problem, but on some phones such as the google pixel 3, calling "requestConnectionPriority(ConnectionPriorityRequest.CONNECTION_PRIORITY_HIGH)" never succeeds nor fails. On the device side the same ble event are detected : : BLE_GAP_EVT_CONNECTED and BLE_CONN_CFG_GATTC.

We suppose that the problem is linked to BLE_CONN_CFG_GATTC as the device does not take action when receving this event. 

We previously worked on the sdk11 and followed this migration guide.

Is there a migration guide more recent or do you have any leads to solve this problem?

Thanks

Parents
  • Hi Aure, 
    I assume you received event 0x21 meaning BLE_GAP_EVT_PHY_UPDATE_REQUEST not the BLE_CONN_CFG_GATTC. BLE_CONN_CFG_GATTC is not an event. BLE_GAP_EVT_PHY_UPDATE_REQUEST  is the event you receive when the phone wants to change the PHY to 2Mbps. 

    In your main.c you should have this event handled, usually as follow: 

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

    Have you tried to test using our examples in the SDK ? for example ble_app_hrs to check if you can establish connection with the iOS and Android phones?

Reply
  • Hi Aure, 
    I assume you received event 0x21 meaning BLE_GAP_EVT_PHY_UPDATE_REQUEST not the BLE_CONN_CFG_GATTC. BLE_CONN_CFG_GATTC is not an event. BLE_GAP_EVT_PHY_UPDATE_REQUEST  is the event you receive when the phone wants to change the PHY to 2Mbps. 

    In your main.c you should have this event handled, usually as follow: 

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

    Have you tried to test using our examples in the SDK ? for example ble_app_hrs to check if you can establish connection with the iOS and Android phones?

Children
Related