File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1038,18 +1038,16 @@ bool NimBLEDevice::setOwnAddrType(uint8_t type) {
10381038
10391039 m_ownAddrType = type;
10401040
1041+ # if MYNEWT_VAL(BLE_HOST_BASED_PRIVACY)
10411042 if (type == BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT || type == BLE_OWN_ADDR_RPA_RANDOM_DEFAULT) {
1042- # ifdef CONFIG_IDF_TARGET_ESP32
10431043 // esp32 controller does not support RPA so we must use the random static for calls to the stack
10441044 // the host will take care of the random private address generation/setting.
10451045 m_ownAddrType = BLE_OWN_ADDR_RANDOM;
10461046 rc = ble_hs_pvcy_rpa_config (NIMBLE_HOST_ENABLE_RPA);
1047- # endif
10481047 } else {
1049- # ifdef CONFIG_IDF_TARGET_ESP32
10501048 rc = ble_hs_pvcy_rpa_config (NIMBLE_HOST_DISABLE_PRIVACY);
1051- # endif
10521049 }
1050+ # endif
10531051
10541052 return rc == 0 ;
10551053} // setOwnAddrType
You can’t perform that action at this time.
0 commit comments