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

BLE data length extention Thingy 52

Hi everyone. 

I want to stream 12kB of ADC data from the thingy 52 via BLE. At the moment this takes around 4 seconds to do which is to slow so i would like to increase throughput by utilising DLE but unsure how to implement it. 

Is it enough to increase the MTU size and send bigger packages to  sd_ble_gatts_hvx() function as the BLE_GAP_DATA_LENGTH_AUTO is on auto? Or what would be the steps needed to implement this supposing that both devices support DLE?

Thankful for help

//Rilleaa 

Parents
  • First of all the connection interval should be as short as possible.

    Then you should call sd_ble_gatts_hvx() as fast as possible until NRF_ERROR_RESOURCES. Then you need to wait for BLE_GATTS_EVT_HVN_TX_COMPLETE before you can repeat calling sd_ble_gatts_hvx() as fast as possible.

    If you include gatt_init() in your application, then the callback provided in gatt_init() should provide you with the max length that is supported in the callback handler after the supported MTU exchange have completed. After that you can call sd_ble_gatts_hvx() with a length that equal the max supported length in the callback handler.

Reply
  • First of all the connection interval should be as short as possible.

    Then you should call sd_ble_gatts_hvx() as fast as possible until NRF_ERROR_RESOURCES. Then you need to wait for BLE_GATTS_EVT_HVN_TX_COMPLETE before you can repeat calling sd_ble_gatts_hvx() as fast as possible.

    If you include gatt_init() in your application, then the callback provided in gatt_init() should provide you with the max length that is supported in the callback handler after the supported MTU exchange have completed. After that you can call sd_ble_gatts_hvx() with a length that equal the max supported length in the callback handler.

Children
Related