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

nrf52832 BLE_GAP_PHY_2MBPS configuraion in ble_app_uart peripheral mode

Hi,

I want to configure "BLE_GAP_PHY_2MBPS"  in  ble_app_uart example of sdk 15.3.0 for faster communication, for this i have changed 

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);

To

BLE_GAP_EVT_PHY_UPDATE_REQUEST:
{
//NRF_LOG_DEBUG("PHY update request.");
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);

But it does not effect on the overall time taken by 180 bytes to read and write.

Is there some thing else needs to change to configure BLE_GAP_PHY_2MBPS  communication.

Parents
  • Hello,

    This event, BLE_GAP_EVT_PHY_UPDATE_REQUEST, is the event that is called whenever the other device in the connection requests an update. If you want to request this yourself, you must initiate it from somewhere else after the connection is established.

    Try to add the snippet that you have changed to the bottom of your BLE_GAP_EVT_CONNECTED event. If you want to monitor whether the PHY changes you can add the BLE_GAP_EVT_PHY_UPDATE to your ble_evt_handler(). This event will be triggered when the PHY actually changes. 

Reply
  • Hello,

    This event, BLE_GAP_EVT_PHY_UPDATE_REQUEST, is the event that is called whenever the other device in the connection requests an update. If you want to request this yourself, you must initiate it from somewhere else after the connection is established.

    Try to add the snippet that you have changed to the bottom of your BLE_GAP_EVT_CONNECTED event. If you want to monitor whether the PHY changes you can add the BLE_GAP_EVT_PHY_UPDATE to your ble_evt_handler(). This event will be triggered when the PHY actually changes. 

Children
No Data
Related