mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
fix(bt/bluedroid): Added peer Bluetooth device address into HF callback parameters
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef __ESP_HF_AG_API_H__
|
||||
#define __ESP_HF_AG_API_H__
|
||||
@@ -84,7 +76,7 @@ typedef enum
|
||||
typedef union
|
||||
{
|
||||
/**
|
||||
* @brief ESP_HS_CONNECTION_STATE_EVT
|
||||
* @brief ESP_HF_CONNECTION_STATE_EVT
|
||||
*/
|
||||
struct hf_conn_stat_param {
|
||||
esp_bd_addr_t remote_bda; /*!< Remote bluetooth device address */
|
||||
@@ -113,6 +105,7 @@ typedef union
|
||||
* @brief ESP_HF_VOLUME_CONTROL_EVT
|
||||
*/
|
||||
struct hf_volume_control_param {
|
||||
esp_bd_addr_t remote_addr; /*!< Remote bluetooth device address */
|
||||
esp_hf_volume_type_t type; /*!< Volume control target, speaker or microphone */
|
||||
int volume; /*!< Gain, ranges from 0 to 15 */
|
||||
} volume_control; /*!< AG callback param of ESP_HF_VOLUME_CONTROL_EVT */
|
||||
@@ -121,8 +114,9 @@ typedef union
|
||||
* @brief ESP_HF_UNAT_RESPOSNE_EVT
|
||||
*/
|
||||
struct hf_unat_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< Remote bluetooth device address */
|
||||
char *unat; /*!< Unknown AT command string */
|
||||
}unat_rep; /*!< AG callback param of ESP_HF_UNAT_RESPONSE_EVT */
|
||||
} unat_rep; /*!< AG callback param of ESP_HF_UNAT_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_DIAL_EVT
|
||||
@@ -134,23 +128,75 @@ typedef union
|
||||
} out_call; /*!< AG callback param of ESP_HF_DIAL_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_VTS_RESPOSNE_EVT
|
||||
* @brief ESP_HF_IND_UPDATE_EVT
|
||||
*/
|
||||
struct hf_ind_upd_param {
|
||||
esp_bd_addr_t remote_addr; /*!< remote bluetooth device address */
|
||||
} ind_upd; /*!< AG callback param of ESP_HF_IND_UPDATE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_CIND_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_cind_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< remote bluetooth device address */
|
||||
} cind_rep; /*!< AG callback param of ESP_HF_CIND_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_COPS_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_cops_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< remote bluetooth device address */
|
||||
} cops_rep; /*!< AG callback param of ESP_HF_COPS_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_CLCC_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_clcc_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< remote bluetooth device address */
|
||||
} clcc_rep; /*!< AG callback param of ESP_HF_CLCC_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_CNUM_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_cnum_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< remote bluetooth device address */
|
||||
} cnum_rep; /*!< AG callback param of ESP_HF_CNUM_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_VTS_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_vts_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< Remote bluetooth device address */
|
||||
char *code; /*!< MTF code from HF Client */
|
||||
}vts_rep; /*!< AG callback param of ESP_HF_VTS_RESPONSE_EVT */
|
||||
} vts_rep; /*!< AG callback param of ESP_HF_VTS_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_NREC_RESPOSNE_EVT
|
||||
*/
|
||||
struct hf_nrec_param {
|
||||
esp_hf_nrec_t state; /*!< NREC enabled or disabled */
|
||||
esp_bd_addr_t remote_addr; /*!< Remote bluetooth device address */
|
||||
esp_hf_nrec_t state; /*!< NREC enabled or disabled */
|
||||
} nrec; /*!< AG callback param of ESP_HF_NREC_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_ATA_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_ata_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< remote bluetooth device address */
|
||||
} ata_rep; /*!< AG callback param of ESP_HF_ATA_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_CHUP_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_chup_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< remote bluetooth device address */
|
||||
} chup_rep; /*!< AG callback param of ESP_HF_CHUP_RESPONSE_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_HF_WBS_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_wbs_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< Remote bluetooth device address */
|
||||
esp_hf_wbs_config_t codec; /*!< codec mode CVSD or mSBC */
|
||||
} wbs_rep; /*!< AG callback param of ESP_HF_WBS_RESPONSE_EVT */
|
||||
|
||||
@@ -158,6 +204,7 @@ typedef union
|
||||
* @brief ESP_HF_BCS_RESPONSE_EVT
|
||||
*/
|
||||
struct hf_bcs_rep_param {
|
||||
esp_bd_addr_t remote_addr; /*!< Remote bluetooth device address */
|
||||
esp_hf_wbs_config_t mode; /*!< codec mode CVSD or mSBC */
|
||||
} bcs_rep; /*!< AG callback param of ESP_HF_BCS_RESPONSE_EVT */
|
||||
|
||||
|
@@ -1339,8 +1339,10 @@ void btc_hf_cb_handler(btc_msg_t *msg)
|
||||
case BTA_AG_SPK_EVT:
|
||||
case BTA_AG_MIC_EVT:
|
||||
{
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
do {
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
memcpy(param.volume_control.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
param.volume_control.type = (event == BTA_AG_SPK_EVT) ? ESP_HF_VOLUME_CONTROL_TARGET_SPK : ESP_HF_VOLUME_CONTROL_TARGET_MIC;
|
||||
param.volume_control.volume = p_data->val.num;
|
||||
btc_hf_cb_to_app(ESP_HF_VOLUME_CONTROL_EVT, ¶m);
|
||||
@@ -1350,46 +1352,67 @@ void btc_hf_cb_handler(btc_msg_t *msg)
|
||||
|
||||
case BTA_AG_AT_UNAT_EVT:
|
||||
{
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
param.unat_rep.unat = p_data->val.str;
|
||||
btc_hf_cb_to_app(ESP_HF_UNAT_RESPONSE_EVT, ¶m);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
do {
|
||||
memcpy(param.unat_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
param.unat_rep.unat = p_data->val.str;
|
||||
btc_hf_cb_to_app(ESP_HF_UNAT_RESPONSE_EVT, ¶m);
|
||||
} while (0);
|
||||
break;
|
||||
}
|
||||
|
||||
case BTA_AG_AT_CBC_EVT:
|
||||
{
|
||||
btc_hf_cb_to_app(ESP_HF_IND_UPDATE_EVT, NULL);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
memcpy(param.ind_upd.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
btc_hf_cb_to_app(ESP_HF_IND_UPDATE_EVT, ¶m);
|
||||
break;
|
||||
}
|
||||
|
||||
case BTA_AG_AT_CIND_EVT:
|
||||
{
|
||||
btc_hf_cb_to_app(ESP_HF_CIND_RESPONSE_EVT, NULL);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
memcpy(param.cind_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
btc_hf_cb_to_app(ESP_HF_CIND_RESPONSE_EVT, ¶m);
|
||||
break;
|
||||
}
|
||||
|
||||
case BTA_AG_AT_COPS_EVT:
|
||||
{
|
||||
btc_hf_cb_to_app(ESP_HF_COPS_RESPONSE_EVT, NULL);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
memcpy(param.cops_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
btc_hf_cb_to_app(ESP_HF_COPS_RESPONSE_EVT, ¶m);
|
||||
break;
|
||||
}
|
||||
|
||||
case BTA_AG_AT_CLCC_EVT:
|
||||
{
|
||||
btc_hf_cb_to_app(ESP_HF_CLCC_RESPONSE_EVT, NULL);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
memcpy(param.clcc_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
btc_hf_cb_to_app(ESP_HF_CLCC_RESPONSE_EVT, ¶m);
|
||||
break;
|
||||
}
|
||||
|
||||
case BTA_AG_AT_CNUM_EVT:
|
||||
{
|
||||
btc_hf_cb_to_app(ESP_HF_CNUM_RESPONSE_EVT, NULL);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
memcpy(param.cnum_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
btc_hf_cb_to_app(ESP_HF_CNUM_RESPONSE_EVT, ¶m);
|
||||
break;
|
||||
}
|
||||
|
||||
case BTA_AG_AT_VTS_EVT:
|
||||
{
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
do {
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
memcpy(param.vts_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
param.vts_rep.code = p_data->val.str;
|
||||
btc_hf_cb_to_app(ESP_HF_VTS_RESPONSE_EVT, ¶m);
|
||||
} while(0);
|
||||
@@ -1398,8 +1421,10 @@ void btc_hf_cb_handler(btc_msg_t *msg)
|
||||
|
||||
case BTA_AG_AT_NREC_EVT:
|
||||
{
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
do {
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
memcpy(param.nrec.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
param.nrec.state = p_data->val.num;
|
||||
btc_hf_cb_to_app(ESP_HF_NREC_RESPONSE_EVT, ¶m);
|
||||
} while(0);
|
||||
@@ -1408,13 +1433,19 @@ void btc_hf_cb_handler(btc_msg_t *msg)
|
||||
|
||||
case BTA_AG_AT_A_EVT:
|
||||
{
|
||||
btc_hf_cb_to_app(ESP_HF_ATA_RESPONSE_EVT, NULL);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
memcpy(param.ata_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
btc_hf_cb_to_app(ESP_HF_ATA_RESPONSE_EVT, ¶m);
|
||||
break;
|
||||
}
|
||||
|
||||
case BTA_AG_AT_CHUP_EVT:
|
||||
{
|
||||
btc_hf_cb_to_app(ESP_HF_CHUP_RESPONSE_EVT, NULL);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
memcpy(param.chup_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
btc_hf_cb_to_app(ESP_HF_CHUP_RESPONSE_EVT, ¶m);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1435,6 +1466,8 @@ void btc_hf_cb_handler(btc_msg_t *msg)
|
||||
osi_free(param.out_call.num_or_loc);
|
||||
} else if (event == BTA_AG_AT_BLDN_EVT) { //dial_last
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
memcpy(param.out_call.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
param.out_call.num_or_loc = NULL;
|
||||
btc_hf_cb_to_app(ESP_HF_DIAL_EVT, ¶m);
|
||||
}
|
||||
} while(0);
|
||||
@@ -1477,20 +1510,30 @@ void btc_hf_cb_handler(btc_msg_t *msg)
|
||||
#if (BTM_WBS_INCLUDED == TRUE)
|
||||
case BTA_AG_WBS_EVT:
|
||||
{
|
||||
BTC_TRACE_DEBUG("Set codec status %d codec %d 1=CVSD 2=MSBC", p_data->val.hdr.status, p_data->val.num);
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
param.wbs_rep.codec = p_data->val.num;
|
||||
btc_hf_cb_to_app(ESP_HF_WBS_RESPONSE_EVT, ¶m);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
do {
|
||||
BTC_TRACE_DEBUG("Set codec status %d codec %d 1=CVSD 2=MSBC", p_data->val.hdr.status, p_data->val.num);
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
memcpy(param.wbs_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
param.wbs_rep.codec = p_data->val.num;
|
||||
btc_hf_cb_to_app(ESP_HF_WBS_RESPONSE_EVT, ¶m);
|
||||
} while (0);
|
||||
break;
|
||||
}
|
||||
|
||||
case BTA_AG_AT_BCS_EVT:
|
||||
{
|
||||
BTC_TRACE_DEBUG("AG final seleded codec is %d 1=CVSD 2=MSBC", p_data->val.num);
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
param.bcs_rep.mode = p_data->val.num;
|
||||
/* No ESP_HF_WBS_NONE case, becuase HFP 1.6 supported device can send BCS */
|
||||
btc_hf_cb_to_app(ESP_HF_BCS_RESPONSE_EVT, ¶m);
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
do {
|
||||
BTC_TRACE_DEBUG("AG final seleded codec is %d 1=CVSD 2=MSBC", p_data->val.num);
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
memcpy(param.bcs_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
param.bcs_rep.mode = p_data->val.num;
|
||||
/* No ESP_HF_WBS_NONE case, becuase HFP 1.6 supported device can send BCS */
|
||||
btc_hf_cb_to_app(ESP_HF_BCS_RESPONSE_EVT, ¶m);
|
||||
} while (0);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@@ -349,7 +349,7 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
case ESP_HF_UNAT_RESPONSE_EVT:
|
||||
{
|
||||
ESP_LOGI(BT_HF_TAG, "--UNKOW AT CMD: %s", param->unat_rep.unat);
|
||||
esp_hf_unat_response(hf_peer_addr, NULL);
|
||||
esp_hf_unat_response(param->unat_rep.remote_addr, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
esp_hf_call_setup_status_t call_setup_state = 2;
|
||||
esp_hf_network_state_t ntk_state = 1;
|
||||
int signal = 2;
|
||||
esp_bt_hf_indchange_notification(hf_peer_addr,call_state,call_setup_state,ntk_state,signal);
|
||||
esp_bt_hf_indchange_notification(param->ind_upd.remote_addr,call_state,call_setup_state,ntk_state,signal);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -374,14 +374,14 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
esp_hf_roaming_status_t roam = 0;
|
||||
int batt_lev = 3;
|
||||
esp_hf_call_held_status_t call_held_status = 0;
|
||||
esp_bt_hf_cind_response(hf_peer_addr,call_status,call_setup_status,ntk_state,signal,roam,batt_lev,call_held_status);
|
||||
esp_bt_hf_cind_response(param->cind_rep.remote_addr,call_status,call_setup_status,ntk_state,signal,roam,batt_lev,call_held_status);
|
||||
break;
|
||||
}
|
||||
|
||||
case ESP_HF_COPS_RESPONSE_EVT:
|
||||
{
|
||||
const int svc_type = 1;
|
||||
esp_bt_hf_cops_response(hf_peer_addr, c_operator_name_str[svc_type]);
|
||||
esp_bt_hf_cops_response(param->cops_rep.remote_addr, c_operator_name_str[svc_type]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
esp_hf_call_addr_type_t type = ESP_HF_CALL_ADDR_TYPE_UNKNOWN;
|
||||
|
||||
ESP_LOGI(BT_HF_TAG, "--Calling Line Identification.");
|
||||
esp_bt_hf_clcc_response(hf_peer_addr, index, dir, current_call_status, mode, mpty, number, type);
|
||||
esp_bt_hf_clcc_response(param->clcc_rep.remote_addr, index, dir, current_call_status, mode, mpty, number, type);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
char *number = {"123456"};
|
||||
esp_hf_subscriber_service_type_t type = 1;
|
||||
ESP_LOGI(BT_HF_TAG, "--Current Number is %s ,Type is %s.", number, c_subscriber_service_type_str[type]);
|
||||
esp_bt_hf_cnum_response(hf_peer_addr, number,type);
|
||||
esp_bt_hf_cnum_response(param->cnum_rep.remote_addr, number,type);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
{
|
||||
ESP_LOGI(BT_HF_TAG, "--Asnwer Incoming Call.");
|
||||
char *number = {"123456"};
|
||||
esp_bt_hf_answer_call(hf_peer_addr,1,0,1,0,number,0);
|
||||
esp_bt_hf_answer_call(param->ata_rep.remote_addr,1,0,1,0,number,0);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
{
|
||||
ESP_LOGI(BT_HF_TAG, "--Reject Incoming Call.");
|
||||
char *number = {"123456"};
|
||||
esp_bt_hf_reject_call(hf_peer_addr,0,0,0,0,number,0);
|
||||
esp_bt_hf_reject_call(param->chup_rep.remote_addr,0,0,0,0,number,0);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
if (param->out_call.type == ESP_HF_DIAL_NUM) {
|
||||
// dia_num
|
||||
ESP_LOGI(BT_HF_TAG, "--Dial number \"%s\".", param->out_call.num_or_loc);
|
||||
esp_bt_hf_out_call(hf_peer_addr,1,0,1,0,param->out_call.num_or_loc,0);
|
||||
esp_bt_hf_out_call(param->out_call.remote_addr,1,0,1,0,param->out_call.num_or_loc,0);
|
||||
} else if (param->out_call.type == ESP_HF_DIAL_MEM) {
|
||||
// dia_mem
|
||||
ESP_LOGI(BT_HF_TAG, "--Dial memory \"%s\".", param->out_call.num_or_loc);
|
||||
@@ -453,10 +453,10 @@ void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
|
||||
bool num_found = true;
|
||||
if (num_found) {
|
||||
char *number = "123456";
|
||||
esp_bt_hf_cmee_response(hf_peer_addr, ESP_HF_AT_RESPONSE_CODE_OK, ESP_HF_CME_AG_FAILURE);
|
||||
esp_bt_hf_out_call(hf_peer_addr,1,0,1,0,number,0);
|
||||
esp_bt_hf_cmee_response(param->out_call.remote_addr, ESP_HF_AT_RESPONSE_CODE_OK, ESP_HF_CME_AG_FAILURE);
|
||||
esp_bt_hf_out_call(param->out_call.remote_addr,1,0,1,0,number,0);
|
||||
} else {
|
||||
esp_bt_hf_cmee_response(hf_peer_addr, ESP_HF_AT_RESPONSE_CODE_CME, ESP_HF_CME_MEMEORY_FAILURE);
|
||||
esp_bt_hf_cmee_response(param->out_call.remote_addr, ESP_HF_AT_RESPONSE_CODE_CME, ESP_HF_CME_MEMEORY_FAILURE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user