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

better BLE data rate between two NRF52840

Hi,

I am developing a project where I have NRF52840 as a device and another NRF52840 as a BLE USB dongle connected to PC.

I have to improve the BLE data rate between the dongle and the device.

Using for the Device usbd_ble_uart example and added to it the NUS service from the ble_app_uart example

Using for the Dongle the ble_app_multilink_central example because one dongle should be allowed to connect to more than one device, added to the example the ub perepheral from the usbd_ble_uart and the central NUS from the ble_app_uart_c example.

The PC an the Device communicate throw the Dongle, and experience a big delay ( in milliseconds) between sending the command from the PC until the reply from the Device received back.

at the BLE_GAP_EVT_CONNECTED event I check the min_conn_interval and the max_conn_interval like this : 

        case BLE_GAP_EVT_CONNECTED:
	  BLE_Connected = true;

            m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
            err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle);
            APP_ERROR_CHECK(err_code);

	    min = p_ble_evt->evt.gap_evt.params.connected.conn_params.min_conn_interval;
	    max = p_ble_evt->evt.gap_evt.params.connected.conn_params.max_conn_interval;

both the minimum connection interval and the maximum connection interval are 24 .

I set the minimum and the maximum connection interval from the Device to 7.5 ms, after the connection the device got a BLE_GAP_EVT_CONN_PARAM_UPDATE event where the minimum and the maximum connection intervals is set to 6 ms.

1. Am I doing it right ? this will improve the BLE data rate yes ? if No what is the optimal connection interval for a better data rate!?

2. Is there anything else can be done to improve the BLE data rate ?

3. Is setting  the connection intervals to 6 ms as I mentioned above is gonna work for both of the connected devices to the dongle? how it will affect the data rate when two device is connected ?

  • Hello again JK, 

    jawadk said:
    In case that the application queued a 25 bytes to send (one packet), and the softdevice send them in the first connection event, after the sending is finished, you said that in this case the first event ends, so what the application queue for sending for now on till the second connection event will be sent during the second connection event yes ?

    This is correct, once a connection event has ended you must wait until the next connection event occurs to transfer any data.

    jawadk said:
    the first connection event ends and not returns in this case, is that what you meant ? so in this case my  latency will still be <= 10 ms, is that right ?

    I am not sure what you mean when you say "and not returns in this case", but if you mean to ask if your worst case latency for the data transfer is <= 10 ms with a connection interval of 10 ms, then: Yes, in this case, your latency will indeed be <= 10 ms.

    Best regards,
    Karl 

Related