From cf970efb98c5af97955bfffbcebb3b065b16edc4 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Fri, 28 Aug 2020 14:15:16 -0400 Subject: feat(bluetooth): Proper bond management, identity support for non-splits * Add `bt` behavior that can be used to perform certain actions, such as next/prev identity, reset identity, etc. NOTE: Multiple identities is only supported for non-split shields, due to missing Zephyr identity functionality for dual central/peripheral devices. * Proper bond reset tied to action, that honors peripheral bonds, so folks can reset and pair to other hosts, without breaking bonds between splt halves. --- app/Kconfig | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'app/Kconfig') diff --git a/app/Kconfig b/app/Kconfig index 877fce4..b60db05 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -40,8 +40,6 @@ menuconfig ZMK_BLE select BT_PERIPHERAL select BT_GATT_DIS select BT_GATT_BAS - select SETTINGS - # select BT_SETTINGS if ZMK_BLE @@ -49,6 +47,12 @@ config ZMK_BLE_INIT_PRIORITY int "Init Priority" default 50 +config SETTINGS + default y + +config BT_SETTINGS + default y + config SYSTEM_WORKQUEUE_STACK_SIZE default 2048 @@ -103,8 +107,11 @@ config ZMK_SPLIT_BLE_ROLE_CENTRAL if ZMK_SPLIT_BLE_ROLE_CENTRAL +config BT_MAX_PAIRED + default 2 + config BT_MAX_CONN - default 5 + default 2 config BT_MAX_PAIRED # Bump this everywhere once we support switching active connections! @@ -120,15 +127,18 @@ if ZMK_SPLIT_BLE_ROLE_PERIPHERAL config ZMK_USB default n +config BT_MAX_PAIRED + default 1 config BT_MAX_CONN - default 5 + default 2 config BT_GAP_AUTO_UPDATE_CONN_PARAMS default n endif + endchoice endif @@ -138,6 +148,17 @@ endif endmenu +if ZMK_BLE && !ZMK_SPLIT_BLE + +config BT_ID_MAX + default 5 + +# Used to update the name to include the identity used +config BT_DEVICE_NAME_DYNAMIC + default y + +endif + config ZMK_KSCAN_MOCK_DRIVER bool "Enable mock kscan driver to simulate key presses" default n -- cgit v1.2.3