I regard this as a success. The Seeed Studio XIAO ESP32C3 is now up for more than 22h and still sending MQTT. It is just hooked up to a power supply, using the espressif32@5.3.0 platform and serial logging supressed. The log shows after the “LWT online” no more LWT tokens. Thank you @argafal and @1technophile. My current _env.ini is:
; Custom configuration file for the Seed XIAO ESP32C3 dev
; Wed, 01 Mar 2023 20:10:45 +0100
;
; Currently there were two problems
; 1. In long term runs ESP32C3 terminate with an assert failure.
; Therefore the standard platform is overridden with a currently newer one.
; One may have to repeat Wifi and MQTT configuration after changing platform.
; 2. Serial output if no terminal is connected slows down everything else.
; For this situation chose the xxx_no_serial variant for default_envs.
; -------------------------------------------------------------------------
[platformio]
default_envs = seeed_xiao_esp32c3_no_serial
[env:seeed_xiao_esp32c3]
;platform = ${com.esp32_c3_s3_platform} ; standard, problems
platform = espressif32@5.3.0 ; override
board = seeed_xiao_esp32c3
board_build.partitions = min_spiffs.csv
monitor_speed = 115200
lib_deps =
${com-esp.lib_deps}
${libraries.wifimanager32}
${libraries.ble}
${libraries.decoder}
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DLED_SEND_RECEIVE=10' ; GPIO: 2 - 10, 20, 21
'-DLED_INFO=8'
'-DLED_ERROR=9'
'-DTRIGGER_GPIO=7'
'-DNO_INT_TEMP_READING=true' ; No internal temperature on ESP32 C3 or S3
'-DGateway_Name="OMG_xiao_c3.1"'
custom_description = BLE gateway on Xiao C3
custom_hardware = Seed XIAO ESP32C3 dev
[env:seeed_xiao_esp32c3_no_serial]
extends = env:seeed_xiao_esp32c3
build_flags =
${env:seeed_xiao_esp32c3.build_flags}
'-DLOG_LEVEL=LOG_LEVEL_SILENT' ; shut up
'-DWM_DEBUG_LEVEL=0'
@argafal: I have newer observed so nicely documented core dumps of microcontrollers. But I do not have the SERIAL_JTAG directives in my config. Perhaps they add an extra level of information to serial logs. At least I should have seen the WELCOME TO OpenMQTTGateway, but I have not.
@1technophile: Another difference between argafal and me might be that I had cloned OMG from theengs/OpenMQTTGateway at github, stage Wed Feb 22 14:14:45 2023 +0100. I did that because I am mainly interested in BLE and there are other theengs tools which look very promising to get it working.
Nevertheless, this night I will test the Seed C3 with serial grabbing enabled.
See you tomorrow.