diff --git a/CMakeLists.txt b/CMakeLists.txt index 227a5568638..1a181afb970 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,3 +209,11 @@ set(COMPONENT_REQUIRES spi_flash mbedtls mdns ethernet) set(COMPONENT_PRIV_REQUIRES fatfs nvs_flash app_update spiffs bootloader_support openssl bt) register_component() + + +set_source_files_properties(libraries/AzureIoT/src/az_iot/iothub_client/src/iothubtransport_mqtt_common.c + PROPERTIES COMPILE_FLAGS + -Wno-maybe-uninitialized +) + +add_compile_definitions(ARDUINO_ARCH_ESP32=1 ESP32=1 ARDUINO=10800) diff --git a/libraries/BLE/src/BLEDevice.cpp b/libraries/BLE/src/BLEDevice.cpp index 819f8226e66..55b30337cc0 100644 --- a/libraries/BLE/src/BLEDevice.cpp +++ b/libraries/BLE/src/BLEDevice.cpp @@ -491,7 +491,7 @@ gatts_event_handler BLEDevice::m_customGattsHandler = nullptr; */ void BLEDevice::whiteListAdd(BLEAddress address) { log_v(">> whiteListAdd: %s", address.toString().c_str()); - esp_err_t errRc = esp_ble_gap_update_whitelist(true, *address.getNative()); // True to add an entry. + esp_err_t errRc = esp_ble_gap_update_whitelist(true, *address.getNative(), BLE_WL_ADDR_TYPE_PUBLIC); // True to add an entry. if (errRc != ESP_OK) { log_e("esp_ble_gap_update_whitelist: rc=%d %s", errRc, GeneralUtils::errorToString(errRc)); } @@ -505,7 +505,7 @@ void BLEDevice::whiteListAdd(BLEAddress address) { */ void BLEDevice::whiteListRemove(BLEAddress address) { log_v(">> whiteListRemove: %s", address.toString().c_str()); - esp_err_t errRc = esp_ble_gap_update_whitelist(false, *address.getNative()); // False to remove an entry. + esp_err_t errRc = esp_ble_gap_update_whitelist(false, *address.getNative(), BLE_WL_ADDR_TYPE_PUBLIC); // False to remove an entry. if (errRc != ESP_OK) { log_e("esp_ble_gap_update_whitelist: rc=%d %s", errRc, GeneralUtils::errorToString(errRc)); } diff --git a/libraries/BluetoothSerial/src/BluetoothSerial.cpp b/libraries/BluetoothSerial/src/BluetoothSerial.cpp index a8332b8bc99..499a6f676c4 100644 --- a/libraries/BluetoothSerial/src/BluetoothSerial.cpp +++ b/libraries/BluetoothSerial/src/BluetoothSerial.cpp @@ -158,7 +158,7 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param) { case ESP_SPP_INIT_EVT: log_i("ESP_SPP_INIT_EVT"); - esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE); + esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE); esp_spp_start_srv(ESP_SPP_SEC_NONE, ESP_SPP_ROLE_SLAVE, 0, _spp_server_name); xEventGroupSetBits(_spp_event_group, SPP_RUNNING); break;