Linux bluetooth development
 help / color / mirror / Atom feed
* [bluez/bluez] 9ce798: policy: Connect profiles for bonded inbound ACL co...
@ 2026-07-16 10:20 uos-eng
  0 siblings, 0 replies; only message in thread
From: uos-eng @ 2026-07-16 10:20 UTC (permalink / raw)
  To: linux-bluetooth

  Branch: refs/heads/1128714
  Home:   https://github.com/bluez/bluez
  Commit: 9ce7989c8bad0224ac19fcd1899d37a9bbf59440
      https://github.com/bluez/bluez/commit/9ce7989c8bad0224ac19fcd1899d37a9bbf59440
  Author: Chengyi Zhao <zhaochengyi@uniontech.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M plugins/policy.c
    M src/adapter.c
    M src/adapter.h

  Log Message:
  -----------
  policy: Connect profiles for bonded inbound ACL connections

When a bonded device initiates an inbound ACL connection (e.g. after
resume, the remote wins the page race), BlueZ accepts the ACL link
but does not establish AVDTP/AVCTP profiles. The remote's subsequent
L2CAP connect for PSM 25 fails with "security block" because the link
is not yet encrypted, and the kernel does not retry. The ACL link
stays up with no audio.

Add btd_connect_cb callback infrastructure to the adapter core
mirroring the existing btd_disconnect_cb pattern, invoked from
connected_callback so it only fires on new MGMT_EV_DEVICE_CONNECTED
events. Register a callback in the policy plugin that starts a
2-second grace timer for bonded BR/EDR connections. If an audio
profile connects naturally within the window the timer is cancelled;
otherwise btd_device_connect_services is called as a fallback, but
only if no audio profile is connected yet. The grace timer is also
cancelled on disconnect to avoid racing with device removal.

Outbound L2CAP is queued by the kernel until encryption completes,
surviving the race. The fallback is safe when the host already won
since btd_device_connect_services returns -EBUSY if a connection is
already in progress.



To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-16 10:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16 10:20 [bluez/bluez] 9ce798: policy: Connect profiles for bonded inbound ACL co uos-eng

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