mirror of https://github.com/ARMmbed/mbed-os.git
BLE NRF51: Resolve private address on connection in peripheral role
Soft device inconsistency: The address is not resolved automatically if the device is a peripheral.pull/6932/head
parent
755cf5fa5f
commit
ba61c09ffc
|
|
@ -1248,6 +1248,16 @@ void nRF5xGap::on_connection(Gap::Handle_t handle, const ble_gap_evt_connected_t
|
|||
|
||||
#if (NRF_SD_BLE_API_VERSION <= 2)
|
||||
bool private_peer_known = evt.irk_match;
|
||||
|
||||
// thanks to softdevice consistencies; addresses are not resolved on the
|
||||
// peripheral side ...
|
||||
if (_privacy_enabled &&
|
||||
evt.role == BLE_GAP_ROLE_PERIPH &&
|
||||
_peripheral_privacy_configuration.resolution_strategy != PeripheralPrivacyConfiguration_t::DO_NOT_RESOLVE &&
|
||||
get_sm().resolve_address(evt.peer_addr.addr) != NULL
|
||||
) {
|
||||
private_peer_known = true;
|
||||
}
|
||||
#else
|
||||
bool private_peer_known = evt.peer_addr.addr_id_peer;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue