Skip to content

Conversation

@mniestroj
Copy link
Contributor

Introduce Kconfig option for required GATT permissions. Provide 2 options:

  • LE Secure Connection
  • Authentication (with encryption)

This makes sure that proper BT Security Level is reached before trying being able to access pouch characteristics.

Add BT auth callbacks to example code, which are required to display passkey to the user (over serial console). Confirmation is handled by pressing button (/aliases/sw0 in devicetree).

Add also EXAMPLE_BT_AUTO_CONFIRM option for handling auto-confirmation for nrf52_bsim board. There is no easy to use "manual" confirmation method for this platform, so confirming automatically is the easiest way to go. This makes sense especially for automated tests with pouch-gateway, as that will result in working BT communication without any additional external Pytest code.

@mniestroj mniestroj marked this pull request as ready for review December 16, 2025 14:29
Copy link
Collaborator

@sam-golioth sam-golioth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mniestroj! 2 non-blocking comments

help
Directory on mounted file system containing credentials.

config EXAMPLE_BT_AUTO_CONFIRM
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment that says that this symbol is only for automated testing? So users don't get confused when reading this file.

}
else
{
LOG_INF("No BT connection for passkey confirmation");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG_INF("No BT connection for passkey confirmation");
LOG_WRN("No BT connection for passkey confirmation");

Add BT auth callbacks, which are required to display passkey to the
user (over serial console). Confirmation is handled by pressing
button (/aliases/sw0 in devicetree).

Add also EXAMPLE_BT_AUTO_CONFIRM option for handling auto-confirmation
for nrf52_bsim board. There is no easy to use "manual" confirmation
method for this platform, so confirming automatically is the easiest way
to go. This makes sense especially for automated tests with
pouch-gateway, as that will result in working BT communication without
any additional external Pytest code.

Signed-off-by: Marcin Niestroj <[email protected]>
Introduce Kconfig option for required GATT permissions. Provide 2
options:
 * LE Secure Connection
 * Authentication (with encryption)

This makes sure that proper BT Security Level is reached before trying
being able to access pouch characteristics.

Signed-off-by: Marcin Niestroj <[email protected]>
@mniestroj mniestroj merged commit 33fab68 into main Dec 17, 2025
4 checks passed
@mniestroj mniestroj deleted the bt-auth branch December 17, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants