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

How to increase Data Rate

Hi

We use ble_app_uart_pca10040 app. We have our own board has microcontroller and send data over uart to ble module (bmd350) There is Nrf52832. I want to send 32byte pack and 500pack in sec. Im very far to achive that.

Ferhat

Parents
  • Hi,

    Is it the BLE data rate you want to increase? What are you connecting against? A smartphone?

    You can lower the connection interval by changing the MIN_CONN_INTERVAL and MAX_CONN_INTERVAL values. Try setting it to e.g :

    #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(7.5, UNIT_1_25_MS) 
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS) 
    

    There are also several other things you can do to increase the data rate. Such as increasing the ATT MTU size, enable Data length extension (DLE) and enable Connection event length extension.

  • First of all I couldnt find where to make DLE on.

    Im sending 126 bytes in one pack now. It not working over 158. I tried 147 bytes working fine.

    For now with 126bytes in one pack;
    ---> #define NRF_BLE_GATT_MAX_MTU_SIZE 158
    ---> 1nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 150);
    ---> #define BLE_GATT_ATT_MTU_DEFAULT 23


    I tried several values for INTERVALS for definitions below, For example i tested 7.5 as min and 20 as max. I didnnt get a positive effect.

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(75, UNIT_1_25_MS)


    My problem is;

    1. Im sampling 16byte data at 500Hz. (I have some additional data but these important)
    2. 500Hz makes 2ms interval for sampling. (1/500)
    3. Below 158 ATT MTU size, i can make 8 pack x 16 bytes = 128bytes
    4. So sending interval became 8x2ms = 16ms
    5. If i can send every 128bytes evey 16ms, all became perfect.
    6. Im using iPad Air2 now but later i will use different options.
Reply
  • First of all I couldnt find where to make DLE on.

    Im sending 126 bytes in one pack now. It not working over 158. I tried 147 bytes working fine.

    For now with 126bytes in one pack;
    ---> #define NRF_BLE_GATT_MAX_MTU_SIZE 158
    ---> 1nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 150);
    ---> #define BLE_GATT_ATT_MTU_DEFAULT 23


    I tried several values for INTERVALS for definitions below, For example i tested 7.5 as min and 20 as max. I didnnt get a positive effect.

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(75, UNIT_1_25_MS)


    My problem is;

    1. Im sampling 16byte data at 500Hz. (I have some additional data but these important)
    2. 500Hz makes 2ms interval for sampling. (1/500)
    3. Below 158 ATT MTU size, i can make 8 pack x 16 bytes = 128bytes
    4. So sending interval became 8x2ms = 16ms
    5. If i can send every 128bytes evey 16ms, all became perfect.
    6. Im using iPad Air2 now but later i will use different options.
Children
No Data
Related