Skip to content

Add Connectable property to org.bluez.Device

Kevin Dewald linux-bluetooth 2 versions – Applied

Status from this message: This series was applied to bluetooth/bluez.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 1 replyApplied
  2. v13 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- 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

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6org.bluez.Device: Add Connectable propertydoc/org.bluez.Device.rst+11 -01 reply
2/6org.bluez.Bearer: Add Connectable propertydoc/org.bluez.Bearer.BREDR.rst doc/org.bluez.Bearer.LE.rst+18 -00 replies
3/6device: Add Connectable propertysrc/device.c+36 -00 replies
4/6bearer: Add Connectable propertysrc/bearer.c src/bearer.h src/device.c +1 more+59 -00 replies
5/6client: Print Connectable in infoclient/main.c+5 -00 replies
6/6client: Print discoverable broadcasters in redclient/main.c+27 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH BlueZ v2 0/6] Add Connectable property to org.bluez.Device

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(+)
Signature · 1 line
2.54.0 (Apple Git-157)