Skip to content

Commit

Permalink
Merge branch 'bugfix_fix_ble_ANON_ADV_addr_err' into 'master'
Browse files Browse the repository at this point in the history
Fixed BLE ANON_ADV address error

Closes BT-1706

See merge request espressif/esp-idf!13789
  • Loading branch information
jack0c committed Jun 1, 2021
2 parents fe94de0 + a85890d commit 2a27e46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/bt/host/bluedroid/stack/btu/btu_hcif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2a27e46

Please sign in to comment.