From bc7b4b56bd66c61d8e90cd25e64b2309e329f833 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 4 Jan 2024 00:22:04 +0000 Subject: [PATCH] fix(ble): Disable Auto Sec Req again. * Auto security request actually makes macOS worse, so disable it, and remove our early request in favor of using GATT enforcement to ensure connections are secured. --- app/Kconfig | 1 - app/src/ble.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index a5fa54f6..a737ba73 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -144,7 +144,6 @@ if ZMK_BLE config ZMK_BLE_EXPERIMENTAL_CONN bool "Experimental BLE connection changes" - imply BT_GATT_AUTO_SEC_REQ help Enables a combination of settings that are planned to be default in future versions of ZMK to improve connection stability. This includes changes to timing on BLE pairing initation, diff --git a/app/src/ble.c b/app/src/ble.c index fa7d3f55..e0f34307 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -460,12 +460,6 @@ static void connected(struct bt_conn *conn, uint8_t err) { LOG_DBG("Connected %s", addr); -#if !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ) - if (bt_conn_set_security(conn, BT_SECURITY_L2)) { - LOG_ERR("Failed to set security"); - } -#endif // !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ) - update_advertising(); if (is_conn_active_profile(conn)) {