You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API documentation for the disconnected() callback warns
that the connection object is not actually reusable at this stage,
but some of the advice given may be misleading:
- "start connectable advertising": the options that "will attempt to
resume the advertiser under some conditions" are deprecated
(BT_LE_ADV_OPT_CONNECTABLE and related), and the responsibility
for this behavior has moved to the application [1]
- "increase CONFIG_BT_MAX_CONN": does not really avoid the issue,
only delays the point where there may be no free connection object
when the disconnected() callback executes
Also, the documentation predates [2] and [3], and does not mention
the recycled() callback, which is now the most reliable API to track
free connections and/or initiate operations that depend on them.
[1] 8cfad44: Bluetooth: Deprecate adv auto-resume
[2] efb5d83: Bluetooth: Host: Added Recycled evt notifying conn object
is available
[3] 2ca59e7: Bluetooth: Host: Defer `conn.recycled()` to the syswq
Signed-off-by: Christophe Dufaza <[email protected]>
0 commit comments