From 35d4a3c84bd5247be7fc3e377c39c7e0b4b249aa Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Fri, 16 Nov 2018 16:53:52 +0100 Subject: [PATCH] Free BT memory if using only WiFi Partially fixes https://github.com/arduino/nina-fw/issues/4. Problem: default certificates are a lot (~70KB) and BT uses a lot of RAM even if just configured in menuconfig. Avoid spurious certificates parsing and SSL errors by freeing bt memory if unused. --- main/sketch.ino.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main/sketch.ino.cpp b/main/sketch.ino.cpp index f4d98ce..17889f8 100644 --- a/main/sketch.ino.cpp +++ b/main/sketch.ino.cpp @@ -132,6 +132,7 @@ void setupBluetooth() { } void setupWiFi() { + esp_bt_controller_mem_release(ESP_BT_MODE_BTDM); SPIS.begin(); if (WiFi.status() == WL_NO_SHIELD) {