diff --git a/CHANGELOG.md b/CHANGELOG.md index 02cfa9fc7..4959fe715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - GAP: allow use of own address type different from gap_random_set_mode() incl. RPA in LE Extended Advertising - SM: abort pairing with invalid parameter error for encryption key size > 16 - SM: ignore Security Request after re-encryption has started +- SM: respond to Pairing Request after Identity Resolution failed - ATT Server: support delayed read responses for registered services - ATT Server: allow to start crypto operation from delayed att read/write request - HFP: use round robin for outgoing connections diff --git a/src/ble/sm.c b/src/ble/sm.c index b29ace68a..88a1f3fb2 100644 --- a/src/ble/sm.c +++ b/src/ble/sm.c @@ -1332,6 +1332,7 @@ static void sm_address_resolution_handle_event(address_resolution_event_t event) sm_connection->sm_engine_state = SM_RESPONDER_PH0_RECEIVED_LTK_REQUEST; break; } + // Pairing request before, continue if (sm_connection->sm_engine_state == SM_RESPONDER_PH1_PAIRING_REQUEST_RECEIVED_W4_IRK){ sm_connection->sm_engine_state = SM_RESPONDER_PH1_PAIRING_REQUEST_RECEIVED; break; @@ -1404,6 +1405,11 @@ static void sm_address_resolution_handle_event(address_resolution_event_t event) if (sm_connection->sm_engine_state == SM_RESPONDER_PH0_RECEIVED_LTK_W4_IRK){ sm_connection->sm_engine_state = SM_RESPONDER_PH0_SEND_LTK_REQUESTED_NEGATIVE_REPLY; } + // Pairing request before, continue + if (sm_connection->sm_engine_state == SM_RESPONDER_PH1_PAIRING_REQUEST_RECEIVED_W4_IRK){ + sm_connection->sm_engine_state = SM_RESPONDER_PH1_PAIRING_REQUEST_RECEIVED; + break; + } // send security request if requested bool trigger_security_request = sm_connection->sm_pairing_requested || sm_slave_request_security; sm_connection->sm_pairing_requested = false;