Skip to content
This repository was archived by the owner on Apr 23, 2023. It is now read-only.

Commit c0d8c8c

Browse files
committed
Fixed esp_ble_gap_update_whitelist
Reference: espressif/arduino-esp32#2723 (comment)
1 parent 5ead5f2 commit c0d8c8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: cpp_utils/BLEDevice.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ gatts_event_handler BLEDevice::m_customGattsHandler = nullptr;
485485
*/
486486
void BLEDevice::whiteListAdd(BLEAddress address) {
487487
ESP_LOGD(LOG_TAG, ">> whiteListAdd: %s", address.toString().c_str());
488-
esp_err_t errRc = esp_ble_gap_update_whitelist(true, *address.getNative()); // True to add an entry.
488+
esp_err_t errRc = esp_ble_gap_update_whitelist(true, *address.getNative(), BLE_WL_ADDR_TYPE_RANDOM); // True to add an entry.
489489
if (errRc != ESP_OK) {
490490
ESP_LOGE(LOG_TAG, "esp_ble_gap_update_whitelist: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
491491
}
@@ -499,7 +499,7 @@ void BLEDevice::whiteListAdd(BLEAddress address) {
499499
*/
500500
void BLEDevice::whiteListRemove(BLEAddress address) {
501501
ESP_LOGD(LOG_TAG, ">> whiteListRemove: %s", address.toString().c_str());
502-
esp_err_t errRc = esp_ble_gap_update_whitelist(false, *address.getNative()); // False to remove an entry.
502+
esp_err_t errRc = esp_ble_gap_update_whitelist(false, *address.getNative(), BLE_WL_ADDR_TYPE_RANDOM); // False to remove an entry.
503503
if (errRc != ESP_OK) {
504504
ESP_LOGE(LOG_TAG, "esp_ble_gap_update_whitelist: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
505505
}

0 commit comments

Comments
 (0)