-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: Host: Added 'recycled' callback to bt_conn_cb #68266
Bluetooth: Host: Added 'recycled' callback to bt_conn_cb #68266
Conversation
ecb6338
to
1e5417d
Compare
1e5417d
to
d3669a2
Compare
FYI - Addressed all the observations, except the polling signals refactoring. I'll tackle that later today. |
d3669a2
to
c50b332
Compare
Update: All requested changes are made effective to the best of my knowledge |
c50b332
to
0be1a84
Compare
- Which allow listeners to attempt to use the freed connection object to perform actions as e.g: start connectable advertisements. - Refactored bt_conn_unref() so it does not access conn struct after decrementing its reference count. Signed-off-by: Luis Ubieda <luisf@croxel.com>
Added on the bt_conn_cb set, used to notify listeners that a previously allocated connection object has been freed. Used for e.g: restart extended advertisements. Signed-off-by: Luis Ubieda <luisf@croxel.com>
0be1a84
to
9605415
Compare
The CI workflow for babblesim tests is failing with this info. I am not able to replicate this on my local machine nor am I sure how to fix it. Could I get some more context? |
tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn.sh
Outdated
Show resolved
Hide resolved
Where extended advertising is restablished through the use of recycled() callback, registers over bt_conn_cb_register(). Signed-off-by: Luis Ubieda <luisf@croxel.com>
Both advertiser and scanner demonstrate the use of extended advertising and scanning, and how to gracefully restart the extended advertisements through the use of recycle() callback. In the sample, the advertiser initiates a connectable advertisement set, which prompts the scanner to connect. After the connection is established, the advertiser waits for 5 seconds to disconnect. After the connection is dropped, the advertiser immediately restarts broadcasting, while the scanner cools-down for 5 seconds to restart its process. Signed-off-by: Luis Ubieda <luisf@croxel.com>
9605415
to
76cea80
Compare
This PR attempts to address #68114, by:
Resolves: #68114