NimBLE-Arduino
NimBLE-Arduino copied to clipboard
ESP hangs in NimBLEDevice::init function @ v2.3.6 (v2.3.2 works fine!)
Hi, i have a strange issue after updating your lib from version 2.3.2 to current version. The sketch hangs in init function:
NimBLEDevice::init("NimBLE-Client");
All works fine with v2.3.2, but no way in current version.
Here the relevant codesnippet:
Serial.println("FlowerCare Constructor start");
NimBLEDevice::init("NimBLE-Client");
Serial.println("NimBLEDevice initialized");
pBLEScan = NimBLEDevice::getScan();
Serial.println("NimBLEDevice Scan obtained");
pBLEScan->setScanCallbacks(&scanCallbacksInstance, false); // Set the callback for when devices are discovered, no duplicates.
Serial.println("NimBLEDevice Scan Callbacks set");
pBLEScan->setActiveScan(true);
Serial.println("NimBLEDevice Active Scan set");
NimBLEDevice::setPower(ESP_PWR_LVL_P9); /** +9db */
Serial.println("NimBLEDevice Power set");
Serial output with current github version, after the last line - nothing happens anymore:
ready Starting FlowerCare FlowerCare Constructor start
Serial output with v2.3.2 version
Starting FlowerCare
FlowerCare Constructor start
NimBLEDevice initialized
NimBLEDevice Scan obtained
NimBLEDevice Scan Callbacks set
NimBLEDevice Active Scan set
NimBLEDevice Power set
Starting BLE scan
Setup finished
FlowerCare scan ended
FlowerCare data: {"address":"c4:7c:8d:64:42:d0","temperature":21.3,"moisture":52,"brightness":1805,"fertility":653,"battery":100,"firmwareVersion":"2.7.0"}
FlowerCare data: {"address":"80:ea:ca:89:67:1c","temperature":22.2,"moisture":53,"brightness":3794,"fertility":379,"battery":98,"firmwareVersion":"3.2.1"}
FlowerCare data: {"address":"80:ea:ca:89:62:4e","temperature":23.1,"moisture":2,"brightness":1194,"fertility":0,"battery":99,"firmwareVersion":"3.2.1"}
Attached the full working platformio example project with current githib version. Reduced to minimalistics. To test with v.2.3.2 please remove NimBLE path in platformio.ini and rename folder "lib_2.3.2" to "lib". Then Recompile and be happy when it works ;)