All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 0/6] Add Connectable property to org.bluez.Device
@ 2026-10-02  5:46 Kevin Dewald
  2026-10-02  5:46 ` [PATCH BlueZ v2 1/6] org.bluez.Device: Add Connectable property Kevin Dewald
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Kevin Dewald @ 2026-10-02  5:46 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Luiz Augusto von Dentz, Kevin Dewald

bluetoothd records whether each advertising report was connectable,
from the Device Found event's Not Connectable flag, and uses it
internally, for example to pick the bearer to connect and to drop
temporary non-connectable devices when discovery stops. Applications
cannot read it over D-Bus, so they have to guess, e.g. from whether the
device has a name, which is wrong for named beacons and for unnamed
peripherals.

This series exposes it as a read-only Connectable property on
org.bluez.Device1 and on the org.bluez.Bearer.LE1 and
org.bluez.Bearer.BREDR1 interfaces, emitted when it first becomes known
and whenever it changes. bluetoothctl prints it in info, and prints
devices that are discoverable but not connectable in red.

Tested with an nRF52840 switching between ADV_IND, ADV_SCAN_IND and
ADV_NONCONN_IND advertising: Device1 and Bearer.LE1 follow each change,
including PropertiesChanged in both directions on a device kept by
continuous discovery, and the non-connectable profiles, which keep the
discoverable flags, are printed in red.

Changes in v2:
- Add Connectable to org.bluez.Bearer.LE1 and org.bluez.Bearer.BREDR1,
  so the LE value is visible for dual-mode devices (Luiz)
- Print discoverable broadcasters in red in bluetoothctl (Luiz)
- Print LE.Connectable and BREDR.Connectable in info
- Document the property type as boolean, like most of org.bluez.Device
- Rebase on master

Kevin Dewald (6):
  org.bluez.Device: Add Connectable property
  org.bluez.Bearer: Add Connectable property
  device: Add Connectable property
  bearer: Add Connectable property
  client: Print Connectable in info
  client: Print discoverable broadcasters in red

 client/main.c                  | 32 ++++++++++++++++++++
 doc/org.bluez.Bearer.BREDR.rst |  6 ++++
 doc/org.bluez.Bearer.LE.rst    | 12 ++++++++
 doc/org.bluez.Device.rst       | 11 +++++++
 src/bearer.c                   | 38 ++++++++++++++++++++++++
 src/bearer.h                   |  1 +
 src/device.c                   | 54 ++++++++++++++++++++++++++++++++++
 src/device.h                   |  2 ++
 8 files changed, 156 insertions(+)

-- 
2.54.0 (Apple Git-157)


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH BlueZ 1/3] org.bluez.Device: Add Connectable property
@ 2026-09-28 22:38 Kevin Dewald
  2026-09-29  2:19 ` Add Connectable property to org.bluez.Device bluez.test.bot
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Dewald @ 2026-09-28 22:38 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Kevin Dewald

This adds Connectable property which indicates whether the remote
device accepts connections, as reported by its last advertising report
or inquiry result.

bluetoothd already tracks this per bearer from the Device Found event,
but it is not exposed over D-Bus, so applications cannot tell
connectable advertisers such as peripherals from non-connectable ones
such as beacons without attempting a connection.
---
 doc/org.bluez.Device.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/doc/org.bluez.Device.rst b/doc/org.bluez.Device.rst
index 3e6a30a..abfd74d 100644
--- a/doc/org.bluez.Device.rst
+++ b/doc/org.bluez.Device.rst
@@ -395,6 +395,17 @@ int16 TxPower [readonly, optional]
 
 Advertised transmitted power level (inquiry or advertising).
 
+bool Connectable [readonly, optional]
+`````````````````````````````````````
+
+Indicates whether the remote device accepts connections, based on the most
+recent advertising report or inquiry result. For LE this is false when the
+last advertising report was non-connectable, e.g. ADV_NONCONN_IND or
+ADV_SCAN_IND.
+
+BR/EDR devices are always considered connectable. LE devices only have this
+property once they have been discovered or connected.
+
 dict ManufacturerData [readonly, optional]
 ``````````````````````````````````````````
 
-- 
2.54.0 (Apple Git-157)


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

end of thread, other threads:[~2026-10-02 15:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02  5:46 [PATCH BlueZ v2 0/6] Add Connectable property to org.bluez.Device Kevin Dewald
2026-10-02  5:46 ` [PATCH BlueZ v2 1/6] org.bluez.Device: Add Connectable property Kevin Dewald
2026-10-02 12:16   ` Add Connectable property to org.bluez.Device bluez.test.bot
2026-10-02  5:46 ` [PATCH BlueZ v2 2/6] org.bluez.Bearer: Add Connectable property Kevin Dewald
2026-10-02  5:46 ` [PATCH BlueZ v2 3/6] device: " Kevin Dewald
2026-10-02  5:46 ` [PATCH BlueZ v2 4/6] bearer: " Kevin Dewald
2026-10-02  5:46 ` [PATCH BlueZ v2 5/6] client: Print Connectable in info Kevin Dewald
2026-10-02  5:46 ` [PATCH BlueZ v2 6/6] client: Print discoverable broadcasters in red Kevin Dewald
2026-10-02 15:00 ` [PATCH BlueZ v2 0/6] Add Connectable property to org.bluez.Device patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2026-09-28 22:38 [PATCH BlueZ 1/3] org.bluez.Device: Add Connectable property Kevin Dewald
2026-09-29  2:19 ` Add Connectable property to org.bluez.Device 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.