All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 0/4] Bearer.LE1: Add ReadRSSI
@ 2026-11-13  5:14 Kevin Dewald
  2026-11-13  5:14 ` [PATCH BlueZ v2 1/4] org.bluez.Bearer: Add ReadRSSI method Kevin Dewald
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Kevin Dewald @ 2026-11-13  5:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Luiz Augusto von Dentz, Kevin Dewald

This adds ReadRSSI to Bearer.LE1 as a testing method, for diagnostics
and production testing, as discussed on v1 [1]. It is only available
when D-Bus testing interfaces are enabled, with bluetoothd -T or
Testing = true in main.conf.

Each call sends Get Connection Information, which the kernel answers
from the controller or with the value it read in the last 1 to 3
seconds. A call made right after Connect returns fails with NotReady
until the kernel has read the remote features.

Changes in v2:
- Make ReadRSSI a testing method and mark it [testing] in the
  documentation.
- Enable testing interfaces on one host in the functional test, and
  check that the other host does not export ReadRSSI.
- Rebase on master.

Tested with the functional test on bluetooth-next 3f425f95ba39, and on
an RTL8761BU connected to an nRF52840. With -T, ReadRSSI returned
-48 dBm; without it, the method was not exported.

[1] https://lore.kernel.org/linux-bluetooth/20261112032250.37687-1-kevin@simpleble.org/

Kevin Dewald (4):
  org.bluez.Bearer: Add ReadRSSI method
  adapter: Add btd_adapter_get_conn_info
  bearer: Add ReadRSSI method
  test: functional: add bearer ReadRSSI test

 doc/org.bluez.Bearer.LE.rst    |  19 ++++++
 src/adapter.c                  |  22 +++++++
 src/adapter.h                  |   7 +++
 src/bearer.c                   | 111 ++++++++++++++++++++++++++++++++-
 test/functional/test_bearer.py |  42 +++++++++++++
 5 files changed, 199 insertions(+), 2 deletions(-)


base-commit: 20ffd285b58facfd1f2478d159a5f941b09d5be1
-- 
2.54.0 (Apple Git-157)


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [RFC PATCH BlueZ 1/4] org.bluez.Bearer: Add ReadRSSI method
@ 2026-11-12  3:22 Kevin Dewald
  2026-11-12  9:03 ` Bearer.LE1: Add ReadRSSI bluez.test.bot
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Dewald @ 2026-11-12  3:22 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Luiz Augusto von Dentz, Kevin Dewald

Add a method to read the RSSI of the current connection on LE bearer.
Device1.RSSI only covers inquiry and advertising, so an application
cannot follow the signal strength of a device once it is connected and
no longer advertising.

Assisted-by: Claude:claude-opus-5.5
---
 doc/org.bluez.Bearer.LE.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/doc/org.bluez.Bearer.LE.rst b/doc/org.bluez.Bearer.LE.rst
index 3db5237b4..589b54873 100644
--- a/doc/org.bluez.Bearer.LE.rst
+++ b/doc/org.bluez.Bearer.LE.rst
@@ -57,6 +57,23 @@ Possible errors:
 
 :org.bluez.Error.NotConnected:
 
+int16 ReadRSSI()
+````````````````
+
+Reads the Received Signal Strength Indicator of the current connection on LE
+bearer from the controller, in dBm.
+
+The kernel caches the value for a few seconds, so calls made in quick succession
+may return the same value. Right after the connection is established, while it
+is still being set up, the method fails with org.bluez.Error.NotReady.
+
+Possible errors:
+
+:org.bluez.Error.NotConnected:
+:org.bluez.Error.NotReady:
+:org.bluez.Error.NotAvailable:
+:org.bluez.Error.Failed:
+
 Signals
 -------
 
-- 
2.54.0 (Apple Git-157)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-13 10:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13  5:14 [PATCH BlueZ v2 0/4] Bearer.LE1: Add ReadRSSI Kevin Dewald
2026-11-13  5:14 ` [PATCH BlueZ v2 1/4] org.bluez.Bearer: Add ReadRSSI method Kevin Dewald
2026-11-13 10:44   ` Bearer.LE1: Add ReadRSSI bluez.test.bot
2026-11-13  5:14 ` [PATCH BlueZ v2 2/4] adapter: Add btd_adapter_get_conn_info Kevin Dewald
2026-11-13  5:14 ` [PATCH BlueZ v2 3/4] bearer: Add ReadRSSI method Kevin Dewald
2026-11-13  5:14 ` [PATCH BlueZ v2 4/4] test: functional: add bearer ReadRSSI test Kevin Dewald
  -- strict thread matches above, loose matches on Subject: below --
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.