BT + RTL_433 Guru Meditation Error: Core 1 panic'ed - OMG 0.9.8

Hi all,

With the advice of @1technophile (thanks for his help) I open a new topic ([Core 1 Panic … Board keeps resetting](initial topic here: Core 1 Panic .. Board keeps resetting - #21 by 1technophile).

Here is the problem I encountered:

I installed OMG 0.9.8 on a ESP32 (devkit rev1). Below my custom configuration (Bluetooth and RF with cc1101 transceiver).

[platformio]
default_envs = 
  esp32dev-ble-1

;esp32 1
[env:esp32dev-ble-1]
platform = ${com.esp32_platform} ;espressif32@3.3.1
board = esp32dev
board_build.partitions = min_spiffs.csv
lib_deps =
  ${com-esp.lib_deps}
  ${libraries.newremoteswitch}
  ${libraries.ble}
  ${libraries.smartrc-cc1101-driver-lib}
  ${libraries.rtl_433_ESP}
  ${libraries.rc-switch}
build_flags = 
  ${com-esp.build_flags}
  '-DGateway_Name="OpenMQTTGateway"'
  '-DZmqttDiscovery="HADiscovery"'
  '-DZgatewayRF="RF"'
  '-DZgatewayRF2="RF2"'
  '-DZgatewayBT="BT"'
  '-DAttemptBLECOnnect=false'
  '-DZgatewayRTL_433="rtl_433"'
  '-DZradioCC1101="CC1101"'
  '-DRF_RECEIVER_GPIO=22'
  '-DRF_EMITTER_GPIO=2'
;  '-DvalueAsASubject=true'    ; mqtt topic includes model and device
  '-DPUBLISH_UNPARSED=true'  ; Publish details of undecoded signals 
  '-DMQTT_USER=""'
  '-DMQTT_PASS=""'
  '-DMQTT_SERVER="192.168.1.18"'
;upload_protocol = esptool
;upload_port = /dev/tty.SLAB_USBtoUART

;upload_protocol = espota
;upload_port = 192.168.1.41
;upload_flags =
;  --auth=OTAPASSWORD
;  --port=8266

upload_speed = 115200 ;921600
monitor_speed = 115200

But I have an issue. A core panic occurred and the esp32 is resetting.
I followed your recommendations in this topic : i changed the RF_RECEIVER_GPIO value. But nothing changed.
Notice that Bluetooth alone works fine and RF alone works fine too.

Here is the log :

************* WELCOME TO OpenMQTTGateway **************
N: OpenMQTTGateway Version: version_tag
{"mqtt_server":"192.168.1.18","mqtt_port":"1883","mqtt_user":"","mqtt_pass":"","mqtt_topic":"home/","gateway_name":"OpenMQTTGateway","mqtt_broker_secure":false,"mqtt_broker_cert":"","mqtt_ss_index":0,"ota_server_cert":""}*WM: [1] Free heap:        110416
*WM: [1] ESP-IDF version:  v3.3.4-432-g7a85334d8
*WM: [3] allocating params bytes: 20
*WM: [2] Added Parameter: server
*WM: [2] Added Parameter: port
*WM: [2] Added Parameter: user
*WM: [2] Added Parameter: pass
*WM: [2] Added Parameter: secure
*WM: [3] Updated _max_params: 10
*WM: [3] re-allocating params bytes: 40
*WM: [2] Added Parameter: cert
*WM: [2] Added Parameter: name
*WM: [2] Added Parameter: topic
N: Attempting Wifi connection with saved AP: 0
N: Attempting Wifi connection with saved AP: 1
E (959) wifi:sta is connecting, return error
[E][WiFiSTA.cpp:220] begin(): connect failed!
N: Attempting Wifi connection with saved AP: 2
E (1461) wifi:sta is connecting, return error
[E][WiFiSTA.cpp:220] begin(): connect failed!
N: Attempting Wifi connection with saved AP: 3
E (1963) wifi:sta is connecting, return error
[E][WiFiSTA.cpp:220] begin(): connect failed!
N: Attempting Wifi connection with saved AP: 4
E (2464) wifi:sta is connecting, return error
[E][WiFiSTA.cpp:220] begin(): connect failed!
N: Connect your phone to WIFI AP: OpenMQTTGateway with PWD: your_password
*WM: [1] AutoConnect 
*WM: [2] ESP32 event handler enabled 
*WM: [1] AutoConnect: ESP Already Connected 
*WM: [1] STA static IP:
*WM: [2] setSTAConfig static ip not set 
*WM: [1] AutoConnect: SUCCESS 
*WM: [1] STA IP Address: 192.168.1.41
N: BLE scans interval: 55555
N: BLE scans number before connect: 10
N: Publishing only BLE sensors: false
N: minrssi: 100
N: Low Power Mode: 0
WARNING: low memory? malloc() failed in blueline_create() from .pio/libdeps/esp32dev-ble-1/rtl_433_ESP/src/rtl_433/devices/blueline.c:416
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x4010e181  PS      : 0x00060430  A0      : 0x8010e1d2  A1      : 0x3ffd8230  
A2      : 0x3ffc7c9c  A3      : 0x3ffee5ac  A4      : 0x00000000  A5      : 0x00001d18  
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x3fff02dc  A12     : 0x00000000  A13     : 0x00010008  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000020  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000038  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffdd  

ELF file SHA256: 0000000000000000

Backtrace: 0x4010e181:0x3ffd8230 0x4010e1cf:0x3ffd8250 0x40100755:0x3ffd8270 0x401007d3:0x3ffd82b0 0x400d5ba7:0x3ffd82e0 0x400df5fb:0x3ffd8300 0x401182e2:0x3ffd83b0 0x40090ed6:0x3ffd83d0

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

rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, 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:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
N: 

Is there anything I am doing wrong ?

@1technophile advised me to follow this approach, but I don’t understand
how.

Thanks for your help :slight_smile:

The rtl_433 module is very resource intensive and it and the bluetooth module can not co-exist at the same time on an ESP32. The ESP32 does not have enough ram memory available to be able to run both at the same time, so you need to enable one or the other at the same time.

Thank you @NorthernMan54.
But…too bad. I wanted one solution to cover my needs.
I saw that it exists ESP32 with DSRAM. Is it supported ?

I don’t have an ESP32 with DSRAM so can’t comment.

Ok, I will try as soon as I receive one. But not very confident, because the use of PSRAM requires specific api (ESP32 - How To Use PSRAM • ThingPulse).

I tried to upload the OMG firmware with BLE and RTL433 configured with only 8 protocols. It works (no crash, memory ok, BLE and RF433 received ok). I followed this topic: Interest in limited support for rtl_433 device / protocol support on ESP32 - #3 by NorthernMan54
I will try with more protocols…

SYSTOMQTT=
  "uptime": 124,
  "version": "version_tag",
  "freemem": 116604,
  "freestack": 4036,
  "rssi": -79,
  "SSID": "xxxxxxx",
  "ip": "192.168.1.41",
  "mac": "xxxxxxxx",
  "lowpowermode": 0,
  "btqblck": 0,
  "btqsum": 25,
  "btqsnd": 25,
  "btqavg": 1,
  "interval": 55555,
  "scanbcnct": 10,
  "scnct": 2,
  "actRec": 3,
  "mhz": 433.92,
  "RTLminRssi": -82,
  "RTLRssi": -91,
  "RTLCnt": 11,
  "modules": [
    "BT",
    "rtl_433"
  ]
}
1 Like

@1technophile Was there a compiler definition in one of the recent releases to reduce the BT memory footprint ? I thought I had saw it at one point.

@NorthernMan54 you are right you can add:

  '-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL_DISABLED'
  '-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER_DISABLED'

but it is already included in v0.9.8

“Guru meditation error” That takes me back 35 years. :slightly_smiling_face:

2 Likes