We have been using ble nus service which is working very well.
There are more than 100,000 bytes of data to be transferred each time.
We were using BLE_NUS_EVT_TX_RDY event for flow control, which is working.
Now we want to improve the data throughput and doing experiments. We found that if we use the following code, then about 20% data are lost.
do{
err_code=ble_nus_data_send(&m_nus,data_buf,&data_length,m_conn_handle);
} while(err_code==NRF_ERROR_BUSY);
What is the best way to maximize the nus throughput without losing data?