nistvan86 / esphome-q7rf

ESPHome custom component for Computherm/Delta Q7RF/Q8RF receiver.
14 stars 8 forks source link

ESP 32 Heltec Lora V2 error #4

Open mascatul opened 2 years ago

mascatul commented 2 years ago

Hello

I tried to upload this to a ESP32 heltec lora v2 but it crashes and the device enters safe mode 👍

[19:02:29][C][spi:023]: Setting up SPI bus... [19:02:29][D][switch:037]: 'Q7RF switch': Sending state OFF [19:02:29] [19:02:29]Stack smashing protect failure! [19:02:29] [19:02:29]abort() was called at PC 0x40152fe3 on core 1 [19:02:29] [19:02:29]ELF file SHA256: 0000000000000000 [19:02:29] [19:02:29]Backtrace: 0x40088c2c:0x3ffb1ac0 0x40088ea9:0x3ffb1ae0 0x40152fe3:0x3ffb1b00 0x400d8801:0x3ffb1b20 0x400d8838:0x3ffb1b50 0x400d9311:0x3ffb1cf0 0x400d93ee:0x3ffb1d40 0x400df502:0x3ffb1d60 0x401663f5:0x3ffb1db0 0x400df271:0x3ffb1dd0 0x400e0cba:0x3ffb1e20 0x400ec5fe:0x3ffb1fb0 0x40089eba:0x3ffb1fd0 [19:02:29] [19:02:29]Rebooting...

Any help is highly apreciated.

Thanks,

nistvan86 commented 2 years ago

Hi.

Unfortunatelly this message doesn't tell much. We can figure out more if you enable debug or verbose level logging in your config, also please connect the board directly with USB to your computer, open a terminal program to the serial port to the board (eg. PuTTY, select Serial mode and enter your COM port name), then hit the reset button on the board and capture the full log output. The very early initialization of the modem is not visible through the ESPHome logging in my experience.

mascatul commented 2 years ago

Hello,

I changed the log level VERY VERBOSE ... it seems that DEBUG is default and hit RESET. Here is the log VERY VERBOSE.txt Here is that yaml tempnode.txt

Thank you for taking time to help

nistvan86 commented 2 years ago

This narrows it down a bit but still don't know what is causing it exactly. The error happens right after the setup call. It resets the switch to off state (this has a log line) then tries to assemble the raw message buffers for each command with the compile_msg function. My guess is that one of the C string manipulation functions throws this error, I've found a similar error reported here. I can't investigate this further at the moment unfortunately.

mascatul commented 2 years ago

Thank you, il investigate more