From 58533687f4b447d70c0d44c8d44030ee79fd823e Mon Sep 17 00:00:00 2001 From: "Jamie C. Driver" Date: Wed, 13 Nov 2024 17:00:20 +0000 Subject: [PATCH] ble: always call ble_gap_security_initiate() on establishing connection Reverts 61e32f047fdffbbbd689311cafcc785e5a43e1f3 for android issues --- main/ble/ble.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main/ble/ble.c b/main/ble/ble.c index fbd7bf14..88ac80c8 100644 --- a/main/ble/ble.c +++ b/main/ble/ble.c @@ -604,11 +604,9 @@ static int ble_gap_event(struct ble_gap_event* event, void* arg) JADE_ASSERT(rc == 0); ble_print_conn_desc(&desc); - // enable ble security if not already encrypted - if (!desc.sec_state.encrypted) { - rc = ble_gap_security_initiate(event->connect.conn_handle); - JADE_ASSERT(rc == 0); - } + // enable ble security + rc = ble_gap_security_initiate(event->connect.conn_handle); + JADE_ASSERT(rc == 0); } if (event->connect.status != 0) {