diff --git a/cores/esp32/esp32-hal-bt.c b/cores/esp32/esp32-hal-bt.c index 7b6a54e1ad4..b4c381aa1ab 100644 --- a/cores/esp32/esp32-hal-bt.c +++ b/cores/esp32/esp32-hal-bt.c @@ -16,8 +16,12 @@ #ifdef CONFIG_BT_ENABLED +#if CONFIG_IDF_TARGET_ESP32 +bool btInUse(){ return true; } +#else // user may want to change it to free resources __attribute__((weak)) bool btInUse(){ return true; } +#endif #include "esp_bt.h" diff --git a/cores/esp32/esp32-hal-misc.c b/cores/esp32/esp32-hal-misc.c index 9bc1b3a3a8e..835cce6f08c 100644 --- a/cores/esp32/esp32-hal-misc.c +++ b/cores/esp32/esp32-hal-misc.c @@ -209,9 +209,15 @@ bool verifyRollbackLater() { return false; } #endif #ifdef CONFIG_BT_ENABLED +#if CONFIG_IDF_TARGET_ESP32 +//overwritten in esp32-hal-bt.c +bool btInUse() __attribute__((weak)); +bool btInUse(){ return false; } +#else //from esp32-hal-bt.c extern bool btInUse(); #endif +#endif void initArduino() { diff --git a/libraries/HTTPUpdateServer/examples/WebUpdater/WebUpdater.ino b/libraries/HTTPUpdateServer/examples/WebUpdater/WebUpdater.ino index f2503a7efe1..21688c3e7c2 100644 --- a/libraries/HTTPUpdateServer/examples/WebUpdater/WebUpdater.ino +++ b/libraries/HTTPUpdateServer/examples/WebUpdater/WebUpdater.ino @@ -33,8 +33,7 @@ void setup(void) { Serial.println("WiFi failed, retrying."); } - MDNS.begin(host); - if (MDNS.begin("esp32")) { + if (MDNS.begin(host)) { Serial.println("mDNS responder started"); }