It should be gpio13 indeed
Okā¦ so anytime I have RF enabled I get the panics. I have the module that was working fine on an ESP8266 wired with 3.3V, GND and GPIO13. The chip panics with the module connect or not connected. Iāve set it up for just BT and it is working without issue.
Could you try with other pins, change them into config_rf.h
Yes. Would it be possible for you to disconnect your module and see if it causes your chip to panic? Thanks for the help
Iāve tried a few different pins and nothing changesā¦ Always panics.
Did you tried another board ?
Itās the only esp32 I have. I tried a couple of other example sketches for the esp32 and they run without problem. In fact, OMG works perfectly fine when using BT only.
I tried with an ESP32 alone, with ZgatewayBT and ZgatewayRF uncommented and it works fine:
1:40:46.752 -> WiFi ok with manual config credentials
21:40:46.752 -> OpenMQTTGateway mac:
21:40:46.752 -> 30:AE:A4:8B:E7:F8
21:40:46.752 -> OpenMQTTGateway ip:
21:40:46.752 -> 192.168.1.8
21:40:46.752 -> 1883
21:40:46.752 -> Connecting to MQTT by IP adress
21:40:46.752 -> 192.168.1.17
RF_EMITTER_PIN
21:40:48.249 -> 12
21:40:48.249 -> RF_RECEIVER_PIN
21:40:48.249 -> 13
21:40:48.249 -> ZgatewayRF setup done
21:40:48.249 -> ZgatewayBT multicore ESP32 setup done
21:40:48.249 -> MQTT_MAX_PACKET_SIZE
21:40:48.249 -> 1024
21:40:48.249 -> BT Task running on core 0
21:40:48.249 -> Setup OpenMQTTGateway end
21:40:48.249 -> MQTT connection...
21:40:48.249 -> Connected to broker
21:40:48.249 -> Subscription OK to the subjects
Get ManufacturerData
21:41:44.297 ->
Get RSSI
21:41:44.364 -> home/OpenMQTTGateway/BTtoMQTT/088BC11AB545 -37
Get ManufacturerData
21:41:46.404 -> āø®
21:41:46.404 -> Get RSSI
21:41:46.404 -> home/OpenMQTTGateway/BTtoMQTT/4C0F2EFEB21B -62
21:41:46.404 -> Get service data
21:41:46.404 -> service_data
21:41:46.404 -> 0000000000000000000000000000000000000000
21:41:46.404 -> Get service data UUID
21:41:46.404 -> 0000fe9f-0000-1000-8000-00805f9b34fb
Get Name
21:41:46.806 -> Flower care
The board is an ESP32 DEVKIT
This is the board I bought https://www.amazon.com/gp/product/B0718T232Z?pf_rd_p=c2463b52-1139-4aba-9ac9-26d103f6c586&pf_rd_r=7J2RNMYHBCQ6PK5GEHCP
Could you try with the last version from master, there was some corrections implemented by @animavitis
The new code does allow me to run both BT and RF at the same time without the kernel panics. I had to change RF receive to GPIO22 to get RF to work. It appears to be working fine now. Thanks for the help
Thanks @animavitis for finding the buggy part!
Hi all,
Iām a new user of OMG.
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 ?
Thanks for your help
Hi and welcome!
Seems that there is some memory issue, you may have to remove some protocols from rtl_433 so as to free up memory? To do so you could follow this approach.
Could you share the result of the memory and flash after the build?
Thanks for your quick answer. Is this what youāre thinking about :
Linking .pio/build/esp32dev-ble-1/firmware.elf
Retrieving maximum program size .pio/build/esp32dev-ble-1/firmware.elf
Checking size .pio/build/esp32dev-ble-1/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 25.1% (used 82324 bytes from 327680 bytes)
Flash: [======== ] 78.8% (used 1549244 bytes from 1966080 bytes)
I donāt understand how to remove protocols ? Could you explain how to do that ?
Thank you.
I think you should remove the non interesting ones into these files:
include/rtl_433_devices.h, src/rtl_433_ESP.cpp, and src/rtl_433_ESP.h
But maybe @NorthernMan54 can advise.
I think you should open also a separate topic dedicated to your problem
Thank you. I opened this topic: Guru Meditation Error: Core 1 panic'ed - OMG 0.9.8