fix(bluetooth): Kconfig to clear bonds on start
This commit is contained in:
parent
fc0812bd2e
commit
13842a8a1e
2 changed files with 10 additions and 0 deletions
|
@ -52,6 +52,10 @@ config ZMK_BLE_INIT_PRIORITY
|
||||||
config SYSTEM_WORKQUEUE_STACK_SIZE
|
config SYSTEM_WORKQUEUE_STACK_SIZE
|
||||||
default 2048
|
default 2048
|
||||||
|
|
||||||
|
config ZMK_BLE_CLEAR_BONDS_ON_START
|
||||||
|
bool "Configuration that clears all bond information from the keyboard on startup."
|
||||||
|
default n
|
||||||
|
|
||||||
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
|
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
|
||||||
config BT_GATT_NOTIFY_MULTIPLE
|
config BT_GATT_NOTIFY_MULTIPLE
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -346,6 +346,12 @@ static int zmk_ble_init(struct device *_arg)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START)
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
bt_unpair(i, NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bt_conn_cb_register(&conn_callbacks);
|
bt_conn_cb_register(&conn_callbacks);
|
||||||
bt_conn_auth_cb_register(&zmk_ble_auth_cb_display);
|
bt_conn_auth_cb_register(&zmk_ble_auth_cb_display);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue