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
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
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.
Actually the ble_app_uart in SDK 13 will by default try to enable DLE, and set it to NRF_BLE_GATT_MAX_MTU_SIZE + LL_HEADER_LEN
. But you need to check the log to see if it was successfully increased (i.e. if the iPad accepted the increase or not.). As mentioned earlier, if you set the NRF_LOG_DEFAULT_LEVEL to DEBUG (#define NRF_LOG_DEFAULT_LEVEL 4 in sdk_config.h), you should be able to see the parameters that is negotiated between the central and peripheral.
If DLE is not support on the iPad, you will see the following values in the log:
nrf_ble_gatt:DEBUG:max_rx_octets: 27
nrf_ble_gatt:DEBUG:max_tx_octets: 27
Unfortunately, I believe that many iOS devices does not support DLE, so this will limit your data-rate / throughput you can achieve. But you will have to check what values the max_rx_octets/max_tx_octets
is set to.
Actually the ble_app_uart in SDK 13 will by default try to enable DLE, and set it to NRF_BLE_GATT_MAX_MTU_SIZE + LL_HEADER_LEN
. But you need to check the log to see if it was successfully increased (i.e. if the iPad accepted the increase or not.). As mentioned earlier, if you set the NRF_LOG_DEFAULT_LEVEL to DEBUG (#define NRF_LOG_DEFAULT_LEVEL 4 in sdk_config.h), you should be able to see the parameters that is negotiated between the central and peripheral.
If DLE is not support on the iPad, you will see the following values in the log:
nrf_ble_gatt:DEBUG:max_rx_octets: 27
nrf_ble_gatt:DEBUG:max_tx_octets: 27
Unfortunately, I believe that many iOS devices does not support DLE, so this will limit your data-rate / throughput you can achieve. But you will have to check what values the max_rx_octets/max_tx_octets
is set to.