mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
remove(bt/bluedroid): Remove unused macro BT_SSP_INCLUDED and global
variable bte_bt_appl_cfg
This commit is contained in:
parent
0df585dc35
commit
4b35ac5c2d
@ -311,7 +311,6 @@ esp_err_t esp_bt_gap_pin_reply(esp_bd_addr_t bd_addr, bool accept, uint8_t pin_c
|
||||
btc_gap_bt_arg_deep_free) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
|
||||
}
|
||||
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
esp_err_t esp_bt_gap_set_security_param(esp_bt_sp_param_t param_type,
|
||||
void *value, uint8_t len)
|
||||
{
|
||||
@ -385,8 +384,6 @@ esp_err_t esp_bt_gap_ssp_confirm_reply(esp_bd_addr_t bd_addr, bool accept)
|
||||
btc_gap_bt_arg_deep_free) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
|
||||
}
|
||||
|
||||
#endif /*(BT_SSP_INCLUDED == TRUE)*/
|
||||
|
||||
esp_err_t esp_bt_gap_set_afh_channels(esp_bt_gap_afh_channels channels)
|
||||
{
|
||||
btc_msg_t msg;
|
||||
|
@ -709,7 +709,6 @@ esp_err_t esp_bt_gap_set_pin(esp_bt_pin_type_t pin_type, uint8_t pin_code_len, e
|
||||
*/
|
||||
esp_err_t esp_bt_gap_pin_reply(esp_bd_addr_t bd_addr, bool accept, uint8_t pin_code_len, esp_bt_pin_code_t pin_code);
|
||||
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
/**
|
||||
* @brief Set a GAP security parameter value. Overrides the default value.
|
||||
*
|
||||
@ -758,8 +757,6 @@ esp_err_t esp_bt_gap_ssp_passkey_reply(esp_bd_addr_t bd_addr, bool accept, uint3
|
||||
*/
|
||||
esp_err_t esp_bt_gap_ssp_confirm_reply(esp_bd_addr_t bd_addr, bool accept);
|
||||
|
||||
#endif /*(BT_SSP_INCLUDED == TRUE)*/
|
||||
|
||||
/**
|
||||
* @brief Set the AFH channels
|
||||
*
|
||||
|
@ -75,10 +75,8 @@ static void bta_dm_acl_link_stat_cback(tBTM_ACL_LINK_STAT_EVENT_DATA *p_data);
|
||||
static void bta_dm_policy_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id, BD_ADDR peer_addr);
|
||||
|
||||
/* Extended Inquiry Response */
|
||||
#if (BT_SSP_INCLUDED == TRUE && SMP_INCLUDED == TRUE)
|
||||
static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data);
|
||||
#endif /* (BT_SSP_INCLUDED == TRUE) */
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data);
|
||||
static void bta_dm_set_eir (char *local_name);
|
||||
#endif
|
||||
#if (SDP_INCLUDED == TRUE)
|
||||
@ -230,7 +228,7 @@ const tBTM_APPL_INFO bta_security = {
|
||||
&bta_dm_new_link_key_cback,
|
||||
&bta_dm_authentication_complete_cback,
|
||||
&bta_dm_bond_cancel_complete_cback,
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
&bta_dm_sp_cback,
|
||||
#else
|
||||
NULL,
|
||||
@ -1406,7 +1404,7 @@ static void bta_dm_policy_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
void bta_dm_confirm(tBTA_DM_MSG *p_data)
|
||||
{
|
||||
tBTM_STATUS res = BTM_NOT_AUTHORIZED;
|
||||
@ -1416,7 +1414,6 @@ void bta_dm_confirm(tBTA_DM_MSG *p_data)
|
||||
}
|
||||
BTM_ConfirmReqReply(res, p_data->confirm.bd_addr);
|
||||
}
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -1428,7 +1425,6 @@ void bta_dm_confirm(tBTA_DM_MSG *p_data)
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (SMP_INCLUDED == TRUE && BT_SSP_INCLUDED)
|
||||
void bta_dm_key_req(tBTA_DM_MSG *p_data)
|
||||
{
|
||||
tBTM_STATUS res = BTM_NOT_AUTHORIZED;
|
||||
@ -1438,7 +1434,7 @@ void bta_dm_key_req(tBTA_DM_MSG *p_data)
|
||||
}
|
||||
BTM_PasskeyReqReply(res, p_data->key_req.bd_addr, p_data->key_req.passkey);
|
||||
}
|
||||
#endif ///SMP_INCLUDED == TRUE && BT_SSP_INCLUDED
|
||||
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -2967,7 +2963,6 @@ static UINT8 bta_dm_authorize_cback (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NA
|
||||
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_dm_pinname_cback
|
||||
@ -3019,7 +3014,6 @@ static UINT8 bta_dm_authorize_cback (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NA
|
||||
bta_dm_cb.p_sec_cback(event, &sec_event);
|
||||
}
|
||||
}
|
||||
#endif /// BT_SSP_INCLUDED == TRUE
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -3142,7 +3136,7 @@ static UINT8 bta_dm_authentication_complete_cback(BD_ADDR bd_addr, DEV_CLASS dev
|
||||
return BTM_SUCCESS;
|
||||
}
|
||||
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_dm_sp_cback
|
||||
@ -3166,11 +3160,9 @@ static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data)
|
||||
/* TODO_SP */
|
||||
switch (event) {
|
||||
case BTM_SP_IO_REQ_EVT:
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
/* translate auth_req */
|
||||
bta_dm_co_io_req(p_data->io_req.bd_addr, &p_data->io_req.io_cap,
|
||||
&p_data->io_req.oob_data, &p_data->io_req.auth_req, p_data->io_req.is_orig);
|
||||
#endif
|
||||
#if BTM_OOB_INCLUDED == FALSE
|
||||
status = BTM_SUCCESS;
|
||||
#endif
|
||||
@ -3178,10 +3170,8 @@ static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data)
|
||||
APPL_TRACE_EVENT("io mitm: %d oob_data:%d", p_data->io_req.auth_req, p_data->io_req.oob_data);
|
||||
break;
|
||||
case BTM_SP_IO_RSP_EVT:
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
bta_dm_co_io_rsp(p_data->io_rsp.bd_addr, p_data->io_rsp.io_cap,
|
||||
p_data->io_rsp.oob_data, p_data->io_rsp.auth_req );
|
||||
#endif
|
||||
break;
|
||||
|
||||
case BTM_SP_CFM_REQ_EVT:
|
||||
@ -3193,12 +3183,10 @@ static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data)
|
||||
sec_event.cfm_req.rmt_io_caps = p_data->cfm_req.rmt_io_caps;
|
||||
|
||||
/* continue to next case */
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
/* Passkey entry mode, mobile device with output capability is very
|
||||
unlikely to receive key request, so skip this event */
|
||||
case BTM_SP_KEY_REQ_EVT:
|
||||
case BTM_SP_KEY_NOTIF_EVT:
|
||||
#endif
|
||||
if (BTM_SP_CFM_REQ_EVT == event) {
|
||||
/* Due to the switch case falling through below to BTM_SP_KEY_NOTIF_EVT,
|
||||
call remote name request using values from cfm_req */
|
||||
@ -3315,7 +3303,7 @@ static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data)
|
||||
APPL_TRACE_EVENT("dm status: %d", status);
|
||||
return status;
|
||||
}
|
||||
#endif /* (BT_SSP_INCLUDED == TRUE) */
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
|
||||
@ -4741,7 +4729,6 @@ static UINT8 bta_dm_ble_smp_cback (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_D
|
||||
memset(&sec_event, 0, sizeof(tBTA_DM_SEC));
|
||||
switch (event) {
|
||||
case BTM_LE_IO_REQ_EVT: {
|
||||
// #if (BT_SSP_INCLUDED == TRUE)
|
||||
bta_dm_co_ble_io_req(bda,
|
||||
&p_data->io_req.io_cap,
|
||||
&p_data->io_req.oob_data,
|
||||
@ -4749,7 +4736,6 @@ static UINT8 bta_dm_ble_smp_cback (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_D
|
||||
&p_data->io_req.max_key_size,
|
||||
&p_data->io_req.init_keys,
|
||||
&p_data->io_req.resp_keys);
|
||||
// #endif
|
||||
#if BTM_OOB_INCLUDED == FALSE
|
||||
status = BTM_SUCCESS;
|
||||
#endif
|
||||
|
@ -802,7 +802,7 @@ void BTA_DmSecureConnectionCreateOobData(void)
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
void BTA_DmConfirm(BD_ADDR bd_addr, BOOLEAN accept)
|
||||
{
|
||||
tBTA_DM_API_CONFIRM *p_msg;
|
||||
@ -825,7 +825,6 @@ void BTA_DmConfirm(BD_ADDR bd_addr, BOOLEAN accept)
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
void BTA_DmPasskeyReqReply(BOOLEAN accept, BD_ADDR bd_addr, UINT32 passkey)
|
||||
{
|
||||
tBTA_DM_API_KEY_REQ *p_msg;
|
||||
@ -837,8 +836,7 @@ void BTA_DmPasskeyReqReply(BOOLEAN accept, BD_ADDR bd_addr, UINT32 passkey)
|
||||
bta_sys_sendmsg(p_msg);
|
||||
}
|
||||
}
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmAddDevice
|
||||
|
@ -54,14 +54,8 @@ tBTE_APPL_CFG bte_appl_cfg = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if (defined CLASSIC_BT_INCLUDED && CLASSIC_BT_INCLUDED == TRUE && BT_SSP_INCLUDED == TRUE)
|
||||
#include "common/bte_appl.h"
|
||||
#if (defined CLASSIC_BT_INCLUDED && CLASSIC_BT_INCLUDED == TRUE)
|
||||
#include "btm_int.h"
|
||||
tBTE_BT_APPL_CFG bte_bt_appl_cfg = {
|
||||
0, //Todo, Authentication requirements
|
||||
BTM_LOCAL_IO_CAPS,
|
||||
NULL, //Todo, OOB data
|
||||
};
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
@ -97,21 +91,22 @@ BOOLEAN bta_dm_co_get_compress_memory(tBTA_SYS_ID id, UINT8 **memory_p, UINT32 *
|
||||
** - other : failed
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
esp_err_t bta_dm_co_bt_set_io_cap(UINT8 bt_io_cap)
|
||||
{
|
||||
esp_err_t ret = ESP_BT_STATUS_SUCCESS;
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
|
||||
if(bt_io_cap < BTM_IO_CAP_MAX ) {
|
||||
bte_bt_appl_cfg.bt_io_cap = bt_io_cap;
|
||||
btm_cb.devcb.loc_io_caps = bt_io_cap;
|
||||
ret = ESP_BT_STATUS_SUCCESS;
|
||||
} else {
|
||||
ret = ESP_BT_STATUS_FAIL;
|
||||
APPL_TRACE_ERROR("%s error:Invalid io cap value.",__func__);
|
||||
}
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
@ -90,12 +90,12 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
|
||||
#endif /* #if (BTA_DM_QOS_INCLUDED == TRUE) */
|
||||
/* simple pairing events */
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
bta_dm_confirm, /* BTA_DM_API_CONFIRM_EVT */
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
bta_dm_key_req, /* BTA_DM_API_KEY_REQ_EVT */
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
bta_dm_set_encryption, /* BTA_DM_API_SET_ENCRYPTION_EVT */
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
#endif /* (SMP_INCLUDED == TRUE) */
|
||||
#if (BTM_OOB_INCLUDED == TRUE && SMP_INCLUDED == TRUE)
|
||||
bta_dm_loc_oob, /* BTA_DM_API_LOC_OOB_EVT */
|
||||
bta_dm_oob_reply, /* BTA_DM_API_OOB_REPLY_EVT */
|
||||
|
@ -85,13 +85,13 @@ enum {
|
||||
BTA_DM_API_QOS_SET_EVT,
|
||||
#endif /* #if (BTA_DM_QOS_INCLUDED == TRUE) */
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/* simple pairing events */
|
||||
BTA_DM_API_CONFIRM_EVT,
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
BTA_DM_API_KEY_REQ_EVT,
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
BTA_DM_API_SET_ENCRYPTION_EVT,
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
#endif /* (SMP_INCLUDED == TRUE) */
|
||||
#if (BTM_OOB_INCLUDED == TRUE && SMP_INCLUDED == TRUE)
|
||||
BTA_DM_API_LOC_OOB_EVT,
|
||||
BTA_DM_API_OOB_REPLY_EVT,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -451,10 +451,9 @@ static void btc_dm_pin_req_evt(tBTA_DM_PIN_REQ *p_pin_req)
|
||||
#endif /// BTC_GAP_BT_INCLUDED == TRUE
|
||||
}
|
||||
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
static void btc_dm_sp_cfm_req_evt(tBTA_DM_SP_CFM_REQ *p_cfm_req)
|
||||
{
|
||||
#if (BTC_GAP_BT_INCLUDED == TRUE)
|
||||
if (p_cfm_req->just_works) {
|
||||
// just work, not show to users.
|
||||
BTA_DmConfirm(p_cfm_req->bd_addr, true);
|
||||
@ -483,12 +482,10 @@ static void btc_dm_sp_cfm_req_evt(tBTA_DM_SP_CFM_REQ *p_cfm_req)
|
||||
if (ret != BT_STATUS_SUCCESS) {
|
||||
BTC_TRACE_ERROR("%s btc_inter_profile_call failed\n", __func__);
|
||||
}
|
||||
#endif /// BTC_GAP_BT_INCLUDED == TRUE
|
||||
}
|
||||
|
||||
static void btc_dm_sp_key_notif_evt(tBTA_DM_SP_KEY_NOTIF *p_key_notif)
|
||||
{
|
||||
#if (BTC_GAP_BT_INCLUDED == TRUE)
|
||||
esp_bt_gap_cb_param_t param;
|
||||
bt_status_t ret;
|
||||
btc_msg_t *msg;
|
||||
@ -511,12 +508,10 @@ static void btc_dm_sp_key_notif_evt(tBTA_DM_SP_KEY_NOTIF *p_key_notif)
|
||||
if (ret != BT_STATUS_SUCCESS) {
|
||||
BTC_TRACE_ERROR("%s btc_inter_profile_call failed\n", __func__);
|
||||
}
|
||||
#endif /// BTC_GAP_BT_INCLUDED == TRUE
|
||||
}
|
||||
|
||||
static void btc_dm_sp_key_req_evt(tBTA_DM_SP_KEY_REQ *p_key_req)
|
||||
{
|
||||
#if (BTC_GAP_BT_INCLUDED == TRUE)
|
||||
esp_bt_gap_cb_param_t param;
|
||||
bt_status_t ret;
|
||||
btc_msg_t *msg;
|
||||
@ -538,9 +533,8 @@ static void btc_dm_sp_key_req_evt(tBTA_DM_SP_KEY_REQ *p_key_req)
|
||||
if (ret != BT_STATUS_SUCCESS) {
|
||||
BTC_TRACE_ERROR("%s btc_inter_profile_call failed\n", __func__);
|
||||
}
|
||||
#endif /// BTC_GAP_BT_INCLUDED == TRUE
|
||||
}
|
||||
#endif /// BT_SSP_INCLUDED == TRUE
|
||||
#endif /// CLASSIC_BT_INCLUDED == TRUE
|
||||
|
||||
static void btc_dm_dev_unpaired_evt(tBTA_DM_LINK_DOWN *p_link_down)
|
||||
{
|
||||
@ -773,7 +767,7 @@ void btc_dm_sec_cb_handler(btc_msg_t *msg)
|
||||
case BTA_DM_BOND_CANCEL_CMPL_EVT:
|
||||
BTC_TRACE_DEBUG("BTA_DM_BOND_CANCEL_CMPL_EVT");
|
||||
break;
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
case BTA_DM_SP_CFM_REQ_EVT:
|
||||
btc_dm_sp_cfm_req_evt(&p_data->cfm_req);
|
||||
break;
|
||||
@ -783,14 +777,15 @@ void btc_dm_sec_cb_handler(btc_msg_t *msg)
|
||||
case BTA_DM_SP_KEY_REQ_EVT:
|
||||
btc_dm_sp_key_req_evt(&p_data->key_req);
|
||||
break;
|
||||
case BTA_DM_SP_RMT_OOB_EVT:
|
||||
BTC_TRACE_DEBUG("BTA_DM_SP_RMT_OOB_EVT");
|
||||
break;
|
||||
case BTA_DM_SP_KEYPRESS_EVT:
|
||||
BTC_TRACE_DEBUG("BTA_DM_SP_KEYPRESS_EVT");
|
||||
break;
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
#if BTM_OOB_INCLUDED == TRUE
|
||||
case BTA_DM_SP_RMT_OOB_EVT:
|
||||
BTC_TRACE_DEBUG("BTA_DM_SP_RMT_OOB_EVT");
|
||||
break;
|
||||
#endif /* BTM_OOB_INCLUDED == TRUE */
|
||||
case BTA_DM_ACL_LINK_STAT_EVT: {
|
||||
btc_dm_acl_link_stat(&p_data->acl_link_stat);
|
||||
break;
|
||||
|
@ -652,7 +652,6 @@ static void btc_gap_bt_pin_reply(btc_gap_bt_args_t *arg){
|
||||
BTA_DmPinReply(arg->pin_reply.bda.address, arg->pin_reply.accept, arg->pin_reply.pin_code_len, arg->pin_reply.pin_code);
|
||||
}
|
||||
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
static esp_err_t btc_gap_bt_set_security_param(btc_gap_bt_args_t *arg)
|
||||
{
|
||||
esp_err_t ret;
|
||||
@ -681,8 +680,6 @@ static void btc_gap_bt_ssp_confirm(btc_gap_bt_args_t *arg)
|
||||
BTA_DmConfirm(arg->confirm_reply.bda.address, arg->confirm_reply.accept);
|
||||
}
|
||||
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
|
||||
static void btc_gap_bt_config_eir(btc_gap_bt_args_t *arg)
|
||||
{
|
||||
tBTA_DM_EIR_CONF eir_config;
|
||||
@ -848,7 +845,6 @@ void btc_gap_bt_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src)
|
||||
case BTC_GAP_BT_ACT_SET_PAGE_TIMEOUT:
|
||||
case BTC_GAP_BT_ACT_GET_PAGE_TIMEOUT:
|
||||
break;
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
case BTC_GAP_BT_ACT_PASSKEY_REPLY:
|
||||
case BTC_GAP_BT_ACT_CONFIRM_REPLY:
|
||||
break;
|
||||
@ -865,7 +861,6 @@ void btc_gap_bt_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src)
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
|
||||
case BTC_GAP_BT_ACT_CONFIG_EIR:{
|
||||
btc_gap_bt_args_t *src = (btc_gap_bt_args_t *)p_src;
|
||||
@ -916,7 +911,6 @@ void btc_gap_bt_arg_deep_free(btc_msg_t *msg)
|
||||
case BTC_GAP_BT_ACT_SET_PAGE_TIMEOUT:
|
||||
case BTC_GAP_BT_ACT_GET_PAGE_TIMEOUT:
|
||||
break;
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
case BTC_GAP_BT_ACT_PASSKEY_REPLY:
|
||||
case BTC_GAP_BT_ACT_CONFIRM_REPLY:
|
||||
break;
|
||||
@ -925,7 +919,6 @@ void btc_gap_bt_arg_deep_free(btc_msg_t *msg)
|
||||
osi_free(arg->set_security_param.value);
|
||||
}
|
||||
break;
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
|
||||
case BTC_GAP_BT_ACT_CONFIG_EIR:
|
||||
if (arg->config_eir.eir_data.p_manufacturer_data) {
|
||||
@ -986,7 +979,6 @@ void btc_gap_bt_call_handler(btc_msg_t *msg)
|
||||
btc_gap_bt_pin_reply(arg);
|
||||
break;
|
||||
}
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
case BTC_GAP_BT_ACT_SET_SECURITY_PARAM:{
|
||||
btc_gap_bt_set_security_param(arg);
|
||||
break;
|
||||
@ -999,7 +991,6 @@ void btc_gap_bt_call_handler(btc_msg_t *msg)
|
||||
btc_gap_bt_ssp_confirm(arg);
|
||||
break;
|
||||
}
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
case BTC_GAP_BT_ACT_CONFIG_EIR: {
|
||||
btc_gap_bt_config_eir(arg);
|
||||
break;
|
||||
@ -1069,11 +1060,9 @@ void btc_gap_bt_cb_deep_free(btc_msg_t *msg)
|
||||
case BTC_GAP_BT_QOS_EVT:
|
||||
case BTC_GAP_BT_SET_PAGE_TO_EVT:
|
||||
case BTC_GAP_BT_GET_PAGE_TO_EVT:
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
case BTC_GAP_BT_CFM_REQ_EVT:
|
||||
case BTC_GAP_BT_KEY_NOTIF_EVT:
|
||||
case BTC_GAP_BT_KEY_REQ_EVT:
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
#if (BTC_DM_PM_INCLUDED == TRUE)
|
||||
case BTC_GAP_BT_MODE_CHG_EVT:
|
||||
#endif /// BTC_DM_PM_INCLUDED == TRUE
|
||||
@ -1115,7 +1104,6 @@ void btc_gap_bt_cb_handler(btc_msg_t *msg)
|
||||
btc_gap_bt_cb_to_app(ESP_BT_GAP_PIN_REQ_EVT, (esp_bt_gap_cb_param_t *)msg->arg);
|
||||
break;
|
||||
}
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
case BTC_GAP_BT_CFM_REQ_EVT:{
|
||||
btc_gap_bt_cb_to_app(ESP_BT_GAP_CFM_REQ_EVT, (esp_bt_gap_cb_param_t *)msg->arg);
|
||||
break;
|
||||
@ -1128,7 +1116,6 @@ void btc_gap_bt_cb_handler(btc_msg_t *msg)
|
||||
btc_gap_bt_cb_to_app(ESP_BT_GAP_KEY_REQ_EVT, (esp_bt_gap_cb_param_t *)msg->arg);
|
||||
break;
|
||||
}
|
||||
#endif ///BT_SSP_INCLUDED == TRUE
|
||||
case BTC_GAP_BT_SET_AFH_CHANNELS_EVT:{
|
||||
btc_gap_bt_cb_to_app(ESP_BT_GAP_SET_AFH_CHANNELS_EVT, (esp_bt_gap_cb_param_t *)msg->arg);
|
||||
break;
|
||||
|
@ -52,7 +52,6 @@
|
||||
******************************************************************************/
|
||||
#if (UC_BT_CLASSIC_ENABLED == TRUE)
|
||||
#define CLASSIC_BT_INCLUDED TRUE
|
||||
#define BT_SSP_INCLUDED TRUE
|
||||
#define BTC_SM_INCLUDED TRUE
|
||||
#define BTC_PRF_QUEUE_INCLUDED TRUE
|
||||
#define BTC_GAP_BT_INCLUDED TRUE
|
||||
@ -1422,19 +1421,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
**
|
||||
** BT_SSP
|
||||
**
|
||||
******************************************************************************/
|
||||
#ifndef BT_SSP_INCLUDED
|
||||
#define BT_SSP_INCLUDED FALSE
|
||||
#endif
|
||||
|
||||
#if BT_SSP_INCLUDED == TRUE && CLASSIC_BT_INCLUDED == FALSE
|
||||
#error "Can't have SSP without CLASSIC BT"
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
**
|
||||
** SDP
|
||||
|
@ -39,14 +39,3 @@ typedef struct {
|
||||
} tBTE_APPL_CFG;
|
||||
|
||||
extern tBTE_APPL_CFG bte_appl_cfg;
|
||||
|
||||
|
||||
typedef struct {
|
||||
#if ((CLASSIC_BT_INCLUDED == TRUE) && (BT_SSP_INCLUDED == TRUE))
|
||||
UINT8 bt_auth_req;
|
||||
UINT8 bt_io_cap;
|
||||
UINT8 *bt_oob_auth_data;
|
||||
#endif
|
||||
} tBTE_BT_APPL_CFG;
|
||||
|
||||
extern tBTE_BT_APPL_CFG bte_bt_appl_cfg;
|
||||
|
@ -174,14 +174,9 @@ static void start_up(void)
|
||||
// it told us it supports. We need to do this first before we request the
|
||||
// next page, because the controller's response for page 1 may be
|
||||
// dependent on what we configure from page 0 and host SSP configuration
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
controller_param.simple_pairing_supported = HCI_SIMPLE_PAIRING_SUPPORTED(
|
||||
controller_param.features_classic[0].as_array) &&
|
||||
(bluedriod_config_get()->get_ssp_enabled());
|
||||
#else
|
||||
controller_param.simple_pairing_supported = false;
|
||||
#endif
|
||||
|
||||
if (controller_param.simple_pairing_supported) {
|
||||
response = AWAIT_COMMAND(controller_param.packet_factory->make_write_simple_pairing_mode(HCI_SP_MODE_ENABLED));
|
||||
controller_param.packet_parser->parse_generic_command_complete(response);
|
||||
|
@ -1554,7 +1554,7 @@ void BTM_ConfirmReqReply(tBTM_STATUS res, BD_ADDR bd_addr)
|
||||
** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (BT_SSP_INCLUDED == TRUE && SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
void BTM_PasskeyReqReply(tBTM_STATUS res, BD_ADDR bd_addr, UINT32 passkey)
|
||||
{
|
||||
#if (BT_USE_TRACES == TRUE && SMP_INCLUDED == TRUE)
|
||||
@ -1602,7 +1602,7 @@ void BTM_PasskeyReqReply(tBTM_STATUS res, BD_ADDR bd_addr, UINT32 passkey)
|
||||
btsnd_hcic_user_passkey_reply (bd_addr, passkey);
|
||||
}
|
||||
}
|
||||
#endif ///BT_SSP_INCLUDED == TRUE && SMP_INCLUDED == TRUE
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -1618,7 +1618,7 @@ void BTM_PasskeyReqReply(tBTM_STATUS res, BD_ADDR bd_addr, UINT32 passkey)
|
||||
** type - notification type
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (BT_SSP_INCLUDED == TRUE && SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
void BTM_SendKeypressNotif(BD_ADDR bd_addr, tBTM_SP_KEY_TYPE type)
|
||||
{
|
||||
/* This API only make sense between PASSKEY_REQ and SP complete */
|
||||
@ -1626,7 +1626,7 @@ void BTM_SendKeypressNotif(BD_ADDR bd_addr, tBTM_SP_KEY_TYPE type)
|
||||
btsnd_hcic_send_keypress_notif (bd_addr, type);
|
||||
}
|
||||
}
|
||||
#endif ///BT_SSP_INCLUDED == TRUE && SMP_INCLUDED == TRUE
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
|
||||
#if BTM_OOB_INCLUDED == TRUE && SMP_INCLUDED == TRUE
|
||||
/*******************************************************************************
|
||||
@ -3515,6 +3515,7 @@ void btm_io_capabilities_rsp (UINT8 *p)
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
void btm_proc_sp_req_evt (tBTM_SP_EVT event, UINT8 *p)
|
||||
{
|
||||
tBTM_STATUS status = BTM_ERR_PROCESSING;
|
||||
@ -3576,12 +3577,10 @@ void btm_proc_sp_req_evt (tBTM_SP_EVT event, UINT8 *p)
|
||||
btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_AUTH_COMPLETE);
|
||||
break;
|
||||
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
case BTM_SP_KEY_REQ_EVT:
|
||||
/* HCI_USER_PASSKEY_REQUEST_EVT */
|
||||
btm_sec_change_pairing_state (BTM_PAIR_STATE_KEY_ENTRY);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (btm_cb.api.p_sp_callback) {
|
||||
@ -3598,12 +3597,9 @@ void btm_proc_sp_req_evt (tBTM_SP_EVT event, UINT8 *p)
|
||||
if (event == BTM_SP_CFM_REQ_EVT) {
|
||||
BTM_TRACE_DEBUG ("calling BTM_ConfirmReqReply with status: %d\n", status);
|
||||
BTM_ConfirmReqReply (status, p_bda);
|
||||
}
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
else if (event == BTM_SP_KEY_REQ_EVT) {
|
||||
} else if (event == BTM_SP_KEY_REQ_EVT) {
|
||||
BTM_PasskeyReqReply(status, p_bda, 0);
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
/* Something bad. we can only fail this connection */
|
||||
@ -3621,16 +3617,11 @@ void btm_proc_sp_req_evt (tBTM_SP_EVT event, UINT8 *p)
|
||||
if (NULL != (p_dev_rec = btm_find_dev (p_bda)) ) {
|
||||
btm_sec_disconnect (p_dev_rec->hci_handle, HCI_ERR_AUTH_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
else {
|
||||
} else {
|
||||
btsnd_hcic_user_passkey_neg_reply(p_bda);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btm_keypress_notif_evt
|
||||
@ -3727,6 +3718,7 @@ void btm_simple_pair_complete (UINT8 *p)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
|
||||
|
||||
@ -4934,12 +4926,12 @@ static void btm_sec_pairing_timeout (TIMER_LIST_ENT *p_tle)
|
||||
/* btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE); */
|
||||
break;
|
||||
|
||||
#if (BT_SSP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
case BTM_PAIR_STATE_KEY_ENTRY:
|
||||
btsnd_hcic_user_passkey_neg_reply(p_cb->pairing_bda);
|
||||
/* btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE); */
|
||||
break;
|
||||
#endif /* !BTM_IO_CAP_NONE */
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
|
||||
#if BTM_OOB_INCLUDED == TRUE
|
||||
case BTM_PAIR_STATE_WAIT_LOCAL_IOCAPS:
|
||||
|
@ -1185,9 +1185,11 @@ void btm_sec_rmt_name_request_complete (UINT8 *bd_addr, UINT8 *bd_name, UINT8 s
|
||||
void btm_sec_rmt_host_support_feat_evt (UINT8 *p);
|
||||
void btm_io_capabilities_req (UINT8 *p);
|
||||
void btm_io_capabilities_rsp (UINT8 *p);
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
void btm_proc_sp_req_evt (tBTM_SP_EVT event, UINT8 *p);
|
||||
void btm_keypress_notif_evt (UINT8 *p);
|
||||
void btm_simple_pair_complete (UINT8 *p);
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
void btm_sec_link_key_notification (UINT8 *p_bda, UINT8 *p_link_key, UINT8 key_type);
|
||||
void btm_sec_link_key_request (UINT8 *p_bda);
|
||||
void btm_sec_pin_code_request (UINT8 *p_bda);
|
||||
|
@ -97,22 +97,20 @@ static void btu_hcif_page_scan_rep_mode_chng_evt (void);
|
||||
static void btu_hcif_esco_connection_comp_evt(UINT8 *p);
|
||||
static void btu_hcif_esco_connection_chg_evt(UINT8 *p);
|
||||
|
||||
/* Simple Pairing Events */
|
||||
static void btu_hcif_host_support_evt (UINT8 *p);
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
/* Simple Pairing Events */
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
static void btu_hcif_io_cap_request_evt (UINT8 *p);
|
||||
static void btu_hcif_io_cap_response_evt (UINT8 *p);
|
||||
static void btu_hcif_user_conf_request_evt (UINT8 *p);
|
||||
static void btu_hcif_user_passkey_request_evt (UINT8 *p);
|
||||
static void btu_hcif_simple_pair_complete_evt (UINT8 *p);
|
||||
static void btu_hcif_user_passkey_notif_evt (UINT8 *p);
|
||||
static void btu_hcif_keypress_notif_evt (UINT8 *p);
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
#if BTM_OOB_INCLUDED == TRUE && SMP_INCLUDED == TRUE
|
||||
static void btu_hcif_rem_oob_request_evt (UINT8 *p);
|
||||
#endif
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
static void btu_hcif_simple_pair_complete_evt (UINT8 *p);
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
static void btu_hcif_link_supv_to_changed_evt (UINT8 *p);
|
||||
#if L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE
|
||||
static void btu_hcif_enhanced_flush_complete_evt (void);
|
||||
@ -307,7 +305,7 @@ void btu_hcif_process_event (UNUSED_ATTR UINT8 controller_id, BT_HDR *p_msg)
|
||||
case HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT:
|
||||
btu_hcif_host_support_evt (p);
|
||||
break;
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
case HCI_IO_CAPABILITY_REQUEST_EVT:
|
||||
btu_hcif_io_cap_request_evt (p);
|
||||
break;
|
||||
@ -320,13 +318,13 @@ void btu_hcif_process_event (UNUSED_ATTR UINT8 controller_id, BT_HDR *p_msg)
|
||||
case HCI_USER_PASSKEY_REQUEST_EVT:
|
||||
btu_hcif_user_passkey_request_evt (p);
|
||||
break;
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
#if BTM_OOB_INCLUDED == TRUE && SMP_INCLUDED == TRUE
|
||||
case HCI_REMOTE_OOB_DATA_REQUEST_EVT:
|
||||
btu_hcif_rem_oob_request_evt (p);
|
||||
break;
|
||||
#endif
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
case HCI_SIMPLE_PAIRING_COMPLETE_EVT:
|
||||
btu_hcif_simple_pair_complete_evt (p);
|
||||
break;
|
||||
@ -336,7 +334,7 @@ void btu_hcif_process_event (UNUSED_ATTR UINT8 controller_id, BT_HDR *p_msg)
|
||||
case HCI_KEYPRESS_NOTIFY_EVT:
|
||||
btu_hcif_keypress_notif_evt (p);
|
||||
break;
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
case HCI_LINK_SUPER_TOUT_CHANGED_EVT:
|
||||
btu_hcif_link_supv_to_changed_evt (p);
|
||||
break;
|
||||
@ -1848,7 +1846,7 @@ static void btu_hcif_host_support_evt (UINT8 *p)
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
static void btu_hcif_io_cap_request_evt (UINT8 *p)
|
||||
{
|
||||
btm_io_capabilities_req(p);
|
||||
@ -1898,6 +1896,20 @@ static void btu_hcif_user_passkey_request_evt (UINT8 *p)
|
||||
btm_proc_sp_req_evt(BTM_SP_KEY_REQ_EVT, p);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btu_hcif_simple_pair_complete_evt
|
||||
**
|
||||
** Description Process event HCI_SIMPLE_PAIRING_COMPLETE_EVT
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
static void btu_hcif_simple_pair_complete_evt (UINT8 *p)
|
||||
{
|
||||
btm_simple_pair_complete(p);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btu_hcif_user_passkey_notif_evt
|
||||
@ -1925,8 +1937,7 @@ static void btu_hcif_keypress_notif_evt (UINT8 *p)
|
||||
{
|
||||
btm_keypress_notif_evt(p);
|
||||
}
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
|
||||
#endif /* (CLASSIC_BT_INCLUDED == TRUE) */
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -1944,22 +1955,6 @@ static void btu_hcif_rem_oob_request_evt (UINT8 *p)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btu_hcif_simple_pair_complete_evt
|
||||
**
|
||||
** Description Process event HCI_SIMPLE_PAIRING_COMPLETE_EVT
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
static void btu_hcif_simple_pair_complete_evt (UINT8 *p)
|
||||
{
|
||||
btm_simple_pair_complete(p);
|
||||
}
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btu_hcif_link_supv_to_changed_evt
|
||||
|
Loading…
x
Reference in New Issue
Block a user