Skip to content

Commit ad0012e

Browse files
committed
Update to updated BLE API from ESP-IDF
1 parent 0e4de18 commit ad0012e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libraries/BLE/src/BLEDevice.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ gatts_event_handler BLEDevice::m_customGattsHandler = nullptr;
491491
*/
492492
void BLEDevice::whiteListAdd(BLEAddress address) {
493493
log_v(">> whiteListAdd: %s", address.toString().c_str());
494-
esp_err_t errRc = esp_ble_gap_update_whitelist(true, *address.getNative()); // True to add an entry.
494+
esp_err_t errRc = esp_ble_gap_update_whitelist(true, *address.getNative(), BLE_WL_ADDR_TYPE_PUBLIC); // True to add an entry.
495495
if (errRc != ESP_OK) {
496496
log_e("esp_ble_gap_update_whitelist: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
497497
}
@@ -505,7 +505,7 @@ void BLEDevice::whiteListAdd(BLEAddress address) {
505505
*/
506506
void BLEDevice::whiteListRemove(BLEAddress address) {
507507
log_v(">> whiteListRemove: %s", address.toString().c_str());
508-
esp_err_t errRc = esp_ble_gap_update_whitelist(false, *address.getNative()); // False to remove an entry.
508+
esp_err_t errRc = esp_ble_gap_update_whitelist(false, *address.getNative(), BLE_WL_ADDR_TYPE_PUBLIC); // False to remove an entry.
509509
if (errRc != ESP_OK) {
510510
log_e("esp_ble_gap_update_whitelist: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
511511
}

libraries/BluetoothSerial/src/BluetoothSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
158158
{
159159
case ESP_SPP_INIT_EVT:
160160
log_i("ESP_SPP_INIT_EVT");
161-
esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE);
161+
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
162162
esp_spp_start_srv(ESP_SPP_SEC_NONE, ESP_SPP_ROLE_SLAVE, 0, _spp_server_name);
163163
xEventGroupSetBits(_spp_event_group, SPP_RUNNING);
164164
break;

0 commit comments

Comments
 (0)