-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Bluetooth: Host: deprecate CONFIG_BT_FIXED_PASSKEY #97597
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
base: main
Are you sure you want to change the base?
Bluetooth: Host: deprecate CONFIG_BT_FIXED_PASSKEY #97597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good small comments and suggestion.
Should we update the API documentation for bt_passkey_set() in conn.h ?
ee6a869
to
74e17dc
Compare
74e17dc
to
c27861a
Compare
de1595b
to
7a11bbb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, 2 minor comments.
Also, it would probably be good to have some simple multilink bsim test to check parallel pairing, but this is up to you. We can do this separately later as well.
8c38f22
to
faf7645
Compare
include/zephyr/bluetooth/conn.h
Outdated
* | ||
* If implemented, this callback allows the application to provide passkeys for pairing. | ||
* The valid range of passkeys is 0 - 999999, and should be expected to be zero-padded to | ||
* 6 digits. The application shall return the passkey for pairing, or BT_PASSKEY_RAND to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 6 digits. The application shall return the passkey for pairing, or BT_PASSKEY_RAND to | |
* The valid range of passkeys is 0 - 999999. The application shall return the passkey for pairing, or BT_PASSKEY_RAND to |
callback just returns uint32_t. Passkey is zero-padded on display only I guess.
faf7645
to
a3fc7d7
Compare
doc/releases/migration-guide-4.3.rst
Outdated
* :kconfig:option:`CONFIG_BT_FIXED_PASSKEY` has been deprecated. Instead, the application can | ||
provide passkeys for pairing using the :c:member:`bt_conn_auth_cb.app_passkey` callback, which is | ||
available when :kconfig:option:`CONFIG_BT_APP_PASSKEY` is enabled. The application can return the | ||
passkey for pairing, or :c:macro:`BT_PASSKEY_RAND` to generate a random passkey. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passkey for pairing, or :c:macro:`BT_PASSKEY_RAND` to generate a random passkey. | |
available when :kconfig:option:`CONFIG_BT_APP_PASSKEY` is enabled. The application can return a | |
random passkey for pairing, or :c:macro:`BT_PASSKEY_RAND` to the Host to generate a random passkey | |
instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a variant!
include/zephyr/bluetooth/conn.h
Outdated
* random and unique keys. | ||
* | ||
* @param conn Connection where pairing is currently active. | ||
* @return Passkey for pairing or BT_PASSKEY_RAND to generate a random passkey. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @return Passkey for pairing or BT_PASSKEY_RAND to generate a random passkey. | |
* @return Passkey for pairing or BT_PASSKEY_RAND for a random passkey generated by the Host. |
subsys/bluetooth/host/Kconfig
Outdated
help | ||
With this option enabled, the application will be able to provide passkeys for pairing | ||
using the app_passkey() callback. If the application does not provide a passkey, a | ||
random passkey will be generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
random passkey will be generated. | |
random passkey will be generated by the Host. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left the last comment to make it a bit more clear for user that host will keep generating random value. Up to you, just suggestions.
a3fc7d7
to
358fc38
Compare
Resolved comments from @alwa-nordic offline, but changed the IO capabilities when using the app_passkey cb to support both BT_SMP_IO_KEYBOARD_DISPLAY (when defining the passkey_entry cb and app_passkey) and BT_SMP_IO_DISPLAY_ONLY (when defining just app_passkey) |
358fc38
to
91c8cc9
Compare
Adds the BT_APP_PASSKEY Kconfig, which allows the application to provide passkeys for pairing using the new `app_passkey()` callback. This is an alternative to BT_FIXED_PASSKEY, which will be deprecated in a later commit. Signed-off-by: Håvard Reierstad <[email protected]>
The BT_FIXED_PASSKEY Kconfig option is being deprecated, and is replaced by BT_APP_PASSKEY. The reason for the deprecation is an upcoming errata, ES-24489, which mandates that a new passkey shall be generated for each pairing procedure. Signed-off-by: Håvard Reierstad <[email protected]>
Updates the bt shell API to use the new Kconfig option BT_APP_PASSKEY instead of BT_FIXED_PASSKEY as this is being deprecated. Signed-off-by: Håvard Reierstad <[email protected]>
91c8cc9
to
5b1b804
Compare
|
Deprecates the CONFIG_BT_FIXED_PASSKEY config and adds CONFIG_BT_APP_PASSKEY as an alternative.
Updates the bt shell implementation to use the new config option.