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

sending back to back ble_nus_data_send results in low throughput

Hello, I am using SDK15.2 on nrf52 DK with SD 6.1.0 and having an issue while sending back to back data using NUS service. I have edited the ble_app_uart application and trying to send back to back data using ble_nus_data_send routine of 180 byte each packet. The problem is that just a total data of 1000bytes is received in around 2 seconds on my android device, which is too low. and my target is to send atleast 4000Bytes in a send. Is it possible using NUS service?

Here are the interval setting I have used:

#define MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS) /**< Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(75, UNIT_1_25_MS) /**< Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */
#define SLAVE_LATENCY 0 /**< Slave latency. */

and this debug log might help to find the problem:

0> <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
0> <info> app: Connected
0> <debug> nrf_ble_gatt: ATT MTU updated to 247 bytes on connection 0x0 (response).
0> <info> app: Data len is set to 0xF4(244)
0> <debug> app: ATT MTU exchange completed. central 0xF7 peripheral 0xF7
0> <debug> nrf_ble_gatt: Data length updated to 251 on connection 0x0.
0> <debug> nrf_ble_gatt: max_rx_octets: 27
0> <debug> nrf_ble_gatt: max_tx_octets: 251
0> <debug> nrf_ble_gatt: max_rx_time: 328
0> <debug> nrf_ble_gatt: max_tx_time: 2120
0> <debug> app: ATT MTU exchange completed. central 0xF7 peripheral 0xF7

Related