Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v6 0/5] client/btpclient: Security Level reporting
@ 2026-11-26  8:52 Frédéric Danis
  2026-11-26  8:52 ` [PATCH BlueZ v6 1/5] device: Provide Security Level props when kernel supports them Frédéric Danis
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Frédéric Danis @ 2026-11-26  8:52 UTC (permalink / raw)
  To: linux-bluetooth

Set org.bluez.Device SecurityLevel and EncryptionType properties to
optional so application can access them only when they are meaningful.

Send BTP_EV_GAP_SEC_LEVEL_CHANGED event from SecurityLevel property
changes once the device's services are resolved, matching the BTP levels
expected by auto-pts.
This reduces connection time for the BAP tests.

v1->v2: Retitled patch 1 from "device: Provide Security Level related
  props when supported by kernel" (subject line was exceeding the
  mailing list's 80-character limit with the series prefix).
v2->v3: Patch 3 (BTP_EV_GAP_SEC_LEVEL_CHANGED support): only read and
  report SecurityLevel when ServicesResolved becomes true, so a stale
  cached level isn't reported as a security-level-changed event when an
  encrypted peer disconnects.
v3->v4: Patch 3 (BTP_EV_GAP_SEC_LEVEL_CHANGED support): fetch the
  device's Address/AddressType D-Bus properties instead of reading the
  btp_device struct fields directly, consistent with the other event
  builders in gap.c.
v4->v5: Patch 3 (BTP_EV_GAP_SEC_LEVEL_CHANGED support): also check
  EncryptionType before reporting BT_SECURITY_MEDIUM as encrypted, and
  refresh the event on EncryptionType changes too. Replay the cached
  security level when GAP registers, or a device proxy is added, for a
  device that is already connected and resolved.
v5->v6:
 - New patch 4: reset SecurityLevel and EncryptionType to 0, with
    a PropertiesChanged notification, once the last bearer disconnects,
    so a later unsecured reconnect doesn't report a stale value.
 - New patch 5: track the last BTP security level reported per device
    and skip resending an unchanged value.
    Reset the cached value on disconnect and on each GAP (re-)registration
    so a reconnect or a new registration still gets a fresh replay.

Frédéric Danis (5):
  device: Provide Security Level props when kernel supports them
  org.bluez.Device: Make Security Level props optional
  client/btpclient: Add BTP_EV_GAP_SEC_LEVEL_CHANGED support
  device: Reset Security Level and Encryption Type on disconnect
  client/btpclient: Suppress duplicate BTP security-level events

 client/btpclient/btpclient.h |  1 +
 client/btpclient/gap.c       | 88 +++++++++++++++++++++++++++++++++++-
 doc/org.bluez.Device.rst     |  8 ++--
 src/adapter.c                |  4 ++
 src/adapter.h                |  1 +
 src/device.c                 | 31 ++++++++++++-
 src/shared/btp.h             | 11 +++++
 7 files changed, 137 insertions(+), 7 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-11-26 15:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26  8:52 [PATCH BlueZ v6 0/5] client/btpclient: Security Level reporting Frédéric Danis
2026-11-26  8:52 ` [PATCH BlueZ v6 1/5] device: Provide Security Level props when kernel supports them Frédéric Danis
2026-11-26 15:13   ` client/btpclient: Security Level reporting bluez.test.bot
2026-11-26  8:52 ` [PATCH BlueZ v6 2/5] org.bluez.Device: Make Security Level props optional Frédéric Danis
2026-11-26  8:52 ` [PATCH BlueZ v6 3/5] client/btpclient: Add BTP_EV_GAP_SEC_LEVEL_CHANGED support Frédéric Danis
2026-11-26  8:52 ` [PATCH BlueZ v6 4/5] device: Reset Security Level and Encryption Type on disconnect Frédéric Danis
2026-11-26  8:52 ` [PATCH BlueZ v6 5/5] client/btpclient: Suppress duplicate BTP security-level events Frédéric Danis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox