add authentication support - #129
Merged
Merged
Conversation
mniestroj
force-pushed
the
bt-auth-v2
branch
2 times, most recently
from
December 17, 2025 14:42
8cae448 to
1ccf7e2
Compare
mniestroj
marked this pull request as ready for review
December 17, 2025 14:55
sam-golioth
reviewed
Dec 17, 2025
| help | ||
| Filter scanned devices by bonded status. Use it for authenticated | ||
| connections, so that discovered devices will be ignored when not bonded | ||
| already. Bonding is can be triggered explicitly by calling |
Contributor
There was a problem hiding this comment.
Suggested change
| already. Bonding is can be triggered explicitly by calling | |
| already. Bonding can be triggered explicitly by calling |
| return; | ||
| } | ||
|
|
||
| if (tf.is_bonded && !sync_requested(&tf.adv_data)) |
Contributor
There was a problem hiding this comment.
Nice catch on this corner case!
Contributor
There was a problem hiding this comment.
Using this file is optional - if an application is using custom scan logic, then it can also have explicit control over bonding, correct?
Collaborator
Author
There was a problem hiding this comment.
Yes, that is right, it is just a "utility". But it is still useful, which is why I reused it for samples/custom_connect/.
Contributor
There was a problem hiding this comment.
Great! It might make sense to reorganize the library a bit so scan.c and bond.c are more obviously utilities, but for now I think this is great.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Introduce a new module for controlling Bluetooth bonding (pairing) on the gateway. The module provides a simple API for enabling and disabling bonding with configurable timeout support. The API supports time-limited bonding windows where bonding can be enabled for a specific duration and automatically disabled afterwards. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Add support for filtering scanned BLE devices based on their bonding status. When POUCH_GATEWAY_GATT_SCAN_FILTER_BONDED is enabled, the gateway only connects to devices that are already bonded or when bonding is explicitly enabled via the bonding API. This enables authenticated connections where devices must be paired before they can communicate with the gateway. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Integrate bonding control into the gateway application with button-triggered pairing and passkey confirmation support. Enable 30 second window for bonding after first button press. Confirm passkey using second button press, during that window. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
mniestroj
force-pushed
the
bt-auth-v2
branch
from
December 18, 2025 14:13
1ccf7e2 to
3d73fa9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate bonding control into the gateway application with
button-triggered pairing and passkey confirmation support.
Enable 30 second window for bonding after first button press. Confirm
passkey using second button press, during that window.