mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Component/bt: fix get PID key error
This commit is contained in:
parent
da27816314
commit
109a93bf8c
@ -784,7 +784,10 @@ bt_status_t btc_storage_get_bonded_ble_devices_list(esp_ble_bond_dev_t *bond_dev
|
|||||||
//resolve the peer device irk
|
//resolve the peer device irk
|
||||||
if (_btc_storage_get_ble_bonding_key(&bd_addr, BTM_LE_KEY_PID, buffer, sizeof(tBTM_LE_PID_KEYS)) == BT_STATUS_SUCCESS) {
|
if (_btc_storage_get_ble_bonding_key(&bd_addr, BTM_LE_KEY_PID, buffer, sizeof(tBTM_LE_PID_KEYS)) == BT_STATUS_SUCCESS) {
|
||||||
bond_dev->bond_key.key_mask |= ESP_BLE_ID_KEY_MASK;
|
bond_dev->bond_key.key_mask |= ESP_BLE_ID_KEY_MASK;
|
||||||
memcpy(&bond_dev->bond_key.pid_key, buffer, sizeof(tBTM_LE_PID_KEYS));
|
tBTM_LE_PID_KEYS *pid_key = (tBTM_LE_PID_KEYS *) buffer;
|
||||||
|
memcpy(&bond_dev->bond_key.pid_key.irk, pid_key->irk, BT_OCTET16_LEN);
|
||||||
|
bond_dev->bond_key.pid_key.addr_type = pid_key->addr_type;
|
||||||
|
memcpy(&bond_dev->bond_key.pid_key.static_addr, pid_key->static_addr, sizeof(BD_ADDR));
|
||||||
}
|
}
|
||||||
//serch for the next bond device
|
//serch for the next bond device
|
||||||
bond_dev++;
|
bond_dev++;
|
||||||
|
Loading…
Reference in New Issue
Block a user