Skip to content

Commit

Permalink
feat(bt): Add new beta testing Kconfig setting.
Browse files Browse the repository at this point in the history
* In order to have an easy way to test and phase in BT changes, add a
  new `ZMK_BLE_BETA_TESTING` Kconfig setting.
  • Loading branch information
petejohanson committed Dec 4, 2023
1 parent 042e520 commit 5b2a5f7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
20 changes: 15 additions & 5 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ menuconfig ZMK_BLE

if ZMK_BLE

config ZMK_BLE_BETA_TESTING
bool "Experimental: Enable beta testing of advanced BLE settings/features"
select ZMK_BLE_PASSKEY_ENTRY
select BT_GATT_AUTO_SEC_REQ
select BT_SMP_ALLOW_UNAUTH_OVERWRITE
help
Enables a combination of settings that are planned to be default in future versions of ZMK.
This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry,
and allowing overwrite of keys from previously paired hosts.

config ZMK_BLE_PASSKEY_ENTRY
bool "Require passkey entry on the keyboard to complete pairing"
default n
select RING_BUFFER

# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI
config BT_TINYCRYPT_ECC
default y if BT_HCI && !BT_CTLR
Expand Down Expand Up @@ -180,11 +195,6 @@ config BT_GATT_AUTO_SEC_REQ
config BT_DEVICE_APPEARANCE
default 961

config ZMK_BLE_PASSKEY_ENTRY
bool "Require passkey entry on the keyboard to complete pairing"
default n
select RING_BUFFER

config BT_PERIPHERAL_PREF_MIN_INT
default 6

Expand Down
9 changes: 5 additions & 4 deletions docs/docs/config/bluetooth.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ See [Configuration Overview](index.md) for instructions on how to change these s

## Kconfig

| Option | Type | Description | Default |
| ------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts) | n |
| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y |
| Option | Type | Description | Default |
| ------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| `CONFIG_ZMK_BLE_BETA_TESTING` | bool | Enables a combination of settings that are planned to be default in future versions of ZMK. This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry, and allowing overwrite of keys from previously paired hosts. | n |
| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts) | n |
| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y |

0 comments on commit 5b2a5f7

Please sign in to comment.