Bluetooth: Add support for fixed passkeys

Add a new bt_passkey_set() API that can be used to set a fixed passkey
to be used for pairing. The new API also requires a new Kconfig option
to be enabled first (CONFIG_BT_FIXED_PASSKEY).

Fixes #8350

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2018-07-30 20:29:40 +03:00 committed by Johan Hedberg
commit c446c8267b
4 changed files with 113 additions and 44 deletions

View file

@ -281,6 +281,13 @@ config BT_SMP_SC_ONLY
Security Mode 1 Level 4 stands for authenticated LE Secure Connections
pairing with encryption. Enabling this option disables legacy pairing.
config BT_FIXED_PASSKEY
bool "Use a fixed passkey for pairing"
help
With this option enabled, the application will be able to call the
bt_passkey_set() API to set a fixed passkey. If set, the
pairing_confim() callback will be called for all incoming pairings.
config BT_USE_DEBUG_KEYS
bool "Enable Security Manager Debug Mode"
depends on BT_TINYCRYPT_ECC