Let me report my first steps with OpenMQTTGateway on an ESP32-C3-DevKitC-02 board from Espressiv. The board has an ESP32-C3-WROOM-02 module and a WS2812 RGB LED driven by GPIO8. I have chosen OMG’s esp32c3-dev-m1-ble environment to start with. I added TRIGGER_GPIO=7 for a pushbutton which I like to have for resetting WIFI and MQTT server data, and changed the Gateway_Name. Seemingly everything went well and the on board LED changed between off, green and sometimes blue. However details looked bad.
The MQTT log cycled along, first LWT online. Then there were many status messages followed by several messages about devices, only recognized or well decoded. Then the C3 went offline and the sequence started again. Time between offline events was 15 seconds on average. Maximum SYStoMQTT uptime was 3. The serial log showed the same frequency of:
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
followed by register dump, stack dump, Rebooting… and finally “WELCOME TO OpenMQTTGateway”. The details in the log of the core dump were really nice and reminded me of old gdb times.
OpenMQTTGateway got going on other ESP32C3 boards when omiting the FastLED library. So I tried to get its Blink example going. The same "Guru Meditation Error"s, dumps and reboots now happened about every second. I finally got my LED going in a small rainbow cycle program lib-depending on adafruit/Adafruit NeoPixel@^1.11.0 library. Overall I assume that FastLED seems broken for ESP32C3 boards.
Next step was removing the FastLED library and related directives from my OMG _env.ini. This resulted in a flood of error messages from the firmware interspersed with few log messages from OMG. Fortunately during WIFI setup it happend slowly, e.g.:
[21:12:43.806163 0.004583] E (97236) gpio: gpio_set_level(226): GPIO output gpio_num error [21:12:43.810240 0.004078] W: MQTT connection... [21:12:46.813463 3.003218] W: failure_number_mqtt: 8
This led me to User_config.h where I recognized that OpenMQTTGateway requires setting indicator LED declararations. If not given it defaults to GPIO 40 for ESP32. This pin is not present on ESP32C3. So I added dummy but valid GPIO declararations for LED_INFO, LED_SEND_RECEIVE and LED_ERROR to my build environment. The firmware errors are gone now. In the MQTT log SYStoMQTT uptime is > 42000 at present.