From 5cc6294fa74125188d062d208076e0f1d3d2373d Mon Sep 17 00:00:00 2001 From: chegewara Date: Tue, 13 Nov 2018 17:43:04 +0100 Subject: [PATCH] Revert "Release memory from CLASSIC_BT when not enabled" --- cpp_utils/BLEDevice.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cpp_utils/BLEDevice.cpp b/cpp_utils/BLEDevice.cpp index fd86abe0..77380d2b 100644 --- a/cpp_utils/BLEDevice.cpp +++ b/cpp_utils/BLEDevice.cpp @@ -350,7 +350,13 @@ BLEAdvertising* BLEDevice::m_bleAdvertising = nullptr; } #ifndef CLASSIC_BT_ENABLED - esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); + // esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); //FIXME waiting for response from esp-idf issue + errRc = esp_bt_controller_enable(ESP_BT_MODE_BLE); + //errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM); + if (errRc != ESP_OK) { + ESP_LOGE(LOG_TAG, "esp_bt_controller_enable: rc=%d %s", errRc, GeneralUtils::errorToString(errRc)); + return; + } #else errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM); if (errRc != ESP_OK) {