mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(ble/bluedroid): Fixed issue with resetting BLE security parameters during initialization
This commit is contained in:
parent
f36b6a088a
commit
c66da69856
@ -52,6 +52,18 @@ tBTE_APPL_CFG bte_appl_cfg = {
|
||||
BTM_BLE_ONLY_ACCEPT_SPECIFIED_SEC_AUTH_DISABLE,
|
||||
BTM_BLE_OOB_DISABLE,
|
||||
};
|
||||
|
||||
void bta_dm_co_security_param_init(void)
|
||||
{
|
||||
bte_appl_cfg.ble_auth_req = BTA_LE_AUTH_REQ_SC_MITM_BOND;
|
||||
bte_appl_cfg.ble_io_cap = BTM_LOCAL_IO_CAPS_BLE;
|
||||
bte_appl_cfg.ble_init_key = BTM_BLE_INITIATOR_KEY_SIZE;
|
||||
bte_appl_cfg.ble_resp_key = BTM_BLE_RESPONDER_KEY_SIZE;
|
||||
bte_appl_cfg.ble_max_key_size = BTM_BLE_MAX_KEY_SIZE;
|
||||
bte_appl_cfg.ble_min_key_size = BTM_BLE_MIN_KEY_SIZE;
|
||||
bte_appl_cfg.ble_accept_auth_enable = BTM_BLE_ONLY_ACCEPT_SPECIFIED_SEC_AUTH_DISABLE;
|
||||
bte_appl_cfg.oob_support = BTM_BLE_OOB_DISABLE;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if (defined CLASSIC_BT_INCLUDED && CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
@ -1779,6 +1779,9 @@ extern void bta_dm_ble_set_scan_rsp_raw (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_broadcast (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_set_data_length(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_update_duplicate_exceptional_list(tBTA_DM_MSG *p_data);
|
||||
#if SMP_INCLUDED == TRUE
|
||||
extern void bta_dm_co_security_param_init(void);
|
||||
#endif
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
extern void bta_dm_cfg_filter_cond (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_scan_filter_param_setup (tBTA_DM_MSG *p_data);
|
||||
|
@ -60,6 +60,7 @@ static void btc_init_bluetooth(void)
|
||||
#if (BLE_INCLUDED == TRUE)
|
||||
//load the ble local key which has been stored in the flash
|
||||
btc_dm_load_ble_local_keys();
|
||||
bta_dm_co_security_param_init();
|
||||
#endif ///BLE_INCLUDED == TRUE
|
||||
#endif /* #if (SMP_INCLUDED) */
|
||||
#if BTA_DYNAMIC_MEMORY
|
||||
|
Loading…
x
Reference in New Issue
Block a user