From: Kevin Dewald <kevin@simpleble.org>
To: linux-bluetooth@vger.kernel.org
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Kevin Dewald <kevin@simpleble.org>
Subject: [RFC PATCH BlueZ 4/4] test: functional: add bearer ReadRSSI test
Date: Wed, 11 Nov 2026 19:22:50 -0800 [thread overview]
Message-ID: <20261112032250.37687-5-kevin@simpleble.org> (raw)
In-Reply-To: <20261112032250.37687-1-kevin@simpleble.org>
Read the RSSI of the LE connection from both hosts, and check ReadRSSI
fails with NotConnected once disconnected.
Assisted-by: Claude:claude-opus-5.5
---
test/functional/test_bearer.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/test/functional/test_bearer.py b/test/functional/test_bearer.py
index 59ce8ef7d..36b614348 100644
--- a/test/functional/test_bearer.py
+++ b/test/functional/test_bearer.py
@@ -283,6 +283,29 @@ def test_bearer_le_conn_params(hosts):
assert host.bearers.get(remote.bdaddr, LE_INTERFACE, name) is None
+@le_config
+def test_bearer_le_read_rssi(hosts):
+ host0, host1 = hosts
+
+ connect_le(host0, host1)
+
+ for host, remote in peers(host0, host1):
+ wait_until(
+ lambda: host.bearers.get(remote.bdaddr, LE_INTERFACE, "Connected") is True
+ )
+
+ # The emulated controller reports -1 dBm for every connection
+ host.bearers.call(remote.bdaddr, LE_INTERFACE, "ReadRSSI")
+ reply = host.bearers.expect(f"{LE_INTERFACE}.ReadRSSI:reply")
+ assert reply.values == (-1,)
+
+ disconnect(host0, host1, LE_INTERFACE)
+
+ host0.bearers.call(host1.bdaddr, LE_INTERFACE, "ReadRSSI")
+ error = host0.bearers.expect(f"{LE_INTERFACE}.ReadRSSI:error").error
+ assert error.get_dbus_name() == "org.bluez.Error.NotConnected"
+
+
@host_config(
[
Bluetoothd(conf=LE_CONF, args=ARGS),
--
2.54.0 (Apple Git-157)
next prev parent reply other threads:[~2026-11-12 3:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 3:22 [RFC PATCH BlueZ 0/4] Bearer.LE1: Add ReadRSSI Kevin Dewald
2026-11-12 3:22 ` [RFC PATCH BlueZ 1/4] org.bluez.Bearer: Add ReadRSSI method Kevin Dewald
2026-11-12 9:03 ` Bearer.LE1: Add ReadRSSI bluez.test.bot
2026-11-12 3:22 ` [RFC PATCH BlueZ 2/4] adapter: Add btd_adapter_get_conn_info Kevin Dewald
2026-11-12 3:22 ` [RFC PATCH BlueZ 3/4] bearer: Add ReadRSSI method Kevin Dewald
2026-11-12 3:22 ` Kevin Dewald [this message]
2026-11-12 16:07 ` [RFC PATCH BlueZ 0/4] Bearer.LE1: Add ReadRSSI Luiz Augusto von Dentz
2026-11-12 17:40 ` Kevin Dewald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112032250.37687-5-kevin@simpleble.org \
--to=kevin@simpleble.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox