* [PATCH BlueZ v1] test: functional: change the HoG connection rate from the HID device
@ 2026-10-12 15:28 Luiz Augusto von Dentz
2026-10-12 18:51 ` [BlueZ,v1] " bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2026-10-12 15:28 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
As specified by the HIDS/HOGP SCI FIPD, the HID device initiates the
Connection Rate Update procedure once the HID host writes the mode to
the HID Control Point, so load the connection subrate on the HID device
instead of the HID host.
This requires the kernel to issue the LE Connection Rate Request as
peripheral.
Assisted-by: OpenCode:claude-opus-5.5
---
doc/functional-hog.rst | 13 ++++++-------
test/functional/test_hog.py | 21 +++++++++++----------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/doc/functional-hog.rst b/doc/functional-hog.rst
index 795a066a6f1a..6d0b0132d5dd 100644
--- a/doc/functional-hog.rst
+++ b/doc/functional-hog.rst
@@ -135,7 +135,7 @@ test_hog[sci]
10. host0: ``gatt.select-attribute 2c39`` and ``gatt.notify on``.
11. host0: ``gatt.select-attribute 2a4c`` and ``gatt.write "0x03"``,
i.e. Enable SCI Fast mode written to the HID Control Point.
- 12. host0: ``mgmt.conn-subrate <host1 bdaddr> 0x0008 0x0010 1 1 0 0
+ 12. host1: ``mgmt.conn-subrate <host0 bdaddr> 0x0008 0x0010 1 1 0 0
0x01f4``, i.e. interval 1 ms to 2 ms, within the range given in
HID SCI Information, no subrating, no latency and 5 s
supervision timeout.
@@ -196,9 +196,8 @@ test_hog[sci]
Notify only. The Control Point is written with bluetoothctl, as the
input plugin has no D-Bus API to request a mode.
- The HID device is meant to change the connection rate once the
- mode is written, but the kernel only issues the LE Connection Rate
- Request as central, so the connection rate is changed by the HID
- host. This requires
- the controllers to support Shorter Connection Intervals, which
- btvirt emulates as a BR/EDR/LE 6.2 controller.
+ The HID device, the peripheral, then changes the connection rate
+ according to the mode, which requires the kernel to issue the LE
+ Connection Rate Request as peripheral, as well as the controllers
+ to support Shorter Connection Intervals, which btvirt emulates as a
+ BR/EDR/LE 6.2 controller.
diff --git a/test/functional/test_hog.py b/test/functional/test_hog.py
index 7ff0965275d1..a76c91602896 100644
--- a/test/functional/test_hog.py
+++ b/test/functional/test_hog.py
@@ -45,10 +45,10 @@ REPORTS = [
# HID SCI Mode
SCI_FAST_MODE = "03"
-# LE Connection Rate parameters requested with mgmt.conn-subrate once in
-# SCI Fast Mode: interval 1 ms to 2 ms (units of 0.125 ms), within the
-# range given in HID SCI Information, no subrating, no latency and 5 s
-# supervision timeout (units of 10 ms)
+# LE Connection Rate parameters requested by the HID device with
+# mgmt.conn-subrate once in SCI Fast Mode: interval 1 ms to 2 ms (units of
+# 0.125 ms), within the range given in HID SCI Information, no subrating,
+# no latency and 5 s supervision timeout (units of 10 ms)
SCI_RATE = ["0x0008", "0x0010", "1", "1", "0", "0", "0x01f4"]
# Reported when an operation cannot complete, so a test does not have to
@@ -251,17 +251,18 @@ def test_hog(hosts, init_script, flags, sci):
)
assert expect_hexdump(device) == SCI_FAST_MODE
- # The HID device is meant to change the connection rate, but the kernel
- # only requests it as central, so the HID host does it instead
- ctl.send(f"mgmt.conn-subrate {host1.bdaddr} {' '.join(SCI_RATE)}\n")
+ # The HID device then changes the connection rate according to the
+ # mode, see the HIDS/HOGP SCI FIPD, which requires the kernel to issue
+ # the LE Connection Rate Request as peripheral
+ device.send(f"mgmt.conn-subrate {host0.bdaddr} {' '.join(SCI_RATE)}\n")
# The connection rate may change before the command completes, so the
# event may be printed before the reply
rate = rf"{{}} type .* connection subrate interval {SCI_RATE[0]}"
expect_all(
- ctl,
- [r"Connection Subrate loaded successfully", rate.format(host1.bdaddr.upper())],
+ device,
+ [r"Connection Subrate loaded successfully", rate.format(host0.bdaddr.upper())],
)
- expect(device, rate.format(host0.bdaddr.upper()))
+ expect(ctl, rate.format(host1.bdaddr.upper()))
# Then the HID device confirms the mode has been changed
ctl.send("gatt.select-attribute 2c39\n")
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [BlueZ,v1] test: functional: change the HoG connection rate from the HID device
2026-10-12 15:28 [PATCH BlueZ v1] test: functional: change the HoG connection rate from the HID device Luiz Augusto von Dentz
@ 2026-10-12 18:51 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-10-12 18:51 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 4253 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1184010/
---Test result---
Test Summary:
CheckPatch PASS 0.30 seconds
GitLint PASS 0.24 seconds
BuildEll PASS 17.83 seconds
BluezMake PASS 316.85 seconds
MakeCheck PASS 13.82 seconds
MakeDistcheck PASS 133.02 seconds
CheckValgrind PASS 225.89 seconds
CheckSmatch PASS 247.31 seconds
bluezmakeextell PASS 89.05 seconds
TestFunctional FAIL 1139.47 seconds
IncrementalBuild PASS 316.62 seconds
ScanBuild PASS 1014.36 seconds
Details
##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_hog::test_hog[sci-hosts18-vm2]: pytest_bluezenv.rpc.RemoteError: <pexpect.popen_spawn.PopenSpawn object at 0x7f5ee76b67b0>
searcher: searcher_re:
0: re.compile(b'(Failed to \\w+[^\\r\\n]*)')
1: re.compile(b'(Device \\S+ not available)')
2: re.compile(b'(No device connected)')
3: re.compile(b'(No attribute selected)')
4: re.compile(b'00:AA:01:00:00:42 type .* connection subrate interval 0x0008')
<pexpect.popen_spawn.PopenSpawn object at 0x7f5ee76b67b0>
searcher: searcher_re:
0: re.compile(b'(Failed to \\w+[^\\r\\n]*)')
1: re.compile(b'(Device \\S+ not available)')
2: re.compile(b'(No device connected)')
3: re.compile(b'(No attribute selected)')
4: re.compile(b'00:AA:01:00:00:42 type .* connection subrate interval 0x0008')
Remote traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/rpc.py", line 102, in server_stream
result = method(*msg["a"], **msg["kw"])
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/env.py", line 256, in call_plugin
return getattr(self.plugins[name], method)(*a, **kw)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.14/dist-packages/pytest_bluezenv/../pytest_bluezenv/host_plugins.py", line 441, in expect
ret = ctl.expect(*a, **kw)
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 354, in expect
return self.expect_list(compiled_pattern_list,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
timeout, searchwindowsize, async_)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 383, in expect_list
return exp.expect_loop(timeout)
~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 181, in expect_loop
return self.timeout(e)
~~~~~~~~~~~~^^^
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 144, in timeout
raise exc
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7f5ee76b67b0>
searcher: searcher_re:
0: re.compile(b'(Failed to \\w+[^\\r\\n]*)')
1: re.compile(b'(Device \\S+ not available)')
2: re.compile(b'(No device connected)')
3: re.compile(b'(No attribute selected)')
4: re.compile(b'00:AA:01:00:00:42 type .* connection subrate interval 0x0008')
<pexpect.popen_spawn.PopenSpawn object at 0x7f5ee76b67b0>
searcher: searcher_re:
0: re.compile(b'(Failed to \\w+[^\\r\\n]*)')
1: re.compile(b'(Device \\S+ not available)')
2: re.compile(b'(No device connected)')
3: re.compile(b'(No attribute selected)')
4: re.compile(b'00:AA:01:00:00:42 type .* connection subrate interval 0x0008')
https://github.com/bluez/bluez/pull/2663
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-12 18:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 15:28 [PATCH BlueZ v1] test: functional: change the HoG connection rate from the HID device Luiz Augusto von Dentz
2026-10-12 18:51 ` [BlueZ,v1] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox