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

NUS increase throughput and data loss

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?

Parents Reply Children
  • Thanks Jorgen. We have done extensive experiments on PHY, connection interval, MTU size, DLE and extensions on reliable transmission. There are multiple peripherals so our case is more complicated than just 1 to 1 connection. One parameter adjustment may improve on 1 to 1 throughput but affect the overall performance negatively.
    As always, your recommendation is very helpful. We will investigate on how to improve based on your suggestions. Lots of tests down the road again.

Related