mirror of https://github.com/ARMmbed/mbed-os.git
BLE: Use RANDOM address per default for Advertising, Scan and Connection parameter.
Unlike the public address, the RANDOM address is guaranteed to exist. If privacy is enabled, it means the controller will generates random resolvable addresses or non resolvable addresses depending on the config. If privacy is not enabled then the device will use the device's random static address that doesn't change between radio processes.pull/8904/head
parent
e7ef0b764e
commit
78468fb6e3
|
@ -135,7 +135,7 @@ public:
|
|||
_minInterval(minInterval),
|
||||
_maxInterval(maxInterval),
|
||||
_peerAddressType(target_peer_address_type_t::PUBLIC),
|
||||
_ownAddressType(own_address_type_t::PUBLIC),
|
||||
_ownAddressType(own_address_type_t::RANDOM),
|
||||
_policy(advertising_filter_policy_t::NO_FILTER),
|
||||
_primaryPhy(phy_t::LE_1M),
|
||||
_secondaryPhy(phy_t::LE_1M),
|
||||
|
|
|
@ -121,7 +121,7 @@ public:
|
|||
scan_window_t scan_interval = scan_interval_t::min(),
|
||||
scan_interval_t scan_window = scan_window_t::min(),
|
||||
bool active_scanning = false,
|
||||
own_address_type_t own_address_type = own_address_type_t::PUBLIC,
|
||||
own_address_type_t own_address_type = own_address_type_t::RANDOM,
|
||||
scanning_filter_policy_t scanning_filter_policy = scanning_filter_policy_t::NO_FILTER
|
||||
) :
|
||||
own_address_type(own_address_type),
|
||||
|
|
|
@ -30,7 +30,7 @@ ConnectionParameters::ConnectionParameters(
|
|||
conn_event_length_t maxEventLength
|
||||
) :
|
||||
_filterPolicy(initiator_filter_policy_t::NO_FILTER),
|
||||
_ownAddressType(own_address_type_t::PUBLIC)
|
||||
_ownAddressType(own_address_type_t::RANDOM)
|
||||
{
|
||||
for (uint8_t i = 0; i < MAX_PARAM_PHYS; ++i) {
|
||||
_enabledPhy[i] = false;
|
||||
|
|
Loading…
Reference in New Issue