My goal is to receive sensor data from the Xiaomi Plant Sensor (Flower Care) to the ESP32 Devkit C v4 via Bluetooth Low Energy (BLE). Since, I'm fairly new to ESP32 & BLE, I follow an example from github.
Unfortunately, an error occurs in line 115:
// the remote service we wish to connect to
static BLEUUID serviceUUID("00001204-0000-1000-8000-00805f9b34fb");
....
try {
floraService = floraClient->getService(serviceUUID); // line 115: error here
}
catch (...) {
// something went wrong
}
That was a known issue that is fixed. Somebody pointed out that the serviceUUID didn't get handle correctly by the ESP32 BLE library.
Now I'm facing another issue and get the following output from Serial:
Initialize BLE client...
Processing Flora device at c4:7c:8d:6d:31:2a (try 1)
- Connection successful
Guru Meditation Error: Core 0 panic'ed (Double exception).
Core 0 register dump:
PC : 0x400925d3 PS : 0x00040d36 A0 : 0x8012254c A1 : 0x3ffd1100
A2 : 0x3ffb6388 A3 : 0x3ffdc600 A4 : 0x3ffcc310 A5 : 0x400f9294
A6 : 0x007b6c7c A7 : 0x003fffff A8 : 0x40080080 A9 : 0x3ffd11f0
A10 : 0x00060f36 A11 : 0x00040026 A12 : 0x00001004 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x3ffb6c68 SAR : 0x0000001c EXCCAUSE: 0x00000002
EXCVADDR: 0xffffffe0 LBEG : 0x4008fd94 LEND : 0x4008fdaa LCOUNT : 0xffffffff
Backtrace:<a lot of encoded stuff here>
The decoded stack results look like this:
Decoding stack results
0x40120be1: fixed_queue_enqueue at /home/runner/work/esp32-arduino-lib-builder/esp32/arduino-lib-builder/esp-idf/components/bt/common/osi/fixed_queue.c line 142
0x40097d19: multi_heap_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c line 229
Unfortunately, the repository I mentioned above is already archived and I can't ask the author.
Anyone has an idea why the data service can't be established between ESP32 and Xiaomi Platn Sensor? Many say it's about a memory issue or it ran out of memory but I'm pretty new to microcontroller stuff and have no clue what to do.
Thanks in advance!