Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to get use ble_app_mtu_througput in your code

HI,

I am seeking help in getting the only peripheral code from the ble_app_mtu_throughput. Actually, I want to use the only peripheral code in my and want to use the maximum capability (1200+kbps) speed using this example. or if there any other example that I can set up for my own use case. I am using Nordic SDK 15. Can I use the ble image transfer demo somehow?

Thank you

Parents Reply Children
  • Correct. The relevant changes in sdk_config.h is NRF_SDH_BLE_GAP_DATA_LENGTH, NRF_SDH_BLE_GAP_EVENT_LENGTH and NRF_SDH_BLE_GATT_MAX_MTU_SIZE.

    To change to 2 Mbps PHY, just call this on the connected event(BLE_GAP_EVT_CONNECTED):

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

Related