From 7c798822fb13c6056d16e2dcd44b44f676673161 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 30 Nov 2023 06:48:35 +0000 Subject: [PATCH] feat(ble): Make it possible to use BT_GATT_AUTO_SEC_REQ * Only upgrade security of new connections if BT_GATT_AUTO_SEC_REQ is not enabled. --- app/src/ble.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/ble.c b/app/src/ble.c index fdbde81dabd..c0f7c2ca5c9 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -445,9 +445,11 @@ 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();