[PW_SID:1134176] Add support for Shorter Connection Interval (SCI)#2347
[PW_SID:1134176] Add support for Shorter Connection Interval (SCI)#2347BluezTestBot wants to merge 12 commits into
Conversation
Add support for discovering and reading HIDS 1.1 SCI (Subrated Connection Interval) characteristics: - HID SCI Mode (0x2c39) - HID SCI Information (0x2c3a) When the HID Information flags indicate SCI is supported (bit 2), the SCI Mode and SCI Information characteristics are read after the HID Information is obtained.
Add BTDEV_TYPE_BREDRLE62 device type with support for Shorter Connection Interval (SCI) feature from Bluetooth 6.2 spec: - LE Connection Rate Request (0x20a1) - LE Set Default Rate Parameters (0x20a2) - LE Read Minimum Supported Connection Interval (0x20a3) - LE Connection Rate Change event (0x37) - Shorter Connection Intervals feature bits
…rate Add the Shorter Connection Interval setting bit (25) to indicate controller support for SCI feature. Add the Load Connection Subrate command (0x005C) which allows loading connection subrate parameters for devices that support shorter connection intervals as defined in Bluetooth 6.2.
Add HCIEMU_TYPE_BREDRLE62 device type for testing Bluetooth 6.2 features and add test cases: - Set Low Energy on 6.2 - SCI Setting: verifies that the SCI setting bit (25) is reported in supported/current settings for a 6.2 controller. - Load Connection Subrate - Invalid Params 1: verifies invalid parameters are rejected. - Load Connection Subrate - Success 1: verifies loading valid connection subrate parameters succeeds.
Implement load_conn_subrate() to load per-device connection subrate parameters via the new MGMT_OP_LOAD_CONN_SUBRATE command. Parameters are read from the [ConnectionSubrate] section of device info files and sent to the kernel when the SCI setting is supported. The subrate parameters include connection interval range, subrate factor range, max latency, continuation number, and supervision timeout as defined in the Bluetooth 6.2 SCI feature.
Add decoding support for the new MGMT_OP_LOAD_CONN_SUBRATE (0x005C) command, the MGMT_EV_CONN_SUBRATE (0x0033) event and the Shorter Connection Interval setting bit (25) to btmon.
Document the [ConnectionSubrate] group in the device info file which stores per-device connection subrate parameters for the SCI feature.
Add conn-subrate command to load connection subrate parameters
for a device via MGMT_OP_LOAD_CONN_SUBRATE.
Usage:
conn-subrate [-t type] <address> <min_interval> <max_interval> \
<subrate_min> <subrate_max> <max_latency> \
<cont_num> <supv_timeout>
Add Load Connection Subrate test cases using the recommended connection subrate parameters from the HOGP v1.2 specification for each of the four HID modes: - Fast: interval 1.25-5 ms, latency 0, subrate 1-4, cont_num 3 - Default: interval 7.5-15 ms, latency 0, subrate 1-4, cont_num 0 - Low Power: interval 7.5-15 ms, latency 100, subrate 1-4, cont_num 0 - Full Range: interval 1.25-15 ms, latency 0, subrate 1-4, cont_num 1 Supervision timeouts are computed as (1 + Peripheral Latency) * Subrate Max * Connection Interval Max * 2 per the spec.
Add L2CAP LE client connection tests that load Connection Subrate parameters (via MGMT_OP_LOAD_CONN_SUBRATE) before establishing the connection, using the HOGP v1.2 recommended values for each of the four HID SCI modes: - Fast: interval 1.25-5 ms, latency 0, subrate 1-4, cont_num 3 - Default: interval 7.5-15 ms, latency 0, subrate 1-4, cont_num 0 - Low Power: interval 7.5-15 ms, latency 100, subrate 1-4, cont_num 0 - Full Range: interval 1.25-15 ms, latency 0, subrate 1-4, cont_num 1 Add the test_l2cap_le_62 macro (HCIEMU_TYPE_BREDRLE62) since SCI requires a 6.2 controller. The subrate parameters are loaded with the client's runtime bdaddr during setup_powered_client before the outgoing LE connection is initiated.
Add bthost_le_conn_rate() to send the LE Connection Rate Request (0x20a1) command for a given connection handle. Also handle the LE Connection Rate Change event (0x37). This allows testing a peripheral (server) handling of the Shorter Connection Interval feature by having the emulated central initiate the connection rate request on connect.
Add L2CAP LE server connection tests that exercise the peripheral side of the Shorter Connection Interval feature. The emulated client (central) is configured via bthost_le_conn_rate() to send an LE Connection Rate Request once connected, using the HOGP v1.2 recommended values for each of the four HID SCI modes (Fast, Default, Low Power, Full Range).
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
CheckPatch |
|
GitLint |
|
BuildEll |
|
BluezMake |
|
MakeCheck |
|
MakeDistcheck |
|
CheckValgrind |
|
CheckSmatch |
|
bluezmakeextell |
|
IncrementalBuild |
|
ScanBuild |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
From: Luiz Augusto von Dentz luiz.von.dentz@intel.com
Add support for discovering and reading HIDS 1.1 SCI (Subrated
Connection Interval) characteristics:
When the HID Information flags indicate SCI is supported (bit 2),
the SCI Mode and SCI Information characteristics are read after
the HID Information is obtained.
profiles/input/hog-lib.c | 106 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 105 insertions(+), 1 deletion(-)