Linux bluetooth development
 help / color / mirror / Atom feed
From: Kevin Dewald <kevin@simpleble.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org, Kevin Dewald <kevin@simpleble.org>
Subject: Re: [RFC PATCH BlueZ 0/4] Bearer.LE1: Add ReadRSSI
Date: Thu, 12 Nov 2026 09:40:06 -0800	[thread overview]
Message-ID: <20261112174006.98288-1-kevin@simpleble.org> (raw)
In-Reply-To: <CABBYNZLiwCUAUCnVDYqWdjv5m4sFA=pKX8JAeFU1OXq-6LN7vQ@mail.gmail.com>

Hi Luiz,

On Thu, Nov 12, 2026 at 8:07 AM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> That still a poll in my book, not bluetoothd directly but I bet
> application will start to just poll it on their own.

They will, and Get Connection Information was designed for that: the
kernel caches the values for a random 1 to 3 seconds "to avoid client
trying to guess when to poll again". Applications that need the value
poll today anyway, as root through mgmt [1] or with raw HCI sockets
that bypass bluetoothd and the cache. Blueman still reads it through
libbluetooth for its signal bars, which only works on BR/EDR [2].

> Well the reported values are vendor dependent, so I'm not sure how
> much it would help since you can't use a measurement of link
> degradation in a generic manner, it needs hardware details to go
> along. We need a clear motivation for why this would be useful apart
> from just covering what other OSes might have since they may use a
> vendor command, or in Apple's case, probably deal with an exclusive
> vendor which makes things a lot more simpler.

For LE the spec fixes the value: Read RSSI returns the absolute
received signal strength in dBm to +/-6 dB accuracy (Vol 4, Part E,
7.5.4), the same unit as the advertising RSSI in Device1.RSSI. BR/EDR
is the one relative to the golden range, which is why the method is
only on Bearer.LE1. Android's readRemoteRssi sends the standard Read
RSSI command, and BlueZ's own Android port implemented it with Get
Connection Information.

What the value gives that a threshold event can't:

- Choosing between links. A device in range of several gateways should
  stay connected to the one with the best link, and a hub with
  redundant sensors should read from the strongest. That needs numbers
  that can be compared, not a crossing per link.
- Diagnostics. Logging the RSSI next to throughput and packet loss is
  how support tells a weak link from a firmware bug, after the fact.
- Production test. Test stations connect to every unit and check its
  RSSI against a reference unit, to catch a bad antenna or enclosure.
- Trends. An application streaming data can see the RSSI falling and
  lower its rate before the link drops, instead of finding out from a
  threshold picked in advance.

> Which means every btmon trace will now grow just with RSSI reports, I
> mean I could live with an event generated if RSSI drops below a
> certain threshold, not a command and event, every 2 seconds.

Only while an application reads it. A threshold event needs the same
Read RSSI every 2 seconds underneath, as the RSSI Monitor RFC did in
2011, unless the controller monitors it itself: LE Path Loss
Monitoring, which also needs LE Power Control on the peripheral, or
the MSFT extension's LE connection RSSI monitor, which the kernel does
not use yet.

BlueZ already has both for advertising: Device1.RSSI for the value and
AdvertisementMonitor1 for thresholds. ReadRSSI is the value half for
connections, and I'm happy to add thresholds on top where the
controller can monitor the link itself.

[1] https://lore.kernel.org/linux-bluetooth/aa77c035-d2aa-f227-bfcd-358b5f063b21@labapart.com/
[2] https://github.com/blueman-project/blueman/pull/1642

--
Kevin

  reply	other threads:[~2026-11-12 17:40 UTC|newest]

Thread overview: 9+ 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 ` [RFC PATCH BlueZ 4/4] test: functional: add bearer ReadRSSI test Kevin Dewald
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 [this message]
2026-11-12 19:12     ` Luiz Augusto von Dentz

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=20261112174006.98288-1-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