Set sd_ble_gap_phy_update() to 2Mbps Phy with central phone(No support Bluetooth 5)

Hello,

I add sd_ble_gap_phy_update()  in the ble_evt_handler() as below:

case BLE_GAP_EVT_CONNECTED:
{
    ......
    ble_gap_phys_t const phys =
    {
        .rx_phys = BLE_GAP_PHY_2MBPS,
        .tx_phys = BLE_GAP_PHY_2MBPS,
    };
    err_code = sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys);
    APP_ERROR_CHECK(err_code);f
}

Issue description:

When I use a central phone which support Bluetooth 5 can connect to peripheral(nRF52805) properly via nRF Connect app.

But the nRF Connect always switch to disconnect via some central phones only support Bluetooth 4.2.

The Bluetooth 4.2 device information show on nRF Connect app :

    High speed (PHY 2M) spported - YES

    Long range (PHY Coded) spported - No

The central phone will make the final Phy rate decision

But why connection cannot be established stable between central(Bluetooth 4.2) and peripheral ?

Any good method to support:

1. Force to use 2Mbps via Bluetooth 5 central phone

2. Switch to 1Mbps via Bluetooth 4.2 central phone without any disconnection issue.

thanks

Parents
  • Have you tried using AUTO instead of 2MBPS? This typically should negotiate the highest common supported data rate.

    Kenneth

  • Hi Kenneth,

    The central(Both BT 5.0 and 4.x) and peripheral can establish connection successfully by using AUTO.

    The reason I don't want to set to AUTO is:
    Sometimes, the Bluetooth 5 certral phone customized app throughput is not good(AUTO).
    I suspect the phy rate is 1Mbps in low throughput case.
    When I set 2Mbps in connected case, the throughput all good.

    1. Any API can read the current phy value in peripheral device ?
    2. Can sd_ble_gap_phy_update() be executed in any time ? (e.g. start throughput test)

  • Norman Hsu said:
    Sometimes, the Bluetooth 5 certral phone customized app throughput is not good(AUTO).

    I really don't think the RF PHY is problem in this case, unless you have very high throughput. Are you able to do an nRF sniffer log comparing normal vs. slow throughput? What is considering normal vs. slow throughput in your case?

    There should be no problem to call sd_ble_gap_phy_update() any time according to spec, I will see if I can find any way to read out current rf phy.

    Kenneth

Reply
  • Norman Hsu said:
    Sometimes, the Bluetooth 5 certral phone customized app throughput is not good(AUTO).

    I really don't think the RF PHY is problem in this case, unless you have very high throughput. Are you able to do an nRF sniffer log comparing normal vs. slow throughput? What is considering normal vs. slow throughput in your case?

    There should be no problem to call sd_ble_gap_phy_update() any time according to spec, I will see if I can find any way to read out current rf phy.

    Kenneth

Children
No Data
Related