Hi Nordic team,
I am using the nRF52840 HCI USB project as the controller firmware, with a Linux device acting as the Bluetooth host.
My application has multiple BLE connections, and each connection has a different expected data/sample rate. Therefore, my desired behavior is to give each connection an appropriate amount of radio time while keeping the connections efficient and predictable.
For example, I would like to have something conceptually similar to:
Connection A: 22.5 ms interval, 12.5 ms event length -> high sample rate
Connection B: 22.5 ms interval, 7.5 ms event length -> medium sample rate
Connection C: 22.5 ms interval, 2.5 ms event length -> low sample rate
The important requirement is that the connection interval can be the same, while the amount of radio time allocated to each connection is different according to its data-rate requirement.
With another HCI USB controller, my application achieves the expected aggregate and per-device sample rates. With the nRF52840 HCI USB firmware, however, I see scheduling-related problems:
- the aggregate/initial sample rate fluctuates instead of being stable;
- the actual sample rate of individual devices is sometimes lower than the expected rate;
- the problem becomes more apparent when multiple connections with different data-rate requirements are active.
I suspect this is related to how the SDC scheduler allocates radio time between connection events.
I understand that:
sdc_hci_cmd_le_conn_update()
is associated with the specific connection handle, so the standard connection parameters can be changed independently for each connection using LE Connection Update (0x2013).
However, I am not sure how:
sdc_hci_cmd_vs_event_length_set()
works in this respect — specifically, whether the event length is also associated with an individual connection handle or whether this is a global SDC/controller setting.
I am also using:
CONFIG_BT_CTLR_SDC_CONN_EVENT_EXTEND_DEFAULT=y
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT_OVERRIDE=y
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=7500
Main question
What is the recommended way to achieve a different connection event length for each connection, and how does the SDC scheduler behave when multiple connections have the same connection interval but different event lengths?
I would particularly appreciate an explanation of the SDC scheduling behavior in this scenario and the recommended Nordic configuration/API for achieving per-connection event lengths.