From e9346a635d21c4d48e4cabfb579d9ba844ba3bb5 Mon Sep 17 00:00:00 2001 From: Tomas Pilny Date: Fri, 11 Aug 2023 11:28:13 +0200 Subject: [PATCH 1/2] Removed duplicate MDNS.begin() call in example --- libraries/HTTPUpdateServer/examples/WebUpdater/WebUpdater.ino | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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"); } From c783918289daa4ff2dbe6ddc9743884d6d79f083 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Tue, 22 Aug 2023 21:33:25 -0300 Subject: [PATCH 2/2] Fixes ESP32 BT Memory Releasing --- cores/esp32/esp32-hal-bt.c | 4 ++++ cores/esp32/esp32-hal-misc.c | 6 ++++++ 2 files changed, 10 insertions(+) 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() {