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:
Asuki Kono
2021-01-13 18:00:48 -07:00
committed by h2zero
parent 57ba0e583d
commit f61bd5c2df
6 changed files with 36 additions and 6 deletions

View File

@@ -208,7 +208,7 @@ bool NimBLEClient::connect(const NimBLEAddress &address, bool deleteAttibutes) {
* Loop on BLE_HS_EBUSY if the scan hasn't stopped yet.
*/
do {
rc = ble_gap_connect(BLE_OWN_ADDR_PUBLIC, &peerAddr_t,
rc = ble_gap_connect(NimBLEDevice::m_own_addr_type, &peerAddr_t,
m_connectTimeout, &m_pConnParams,
NimBLEClient::handleGapEvent, this);
switch (rc) {