mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2026-01-27 01:22:19 +01:00
Add option to use resolvable and non-resolvable private address.
Adds the possibility to configure a resolvable or non-resolvable address (BLE privacy).
This commit is contained in:
@@ -476,12 +476,12 @@ void NimBLEAdvertising::start(uint32_t duration, void (*advCompleteCB)(NimBLEAdv
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
|
||||
rc = ble_gap_adv_start(0, NULL, duration,
|
||||
rc = ble_gap_adv_start(NimBLEDevice::m_own_addr_type, NULL, duration,
|
||||
&m_advParams,
|
||||
(pServer != nullptr) ? NimBLEServer::handleGapEvent : NimBLEAdvertising::handleGapEvent,
|
||||
(pServer != nullptr) ? (void*)pServer : (void*)this);
|
||||
#else
|
||||
rc = ble_gap_adv_start(0, NULL, duration,
|
||||
rc = ble_gap_adv_start(NimBLEDevice::m_own_addr_type, NULL, duration,
|
||||
&m_advParams, NimBLEAdvertising::handleGapEvent, this);
|
||||
#endif
|
||||
if (rc != 0) {
|
||||
|
||||
Reference in New Issue
Block a user