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

How to configure nRF82540 for using multiple BLE packages in one connection interval?

Hi,

I try to achieve high throughput via BLE connection between two nRF82540dk boards. I would like to maximize duty cycle of transmission in the connection interval.
Unfortunately I observe only one or two BLE packets in each interval.
How can I configure SoftDevice to transmit more packets in one interval?

I use slighly modified ble_app_uart_c_pca10056_s140 and ble_app_uart_pca10056_s140 as starting point examples for the serial connection.
A stream of 244 bytes packets is sent from peripheral to the central device. 

Other options:
1) BLE PHY 2Mbps,
2) Connection interval = 7.5ms
3) NRF_SDH_BLE_GAP_EVENT_LENGTH = 6

Kind regards,

Piotr Romaniuk

  • Hello,

    I try to achieve high throughput via BLE connection between two nRF82540dk boards.

    Have you seen the throughput test results in the SoftDevice documentation? It details which parameters was used during the tests, to reach the different throughput speeds.

    I would like to maximize duty cycle of transmission in the connection interval.
    3) NRF_SDH_BLE_GAP_EVENT_LENGTH = 6

    Please change your event length to allow for more notifications being sent every connection event.
    Since you are only holding a single connection, you can use the entire 'duty-cycle' of the connection interval for this connection.
    You thus may set your event length to 500 (or any other high number), to allow for the event to span the entire interval, if needed.
    Could you also confirm for me that connection event length extension is configured in your project?
    It is default in all newer SDK versions, but I do not know which version you are working with. You might find this answer by my colleague helpful, for an explanation of the parameter.
    You may also find the online power-profiler useful to have a look at, to visualize how the different connection settings will affect your radio usage.

    Please try this, and let me know if you achieve the sought-after radio usage.

    Best regards,
    Karl

  • Hi Karl,

    Yes, I saw the documentation, it reports 1.4Mbps, I have only 250kbps. 

    Please change your event length to allow for more notifications being sent every connection event.
    Since you are only holding a single connection, you can use the entire 'duty-cycle' of the connection interval for this connection

    In my configuration Connection Interval is set 7.5ms, and NRF_SDH_BLE_GAP_EVENT_LENGTH = 6 (i.e. 6x1.25ms = 7.5ms) hence I assigned whole interval for communication. The chip should transmit with almost 100% duty cycle, but it doesn't.

    As you saw on the oscillogram above setting of the event length is not effective. The SoftDevice transmits mostly one packet in the cycle.

    What I am doing wrong?

    Kind regards,
    Piotr Romaniuk

    PS
    I am using SDK 17.0.2 (nRF5_SDK_17.0.2_d674dde)

  • Hello Piotr,

    Piotr Romaniuk said:
    Yes, I saw the documentation, it reports 1.4Mbps, I have only 250kbps. 

    That sounds very strange.
    Could you share with me your entire sdk_config.h file, and the BLE configuration you are doing in your application, for me to have a look through?

    Are you familiar with the nRF Sniffer? It is a powerful tool to wield when developing with BLE.
    It would be great to see a sniffer trace of the on-air BLE communication happening.

    Best regards,
    Karl

  • Hi Karl,

    below you may find my sdk_config.h file.

    2577.sdk_config.h

    Are you familiar with the nRF Sniffer? It is a powerful tool to wield when developing with BLE.

    No, I did not use it. For now I have only two DK boards, that are involved into communication.

    I also tried to increase connection interval (it works) but I cannot increase event length over 6. If I did that the program reports a memory problem.

    Kind regards,
    Piotr Romaniuk

    PS
    My goal is high troughput in short time (I need to send 8KB block of data). 

  • Hello again Piotr,

    Piotr Romaniuk said:
    below you may find my sdk_config.h file.

    Thank for you sharing. Could you also provide the snippet of code containing all your BLE configurations, from your main.c file?

    Piotr Romaniuk said:
    No, I did not use it. For now I have only two DK boards, that are involved into communication.

    I see. It would help a lot to see a trace of this communication, to verify what is actually happening on air. I will leave this as a recommendation for future development.
    With a sniffer trace, we could also have verified that the peripheral notifies the central that there is more data to be transferred in each connection event. This is hard to verify without a trace.
    If the peripheral does not set its "more data" field to true, the central will not send an empty packet to initiate the continued transfer. How have you implemented the queueing of data to be transmitted on the peripheral side?
    And, just to be clear, is this 8 kB transfer from peripheral to central, or is it central to peripheral?

    Piotr Romaniuk said:
    My goal is high troughput in short time (I need to send 8KB block of data). 

    I see. Have you tested the configuration mentioned in the BLE throughput documentation I referenced earlier? Specifically, the configurations from Table 2.
    Make sure that your event length here is configured to match the longer connection interval.
    Keep in mind that if you are in an environment with a lot of noise, you might experience a lower throughput due to the higher chance of packet corruption on longer transfers.

    Best regards,
    Karl

Related