Skip to content

Commit

Permalink
ble: always call ble_gap_security_initiate() on establishing connection
Browse files Browse the repository at this point in the history
Reverts 61e32f0 for android issues
  • Loading branch information
JamieDriver committed Nov 26, 2024
1 parent 8dae92c commit 5853368
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions main/ble/ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5853368

Please sign in to comment.