From 2bf87b0a5334d28893fbabef49b09d5d1906669c Mon Sep 17 00:00:00 2001 From: keymoon Date: Thu, 26 May 2022 23:24:56 +0900 Subject: [PATCH] add address field to read_rmt_name_param --- components/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h | 1 + components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_bt.c | 1 + 2 files changed, 2 insertions(+) diff --git a/components/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h b/components/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h index e354dcfc6d..63a99eaa08 100644 --- a/components/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h +++ b/components/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h @@ -336,6 +336,7 @@ typedef union { struct read_rmt_name_param { esp_bt_status_t stat; /*!< read Remote Name status */ uint8_t rmt_name[ESP_BT_GAP_MAX_BDNAME_LEN + 1]; /*!< Remote device name */ + esp_bd_addr_t bda; /*!< remote bluetooth device address*/ } read_rmt_name; /*!< read Remote Name parameter struct */ /** diff --git a/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_bt.c b/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_bt.c index 06d3c8c35d..872aaf7129 100644 --- a/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_bt.c +++ b/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_bt.c @@ -743,6 +743,7 @@ static void btc_gap_bt_read_remote_name_cmpl_callback(void *p_data) msg.pid = BTC_PID_GAP_BT; msg.act = BTC_GAP_BT_READ_REMOTE_NAME_EVT; + memcpy(param.read_rmt_name.bda,result->bd_addr,BD_ADDR_LEN); param.read_rmt_name.stat = btc_btm_status_to_esp_status(result->status); memcpy(param.read_rmt_name.rmt_name,result->remote_bd_name,ESP_BT_GAP_MAX_BDNAME_LEN);