Concurrent Dual Role BLE Connection Scheduling

My system runs 2 concurrent connections, one as a central and one as a peripheral.  I am trying to get better throughput.

Initially, I had a problem where the central role would not resume when it had the opportunity to:

From the figure we can see that while CI "A" was block because we were active with the other connection (where we are peripheral).  However, there was plenty of time to handle the CI "B" (where we are central).

I found that `CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT` defaults to 7.5 ms, meaning that regardless of the amount of data sent the peripheral connection will always allocate itself 7.5 ms of time - thus blocking CI "B".

When I reduce `CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT` to the minimum (2.5 ms).  I get CI "B" back.  However, the problem then becomes that the peripheral connection will be limited to only 2.5 ms of time, regardless of how much data it can send.

Reading through the scheduling documentation (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrfxlib/softdevice_controller/doc/scheduling.html):

"The time is extended one packet pair at a time until the maximum extend time is reached." seems to indicate that the time allocated to a CI should be dynamic.  However, it seems that it is solely dictated by `CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT` in the case of a peripheral connection.

Is there any way to actually have the scheduling be dynamic, so there is not a fixed hit to the other connection (regardless of lack of data) but also still allows more data to be sent when there is more data available?

v2.2.0, nRF5340

Parents
  • Hi Dylan, 
    Please correct me if I'm wrong. My understanding is that you want dynamic scheduling, meaning that the even length can be extended based on the amount of data that the peer or the device need to send in a certain connection event. And this can exceed the max event length configuration. 


    From my undestanding that is already supported in our scheduler when connection event length extension is enable. Please have a look here
    By default this feature should already be enable, see here.
    Could you double if in your case the connection event length extension is enabled or not ? 

  • Yes, I am looking to have the connection event extended.  The connection event length extension is enabled (default).  And we can see it extending, but it looks like it will not extend if there is an event scheduled on the other connection. "A connection event cannot be extended if it will collide with another timing-event, regardless of the priorities of the timing-events".

    Is there anyway to prioritize the connection event extension over servicing the other connection?

  • Hi Dylan, 

    Thanks for the explanation. The challenge with the scheduler on resource constrained embedded device is that we need to balance between performance, robustness and simplicity. As far as I know the scheduling priority is hardcoded as you can find in the priority table in the documentation. So no option to specify a connection should have a higher priority than the other. 
    A connection may have higher priority than other but it's only applied when the connection is going to be terminated due to timeout. 

Reply
  • Hi Dylan, 

    Thanks for the explanation. The challenge with the scheduler on resource constrained embedded device is that we need to balance between performance, robustness and simplicity. As far as I know the scheduling priority is hardcoded as you can find in the priority table in the documentation. So no option to specify a connection should have a higher priority than the other. 
    A connection may have higher priority than other but it's only applied when the connection is going to be terminated due to timeout. 

Children
No Data
Related