Skip to content

[PW_SID:1134176] Add support for Shorter Connection Interval (SCI)#2347

Open
BluezTestBot wants to merge 12 commits into
masterfrom
1134176
Open

[PW_SID:1134176] Add support for Shorter Connection Interval (SCI)#2347
BluezTestBot wants to merge 12 commits into
masterfrom
1134176

Conversation

@BluezTestBot

Copy link
Copy Markdown

From: Luiz Augusto von Dentz luiz.von.dentz@intel.com

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.

profiles/input/hog-lib.c | 106 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 105 insertions(+), 1 deletion(-)

Vudentz added 12 commits July 24, 2026 20:00
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).
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

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.

@BluezTestBot

Copy link
Copy Markdown
Author

CheckPatch
Desc: Run checkpatch.pl script
Duration: 3.79 seconds
Result: FAIL
Output:

[BlueZ,v1,02/12] emulator/btdev: Add emulation support for HIDS 1.1 SCI commands
WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
#173: FILE: emulator/btdev.c:8015:
+	} __attribute__ ((packed)) pdu;

WARNING:LONG_LINE_COMMENT: line length of 81 exceeds 80 columns
#210: FILE: emulator/btdev.c:8052:
+	btdev->commands[48] |= BIT(7);	/* LE Read Min Supported Conn Interval */

/github/workspace/src/patch/14709597.patch total: 0 errors, 2 warnings, 172 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/patch/14709597.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


[BlueZ,v1,10/12] l2cap-tester: Add SCI mode tests for LE client connections
WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
#247: FILE: tools/l2cap-tester.c:1607:
+		} __attribute__((packed)) load;

/github/workspace/src/patch/14709606.patch total: 0 errors, 1 warnings, 166 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/patch/14709606.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


@BluezTestBot

Copy link
Copy Markdown
Author

GitLint
Desc: Run gitlint
Duration: 2.99 seconds
Result: FAIL
Output:

[BlueZ,v1,01/12] input/hog-lib: Add discovery support for HIDS 1.1 SCI attributes

1: T1 Title exceeds max length (81>80): "[BlueZ,v1,01/12] input/hog-lib: Add discovery support for HIDS 1.1 SCI attributes"
[BlueZ,v1,03/12] mgmt: Add Shorter Connection Interval setting and Load Connection Subrate

1: T1 Title exceeds max length (90>80): "[BlueZ,v1,03/12] mgmt: Add Shorter Connection Interval setting and Load Connection Subrate"
[BlueZ,v1,04/12] mgmt-tester: Add tests for SCI setting and Load Connection Subrate

1: T1 Title exceeds max length (83>80): "[BlueZ,v1,04/12] mgmt-tester: Add tests for SCI setting and Load Connection Subrate"
[BlueZ,v1,06/12] monitor: Add decoding for Load Connection Subrate, SCI setting and event

1: T1 Title exceeds max length (89>80): "[BlueZ,v1,06/12] monitor: Add decoding for Load Connection Subrate, SCI setting and event"

@BluezTestBot

Copy link
Copy Markdown
Author

BuildEll
Desc: Build and Install ELL
Duration: 15.82 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

BluezMake
Desc: Build BlueZ
Duration: 456.61 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

MakeCheck
Desc: Run Bluez Make Check
Duration: 18.51 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

MakeDistcheck
Desc: Run Bluez Make Distcheck
Duration: 121.29 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

CheckValgrind
Desc: Run Bluez Make Check with Valgrind
Duration: 172.27 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

CheckSmatch
Desc: Run smatch tool with source
Duration: 228.67 seconds
Result: WARNING
Output:

emulator/btdev.c:478:29: warning: Variable length array is used.monitor/packet.c:2002:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3924:52: warning: array of flexible structuresmonitor/bt.h:3912:40: warning: array of flexible structuresemulator/bthost.c:703:28: warning: Variable length array is used.emulator/bthost.c:704:32: warning: Variable length array is used.emulator/bthost.c:944:28: warning: Variable length array is used.emulator/bthost.c:978:28: warning: Variable length array is used.emulator/bthost.c:979:32: warning: Variable length array is used.

@BluezTestBot

Copy link
Copy Markdown
Author

bluezmakeextell
Desc: Build Bluez with External ELL
Duration: 73.20 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

IncrementalBuild
Desc: Incremental build with the patches in the series
Duration: 571.48 seconds
Result: PASS

@BluezTestBot

Copy link
Copy Markdown
Author

ScanBuild
Desc: Run Scan Build
Duration: 675.72 seconds
Result: PASS

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants