Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lilygo-rtl_433 crash after chacon remote control button pressed #1655

Closed
Xenon69 opened this issue May 23, 2023 · 6 comments
Closed

lilygo-rtl_433 crash after chacon remote control button pressed #1655

Xenon69 opened this issue May 23, 2023 · 6 comments

Comments

@Xenon69
Copy link

Xenon69 commented May 23, 2023

Before submitting a problem please check the troubleshooting section
https://docs.openmqttgateway.com/upload/troubleshoot.html

Describe the bug
lilygo-rtl_433 crash after chacon remote control button pressed

To Reproduce
Steps to reproduce the behavior:

  1. compile and upload lilygo-rtl_433
  2. press a button on a Chacon remote
  3. the device reboots

Expected behavior
a MQTT message published with remote button details

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OpenMQTTGateway version used (V0.9.3, 0.8, development)
  • Library version related to the problem you have (if you have troubles with RF provide the version of RCSwitch library)
  • For IR and RF clarify if you tested with the basic examples given with these libraries

Additional context
Add any other context about the problem here.

  • You should not have a compilation error if you use the versions of the libraries linked into the libraries folder, this badges show you the state of the compilation
    Build Status
  • If you are not sure this is a bug or an enhancement post your question to the forum below
    Community forum
@NorthernMan54
Copy link
Collaborator

In order to further troubleshoot the issue, is it possible to share the serial output from the device when the reboot occurs. And to the output easier to debug, is it possible to add this setting to your platformio build environment ?

monitor_filters = esp32_exception_decoder

This will decode where the exception occurs within the codebase.

Tks

@Xenon69
Copy link
Author

Xenon69 commented May 30, 2023

Hello,

here is the trace 'Guru meditation':

N: Send on /RTL_433toMQTT/Acurite-606TX/207 msg {"model":"Acurite-606TX","id":207,"battery_ok":1,"temperature_C":15.8,"mic":"CHECKSUM","protocol":"Acurite 606TX Temperature Sensor","rssi":-64,"duration":818996}
Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception).
Debug exception reason: Stack canary watchpoint triggered (rtl_433_Decoder)
Core 1 register dump:
PC : 0x4008df07 PS : 0x00060636 A0 : 0x4008dd16 A1 : 0x3ffe1af0
A2 : 0x00000008 A3 : 0x4008aa61 A4 : 0x00000008 A5 : 0x3ffe1bc0
A6 : 0x00000008 A7 : 0x3ffe1dc0 A8 : 0x3ffe1d9c A9 : 0x00000008
A10 : 0x3ffdfab0 A11 : 0x3ffe1ec0 A12 : 0x40084f92 A13 : 0x00005000
A14 : 0x00000008 A15 : 0xff000000 SAR : 0x00000004 EXCCAUSE: 0x00000001
EXCVADDR: 0x00000000 LBEG : 0x4008aa61 LEND : 0x4008aa6e LCOUNT : 0xfffffffe

Backtrace: 0x4008df04:0x3ffe1af0 0x4008dd13:0x3ffe1ec0 0x401c6a7a:0x3ffe1f50 0x40123539:0x3ffe1f90 0x400fa393:0x3ffe1fe0 0x400fa645:0x3ffe2000 0x400fa6a1:0x3ffe2020 0x400fa77b:0x3ffe2040 0x40122bda:0x3ffe2090 0x401d0a7a:0x3ffe20d0 0x401122fd:0x3ffe20f0 0x401241b3:0x3ffe3b30 0x40124b95:0x3ffe3b50 0x40122f26:0x3ffe3b90 0x400f8dff:0x3ffe3bc0

#0 0x4008df04:0x3ffe1af0 in _xt_context_save at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/port/xtensa/xtensa_context.S:126
#1 0x4008dd13:0x3ffe1ec0 in _frxt_int_enter at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/port/xtensa/portasm.S:112
#2 0x401c6a7a:0x3ffe1f50 in vsnprintf at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vsnprintf.c:40
#3 0x40123539:0x3ffe1f90 in abuf_printf at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/abuf.c:59
#4 0x400fa393:0x3ffe1fe0 in format_jsons_int at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/data.c:540
#5 0x400fa645:0x3ffe2000 in print_value at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/data.c:398
#6 0x400fa6a1:0x3ffe2020 in format_jsons_object at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/data.c:450
#7 0x400fa77b:0x3ffe2040 in data_print_jsons at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/data.c:557
#8 0x40122bda:0x3ffe2090 in data_acquired_handler at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/r_api.c:977
#9 0x401d0a7a:0x3ffe20d0 in decoder_output_data at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/decoder_util.c:41
#10 0x401122fd:0x3ffe20f0 in nexa_callback at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/devices/nexa.c:68 (discriminator 4)
#11 0x401241b3:0x3ffe3b30 in account_event at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/pulse_slicer.c:34
#12 0x40124b95:0x3ffe3b50 in pulse_slicer_ppm at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/pulse_slicer.c:303
#13 0x40122f26:0x3ffe3b90 in run_ook_demods at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/rtl_433/r_api.c:543
#14 0x400f8dff:0x3ffe3bc0 in rtl_433_DecoderTask(void*) at .pio/libdeps/lilygo-rtl_433/rtl_433_ESP/src/signalDecoder.cpp:482

ELF file SHA256: 52312a0d32e452e7

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
N:
************* WELCOME TO OpenMQTTGateway **************

Have a nice day!!

Thank you

@NorthernMan54
Copy link
Collaborator

Tks for this

The issue is here - Debug exception reason: Stack canary watchpoint triggered (rtl_433_Decoder)

As a quick fix you could try adjusting this value slightly larger - https://github.com/NorthernMan54/rtl_433_ESP/blob/f3b148b0a4a305b2acb0f582b60d3b353400870c/src/signalDecoder.cpp#L38

@Xenon69
Copy link
Author

Xenon69 commented May 31, 2023

Thanks, now it works.

I changed 8500 to 10000 in the code below (SignalDecoder.cpp), as OOK_MODULATION is defined to true:

#  if OOK_MODULATION
#    define rtl_433_Decoder_Stack 10000  <-----------Here
#  else
#    define rtl_433_Decoder_Stack 20000
#  endif

Will that be updated in the next version?

Thank you again.

@agirilovich
Copy link

agirilovich commented Jun 1, 2023

I've faced with the same issue. "Stack overflow" after 1-3 hours of receiving data from LaCrosse sensor.

The solution with increasing 'rtl_433_Decoder_Stack' to 10000 rescued from the complete board hang up. Now it keeps publish MQTT messages with such metrics as MAC, IP, uptime etc.
However "rtl_433_ESP" library looks dead after the same period of time. Just silence without any error message on a Serial.
lastlog.txt

1technophile pushed a commit that referenced this issue Jun 8, 2023
Update to rtl_433_ESP 0.3.0
Resolves issue with sx127x chipset and receiving higher frequencies
Includes support for receiving FSK signals, requires compiler directive OOK_MODULATION=false to switch to FSK mode
Adds unit of measure for rtl_433/battery_ok devices RTL_433_ESP Battery Auto Discovery Missing Unit of Measurement #1644
Updates value template for rtl_433/battery_ok in openHab mode
Resolves out of stack space crash lilygo-rtl_433 crash after chacon remote control button pressed #1655
Mirdinus pushed a commit to Mirdinus/OpenMQTTGateway that referenced this issue Jun 8, 2023
Update to rtl_433_ESP 0.3.0
Resolves issue with sx127x chipset and receiving higher frequencies
Includes support for receiving FSK signals, requires compiler directive OOK_MODULATION=false to switch to FSK mode
Adds unit of measure for rtl_433/battery_ok devices RTL_433_ESP Battery Auto Discovery Missing Unit of Measurement 1technophile#1644
Updates value template for rtl_433/battery_ok in openHab mode
Resolves out of stack space crash lilygo-rtl_433 crash after chacon remote control button pressed 1technophile#1655
@NorthernMan54
Copy link
Collaborator

Resolved with release 1.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants