From 9e2ce84a9ab6b1decf0ffbb682198e27c8059a6a Mon Sep 17 00:00:00 2001 From: zhiweijian Date: Mon, 31 May 2021 15:43:14 +0800 Subject: [PATCH] Fixed ANON_ADV address error --- components/bt/host/bluedroid/stack/btu/btu_hcif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/stack/btu/btu_hcif.c b/components/bt/host/bluedroid/stack/btu/btu_hcif.c index 61b6c5e389..e8b1157afe 100644 --- a/components/bt/host/bluedroid/stack/btu/btu_hcif.c +++ b/components/bt/host/bluedroid/stack/btu/btu_hcif.c @@ -2106,9 +2106,12 @@ static void btu_ble_ext_adv_report_evt(UINT8 *p, UINT16 evt_len) STREAM_TO_UINT8(addr_type, p); STREAM_TO_BDADDR(bda, p); + // If it is an anonymous adv, skip address resolution + if(addr_type != 0xFF) { #if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE) - btm_identity_addr_to_random_pseudo(bda, &addr_type, FALSE); + btm_identity_addr_to_random_pseudo(bda, &addr_type, FALSE); #endif + } ext_adv_report.addr_type = addr_type; memcpy(ext_adv_report.addr, bda, 6); STREAM_TO_UINT8(ext_adv_report.primary_phy, p);