mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 05:04:33 +02:00
Component/bt: update con params is rejected in smp when reconnection
This commit is contained in:
@@ -331,7 +331,9 @@ void bta_gattc_co_cache_addr_init(void)
|
||||
cache_env.addr_fp = fp;
|
||||
// Read previously saved blob if available
|
||||
if ((err_code = nvs_get_blob(fp, cache_key, p_buf, &length)) != ESP_OK) {
|
||||
APPL_TRACE_ERROR("%s, Line = %d, nvs flash get blob data fail, err_code = %x", __func__, __LINE__, err_code);
|
||||
if(err_code != ESP_ERR_NVS_NOT_FOUND) {
|
||||
APPL_TRACE_ERROR("%s, Line = %d, nvs flash get blob data fail, err_code = 0x%x", __func__, __LINE__, err_code);
|
||||
}
|
||||
osi_free(p_buf);
|
||||
return;
|
||||
}
|
||||
|
@@ -4018,6 +4018,7 @@ void btm_sec_encrypt_change (UINT16 handle, UINT8 status, UINT8 encr_enable)
|
||||
#if BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE
|
||||
tACL_CONN *p_acl = NULL;
|
||||
UINT8 acl_idx = btm_handle_to_acl_index(handle);
|
||||
tGATT_TCB *p_tcb = NULL;
|
||||
#endif
|
||||
BTM_TRACE_EVENT ("Security Manager: encrypt_change status:%d State:%d, encr_enable = %d\n",
|
||||
status, (p_dev_rec) ? p_dev_rec->sec_state : 0, encr_enable);
|
||||
@@ -4045,6 +4046,11 @@ void btm_sec_encrypt_change (UINT16 handle, UINT8 status, UINT8 encr_enable)
|
||||
p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED;
|
||||
}
|
||||
} else {
|
||||
#if BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE
|
||||
if ((p_tcb = gatt_find_tcb_by_addr(p_dev_rec->ble.pseudo_addr, BT_TRANSPORT_LE)) == NULL) {
|
||||
//do nothing
|
||||
} else
|
||||
#endif
|
||||
p_dev_rec->sec_flags |= (BTM_SEC_LE_AUTHENTICATED | BTM_SEC_LE_ENCRYPTED);
|
||||
}
|
||||
}
|
||||
|
Submodule components/bt/lib updated: 34b64038d0...a3e98f8314
Reference in New Issue
Block a user