From: Kevin Dewald <kevin@simpleble.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 0/3] Add Connectable property to org.bluez.Device
Date: Wed, 30 Sep 2026 13:30:31 -0700 [thread overview]
Message-ID: <20260930203031.89180-1-kevin@simpleble.org> (raw)
In-Reply-To: <CABBYNZKebai0bQZ4Z_0+P6LwWN=-jniRMN0vctYTD0TC=y36cw@mail.gmail.com>
Hi Luiz,
On Wed, Sep 30, 2026, Luiz Augusto von Dentz wrote:
> This is already exposed via AdvertisingFlags:
>
> https://github.com/bluez/bluez/blob/master/doc/org.bluez.Device.rst#arraybyte-advertisingflags-readonly
>
> bluetoothctl does already gray the devices that are not considered
> discoverable, see:
>
> commit 815f779aa8e477e399b78f03c0ea0e75f0270c4a
AdvertisingFlags is the Flags AD type, which tells whether a device is
discoverable, not whether it accepts connections. GAP defines the two
modes separately: connectability comes from the advertising PDU type,
which the kernel reports on its own as MGMT_DEV_FOUND_NOT_CONNECTABLE.
bluetoothd already relies on that flag, to skip non-connectable reports
when auto-connecting and to drop temporary non-connectable devices when
discovery stops, but doesn't expose it.
The two often disagree. Beacons commonly send ADV_NONCONN_IND with
Flags 0x06 (e.g. the 02 01 06 prefix of iBeacon), so bluetoothctl shows
them as discoverable although they can't be connected to. A device that
is connectable but not discoverable can send ADV_IND with Flags 0x04
and is grayed out although it accepts connections.
I checked this on an nRF52840 that keeps the same advertising data,
starting with 02 01 06, and only changes the PDU type:
PDU AdvertisingFlags Device Found flags Connectable
ADV_IND 0x06 0x00000000 true
ADV_SCAN_IND 0x06 0x00000004 false
ADV_NONCONN_IND 0x06 0x00000004 false
The use case is cross-platform code: Android (ScanResult.isConnectable),
Core Bluetooth (CBAdvertisementDataIsConnectable) and Windows
(BluetoothLEAdvertisementReceivedEventArgs.IsConnectable) all report
this, and exposing it would let applications rely on it on Linux too.
I'm happy to mark it experimental, or rework it if you'd prefer a
different shape.
Kevin
next prev parent reply other threads:[~2026-09-30 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 22:38 [PATCH BlueZ 0/3] Add Connectable property to org.bluez.Device Kevin Dewald
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
2026-09-28 22:38 ` [PATCH BlueZ 2/3] device: Add Connectable property Kevin Dewald
2026-09-28 22:38 ` [PATCH BlueZ 3/3] client: Print Connectable in info Kevin Dewald
2026-09-30 13:20 ` [PATCH BlueZ 0/3] Add Connectable property to org.bluez.Device Luiz Augusto von Dentz
2026-09-30 20:30 ` Kevin Dewald [this message]
2026-10-01 15:39 ` 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=20260930203031.89180-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