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

Questions related to data throughput

I am having a bit of trouble getting high enough data throughput for my application so I have a few questions regarding it.

Can running the spi/other peripherals affect what data rate you are able to achieve? I am making about 8 spi reads every 1 ms. 

I am currently running at a connection interval of 7.5 ms, 247 byte MTU, LL packet length of 251. Other than setting these in the sdk_config file is there anything else I need to do to enable “data length extension”? 

I have confirmed these are the settings that are negotiated however the data rate I am getting is a lot smaller than it seems I should be getting. Assuming that only one packet is sent per connection interval I should be getting around 260 kbits/s. However, I am maxing out around 176 kbits. Should I be getting a higher rate than this? I am also frequently getting NRF_ERROR_RESOURCES from sd_ble_gatts_hvx calls. Would increasing the HVX queue size help resolve this at all or do I need to get higher data throughput?

Also, I have some questions regarding the data throughput from the infocenter softdevice section. Are similar data rates only guaranteed if you are using an nrf5 product for both central and peripheral roles? It seems that to get the larger data rates it is relying on the connection event length extension setting that allows for the larger connection intervals the capability to send multiple packets per connection interval. Any way to check what the connection event length is and check how many packets are sent per connection interval or do I need a sniffer to check that?

I am currently running on nrf52840 if that is relevant 

  • I am currently running at a connection interval of 7.5 ms, 247 byte MTU, LL packet length of 251.
    I have confirmed these are the settings that are negotiated

    What's the Event Lengths?
    And how did you verify the connection parameters?  

    Assuming that only one packet is sent per connection interval I should be getting around 260 kbits/s. However, I am maxing out around 176 kbits. Should I be getting a higher rate than this?

    What device are acting as the peer device?
    What BLE capabilities does it have? 

    It seems that to get the larger data rates it is relying on the connection event length extension setting that allows for the larger connection intervals the capability to send multiple packets per connection interval. Any way to check what the connection event length is and check how many packets are sent per connection interval or do I need a sniffer to check that?

    The BLE_GAP_EVT_DATA_LENGTH_UPDATE event will provide the negotiated data lengths and event lengths.  

    I am also frequently getting NRF_ERROR_RESOURCES from sd_ble_gatts_hvx calls. Would increasing the HVX queue size help resolve this at all or do I need to get higher data throughput?

    See how it's done in the BLE NUS examples, they get maximum throughput when nordic devices are used in both ends of the link.

Related