Hi everyone,
This my first topic I am posting since I am new in this community.
I am developing an heating system controller with an ESP32 wroom 32 devkit v2.
This system, beside been connected to the house wifi, need to comunicate via BLE with EQIVA EQ3 thermostatic valve.
I am using pieter/ESP-EQ3@^0.1.0 library to control the valve.
I establish communication with the valve and I am able to send command and received status correctly except for this problem.
If no data are exchange with the valve within 30 seconds the connection timeout.
If I try to reconnect to the valve the system immediately crash.
Since I do not need to exchange data with the valve more then few times a day I cannot overcome this problem:
I include the reported decoded backtrace I am getting upon crashing.
23:02:18.918 > Connecting to 00:1a:22:16:ea:8a THIS THE FIRST CONNECTION TO THE VALVE
23:02:18.918 > Connected to 00:1a:22:16:ea:8a
23:02:18.918 > Updated Time with string: 3, 16, 0, A, 17, 2, E,
23:02:18.918 > Updated mode
23:02:18.918 > Updated temperature to 17.0
23:03:47.795 > Disconnected from 00:1a:22:16:ea:8a THIS IS WHEN THE BLE TIMEOUT OCCOUR
23:04:22.348 > Connecting to 00:1a:22:16:ea:8a THIS IS WHEN I TRY TO EXCHANGE DATA AGAIN
23:04:23.195 > Connected to 00:1a:22:16:ea:8a
23:04:23.395 > Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.
23:04:23.403 > Core 1 register dump:
23:04:23.405 > PC : 0x400ef6cb PS : 0x00060630 A0 : 0x800f0293 A1 : 0x3ffcd190
23:04:23.413 > A2 : 0x800e3a1a A3 : 0x00000001 A4 : 0x80091398 A5 : 0x3ffcd0d0
23:04:23.421 > A6 : 0x00000000 A7 : 0x3ffcb480 A8 : 0x00000020 A9 : 0x80000020
23:04:23.429 > A10 : 0x00000008 A11 : 0x00000001 A12 : 0x00000005 A13 : 0x00000020
23:04:23.437 > A14 : 0x00000020 A15 : 0x3ffc3a28 SAR : 0x00000010 EXCCAUSE: 0x0000001c
23:04:23.444 > EXCVADDR: 0x800e3a22 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
23:04:23.452 >
23:04:23.452 > ELF file SHA256: 0000000000000000
23:04:23.455 >
23:04:23.456 > Backtrace: 0x400ef6cb:0x3ffcd190 0x400f0290:0x3ffcd1b0 0x400eff1b:0x3ffcd1f0 0x400effc1:0x3ffcd250 0x400f0047:0x3ffcd290 0x400f22ff:0x3ffcd2d0 0x400f26bb:0x3ffcd310 0x400f26c5:0x3ffcd330 0x400d75c2:0x3ffcd350 0x400f84b4:0x3ffcd3c0 0x40091186:0x3ffcd3e0
23:04:24.497 > #0 0x400ef6cb:0x3ffcd190 in NimBLEClient::isConnected() at .pio\libdeps\esp32dev\NimBLE-Arduino\src/NimBLEClient.cpp:462
23:04:24.497 > #1 0x400f0290:0x3ffcd1b0 in NimBLERemoteDescriptor::writeValue(unsigned char const*, unsigned int, bool) at .pio\libdeps\esp32dev\NimBLE-Arduino\src/NimBLERemoteDescriptor.cpp:276
23:04:24.497 > #2 0x400eff1b:0x3ffcd1f0 in NimBLERemoteCharacteristic::setNotify(unsigned short, std::function<void (NimBLERemoteCharacteristic*, unsigned char*, unsigned int, bool)>, bool) at .pio\libdeps\esp32dev\NimBLE-Arduino\src/NimBLERemoteCharacteristic.cpp:384
23:04:24.497 > #3 0x400effc1:0x3ffcd250 in NimBLERemoteCharacteristic::subscribe(bool, std::function<void (NimBLERemoteCharacteristic*, unsigned char*, unsigned int, bool)>, bool) at .pio\libdeps\esp32dev\NimBLE-Arduino\src/NimBLERemoteCharacteristic.cpp:384
23:04:24.497 > #4 0x400f0047:0x3ffcd290 in NimBLERemoteCharacteristic::registerForNotify(std::function<void (NimBLERemoteCharacteristic*, unsigned char*, unsigned int, bool)>, bool, bool) at .pio\libdeps\esp32dev\NimBLE-Arduino\src/NimBLERemoteCharacteristic.cpp:384
23:04:24.497 > #5 0x400f22ff:0x3ffcd2d0 in EQ3Thermostat::setupNotifications() at .pio\libdeps\esp32dev\ESP-EQ3\src/eq3thermostat.cpp:145
23:04:24.497 > #6 0x400f26bb:0x3ffcd310 in EQ3Thermostat::connect() at .pio\libdeps\esp32dev\ESP-EQ3\src/eq3thermostat.cpp:145
23:04:24.497 > #7 0x400f26c5:0x3ffcd330 in EQ3Thermostat::JustConnect() at .pio\libdeps\esp32dev\ESP-EQ3\src/eq3thermostat.cpp:145
23:04:24.497 > #8 0x400d75c2:0x3ffcd350 in loop() at src/main.cpp:914
23:04:24.497 > #9 0x400f84b4:0x3ffcd3c0 in loopTask(void*) at C:\Users\Carlo.platformio\packages\framework-arduinoespressif32\cores\esp32/main.cpp:23
23:04:24.497 > #10 0x40091186:0x3ffcd3e0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)
23:04:24.500 >
23:04:24.500 > Rebooting…
23:04:24.500 > ets Jun 8 2016 00:22:57
The MAC address belong to EQ3 valve.
I am fairly new to this platform and programming enviroment and I am not sure how to interpreted all this info.
for example backtrace #0 refer to a funtion in NimbleClient class which set a timeout but I was not able to understand where this function is call.
At the moment the only way to keep the system alive is to send a command to the valve repeatedly before the 30 seconds expire,
Any help it’s greatly appreciated.
Thanks