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

Disable coded and 2 MBps PHY support on NRF52832

Hi,

I'm using a NRF52832 development kit and SDK v14.1. My application is simulating several bluetooth devices for testing purposes. The device I'm simulating doesn't support alternate PHYs because its using BT 4.x so, when I call sd_ble_gap_phy_update i get BLE_HCI_UNSUPPORTED_REMOTE_FEATURE in the phy update event.

How can i get my simulated devices to behave in the same way?  If I simply ignore the phy update request event, the connection is lost with the error BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT

In my real application I connect to quite a few devices so managing radio time is quite important. I don't want my tester to use a higher data rate

Parents
  • How and where are you calling sd_ble_gap_phy_update() in your code?

    As you've pointed out, you cannot ignore as the SoftDevice will ACK this on the Link layer. So if you want the nRF52832 to behave as a BT 4.x device, then you'll have to add the following snippet to ble_evt_handler() in main.c

    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;
    


    The nRF52832 will then respond that it only supports the 1M PHY layer.

    Best regards

    Bjørn 

Reply
  • How and where are you calling sd_ble_gap_phy_update() in your code?

    As you've pointed out, you cannot ignore as the SoftDevice will ACK this on the Link layer. So if you want the nRF52832 to behave as a BT 4.x device, then you'll have to add the following snippet to ble_evt_handler() in main.c

    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;
    


    The nRF52832 will then respond that it only supports the 1M PHY layer.

    Best regards

    Bjørn 

Children
Related