mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/ble_comfirm_reply_not_work_#12881' into 'master'
component/bt: Added the esp_ble_passkey_reply BTC_GAP_BLE_PASSKEY_REPLY_EVT &BTC… See merge request !793
This commit is contained in:
commit
636d2b384e
@ -907,16 +907,14 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
|
|||||||
arg->cfg_scan_rsp_data_raw.raw_scan_rsp_len,
|
arg->cfg_scan_rsp_data_raw.raw_scan_rsp_len,
|
||||||
btc_scan_rsp_data_raw_callback);
|
btc_scan_rsp_data_raw_callback);
|
||||||
break;
|
break;
|
||||||
case BTC_GAP_BLE_SET_ENCRYPTION_EVT: {
|
|
||||||
#if (SMP_INCLUDED == TRUE)
|
#if (SMP_INCLUDED == TRUE)
|
||||||
|
case BTC_GAP_BLE_SET_ENCRYPTION_EVT: {
|
||||||
BD_ADDR bd_addr;
|
BD_ADDR bd_addr;
|
||||||
memcpy(bd_addr, arg->set_encryption.bd_addr, sizeof(BD_ADDR));
|
memcpy(bd_addr, arg->set_encryption.bd_addr, sizeof(BD_ADDR));
|
||||||
BTA_DmSetEncryption(bd_addr, BT_TRANSPORT_LE, btc_set_encryption_callback,
|
BTA_DmSetEncryption(bd_addr, BT_TRANSPORT_LE, btc_set_encryption_callback,
|
||||||
(tBTA_DM_BLE_SEC_ACT)arg->set_encryption.sec_act);
|
(tBTA_DM_BLE_SEC_ACT)arg->set_encryption.sec_act);
|
||||||
#endif ///SMP_INCLUDED == TRUE
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case BTC_GAP_BLE_SET_SECURITY_PARAM_EVT: {
|
case BTC_GAP_BLE_SET_SECURITY_PARAM_EVT: {
|
||||||
switch(arg->set_security_param.param_type) {
|
switch(arg->set_security_param.param_type) {
|
||||||
case ESP_BLE_SM_PASSKEY:
|
case ESP_BLE_SM_PASSKEY:
|
||||||
@ -957,14 +955,25 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTC_GAP_BLE_SECURITY_RSP_EVT: {
|
case BTC_GAP_BLE_SECURITY_RSP_EVT: {
|
||||||
#if (SMP_INCLUDED == TRUE)
|
|
||||||
BD_ADDR bd_addr;
|
BD_ADDR bd_addr;
|
||||||
tBTA_DM_BLE_SEC_GRANT res = arg->sec_rsp.accept ? BTA_DM_SEC_GRANTED : BTA_DM_SEC_PAIR_NOT_SPT;
|
tBTA_DM_BLE_SEC_GRANT res = arg->sec_rsp.accept ? BTA_DM_SEC_GRANTED : BTA_DM_SEC_PAIR_NOT_SPT;
|
||||||
memcpy(bd_addr, arg->sec_rsp.bd_addr, sizeof(BD_ADDR));
|
memcpy(bd_addr, arg->sec_rsp.bd_addr, sizeof(BD_ADDR));
|
||||||
BTA_DmBleSecurityGrant(bd_addr, res);
|
BTA_DmBleSecurityGrant(bd_addr, res);
|
||||||
break;
|
break;
|
||||||
#endif ///SMP_INCLUDED == TRUE
|
|
||||||
}
|
}
|
||||||
|
case BTC_GAP_BLE_PASSKEY_REPLY_EVT: {
|
||||||
|
BD_ADDR bd_addr;
|
||||||
|
memcpy(bd_addr, arg->enc_passkey_replay.bd_addr, sizeof(BD_ADDR));
|
||||||
|
BTA_DmBlePasskeyReply(bd_addr, arg->enc_passkey_replay.accept, arg->enc_passkey_replay.passkey);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BTC_GAP_BLE_CONFIRM_REPLY_EVT: {
|
||||||
|
BD_ADDR bd_addr;
|
||||||
|
memcpy(bd_addr, arg->enc_comfirm_replay.bd_addr, sizeof(BD_ADDR));
|
||||||
|
BTA_DmBleConfirmReply(bd_addr, arg->enc_comfirm_replay.accept);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif ///SMP_INCLUDED == TRUE
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user