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

How to achieve higher throughput in Piconet using Nordic UART Service?

I have created a Piconet using nrf52840(s140). The 'Central' application was built on ble_app_uart_c example, which is now successfully connecting up to 7 peripherals. The Peripherals are also using NUS service to send data with(ble_nus_string_send) to Central.

I am generating some random data in peripherals. Data ranges are from 12kB/s to 10B/s in different peripheral device. I want to send total 15kB/s of data from 7 peripherals to Central.

My problem is- ALL the peripherals are only successfully sending data while I am sending limited amount of data. The central can receive upto 1kB/s in total, but the connection drops while I want to introduce a peripheral with a higher data rate(more than 1kB/s).The Central cannot maintain that connection in that case any longer.

I kept all the Connection Parameters same as examples. My question is- How I can achieve higher throughput in that system? Please feel free to ask additional questions. Thanks in advance.

PS: I am not sending/receiving any data via UART.

Parents
  • Hi Petter, sorry for late reply. I have solved few problems. I could achieve maximum 92k Bytes/s with single connection. Also with multiple connection, I could achieve higher data rate. When I am sending like this:

        do{
        err_code = ble_nus_string_send(&m_nus, data_array, data_len);
        if( err_code == NRF_SUCCESS ){
            total_bytes += data_len;
        }
        else if( err_code == NRF_ERROR_RESOURCES){
            data_not_sent += data_len;
           }
         }while( err_code == NRF_ERROR_BUSY ); 
    

    Otherwise, I get the disconnect reason 'NRF_ERROR_RESOURCES' while sending data via nus.

    But in this situation, I cannot really control to achieve 'desired' data-rate. I need very fixed data/rate in sending/receiving end. But now I have to wait till the BLE_GATTS_EVT_HVN_TX_COMPLETE.

    Would you please suggest what is the reason NRF_ERROR_RESOURCES and how I can achieve fixed data throughput? Thanks!

Reply
  • Hi Petter, sorry for late reply. I have solved few problems. I could achieve maximum 92k Bytes/s with single connection. Also with multiple connection, I could achieve higher data rate. When I am sending like this:

        do{
        err_code = ble_nus_string_send(&m_nus, data_array, data_len);
        if( err_code == NRF_SUCCESS ){
            total_bytes += data_len;
        }
        else if( err_code == NRF_ERROR_RESOURCES){
            data_not_sent += data_len;
           }
         }while( err_code == NRF_ERROR_BUSY ); 
    

    Otherwise, I get the disconnect reason 'NRF_ERROR_RESOURCES' while sending data via nus.

    But in this situation, I cannot really control to achieve 'desired' data-rate. I need very fixed data/rate in sending/receiving end. But now I have to wait till the BLE_GATTS_EVT_HVN_TX_COMPLETE.

    Would you please suggest what is the reason NRF_ERROR_RESOURCES and how I can achieve fixed data throughput? Thanks!

Children
No Data
Related