- MQTTDriver::publishConfirmed(): QoS 1 + PUBACK tracking (8 s; heartbeat
20 s). A missed PUBACK forces a reconnect. status/playback relies on the
existing republish-current-state-on-connect; control/reports are resent
after the next CONNACK (newest 4). Publish + registration under one
recursive mutex since the PUBACK can arrive before publish() returns.
- AsyncMqttClient vendored into lib/ (upstream 3d93fc7) with one patch:
_onPubAck()/_onPubComp() call _handleQueue(), so a QoS 1 message delays
the next packet by one RTT instead of RTT + up to ~500 ms.
- platformio.ini: platform and every library pinned to the exact versions
already being built (git deps by commit). Clean-libdeps rebuild verified
to resolve the same AsyncTCP and the vendored AsyncMqttClient.
- Removed board_build.cmake_extra_args (timer stack): no effect on Arduino
builds, the SDK is precompiled with 2048. Replaced by a warning comment.
- mqtt.status gains resent_messages and the new forced-reset reasons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Crash reports only carried the coredump's PC/cause/vaddr, which for every
abort() is panic_abort()'s own write to 0x0 - so all aborts looked the same.
- Read the coredump backtrace (up to 16 PCs) and crashing ELF SHA prefix
- Wrap esp_system_abort (-Wl,--wrap) to keep the abort/assert/stack-overflow
message in RTC_NOINIT memory across the reboot
- TelemetryTask snapshots uptime/free heap/largest block/min free heap into
the same RTC block every second
- Reported in MQTT boot_report and SD boot log as crash.backtrace,
crash.elf_sha256 and a new pre_crash object (additive)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pre-OTA sanity check ahead of pushing this firmware to 6-7 units still
running the pre-restructure firmware. All four PlatformIO environments
were building against min_spiffs.csv, but field devices were originally
flashed via Arduino IDE with PartitionScheme=no_fs — the two tables
disagree on app1's offset (0x200000 vs 0x1F0000) and both app slot
sizes, because min_spiffs.csv carves out an unused 128KB spiffs
partition this firmware never touches (SD-card only, zero SPIFFS/
LittleFS references anywhere in the codebase).
OTA cannot migrate a device from one partition table to another — the
bootloader and running app both resolve offsets from a boot-time
snapshot of the table at flash 0x8000, which OTA never reads or
writes. A device still on the old no_fs table has no partition entry
at 0x1F0000, so a min_spiffs-built OTA image can never land where it
needs to be; forcibly rewriting that sector via OTA is an unsupported,
unrecoverable-on-power-loss operation Espressif explicitly warns
against.
Added no_fs.csv (copied verbatim from the Arduino ESP32 core) and
switched every environment to it. Verified the built partitions.bin
decodes to a byte-for-byte match of what's already burned into field
devices. No functionality lost — each app slot actually gained ~64KB
by dropping the unused spiffs partition. OTA to existing field devices
is now safe without any USB/serial reflash.
Catalog entry: docs/features/feature-catalog.md F-059.
- bootOtaCheck() runs at top of setup() before any task/timer; streams
firmware to flash on update, reboots, otherwise returns immediately
- New bespoke-rs485-v1 build env + Rs485OutputManager for Waveshare 16CH
Modbus RTU relay; vesper.hpp renamed vesper-std.hpp, env renamed accordingly
- Player: permanent melodyDownloadTaskFn task; fast path (built-in/SD) before
async download; uid accepted as alias for pid
- CommunicationRouter: HAS_UART guards throughout so UART transport compiles
out when Serial2 is claimed by Modbus
- OTAManager: stack 8KB→16KB, pinned to Core 1, HTTPClient recreated per
retry, download timeout 30s→60s
- FileManager: heap guard before SSL alloc; watchdog log cleanup
- ConfigManager: OTA fallback URLs http (no TLS for firmware servers)
- agnus.hpp: HAS_UART 1 added
- provisioning/nvs_agnus_lab_device.csv added
- Version bumped to v2.0.1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Delete dead code: CommandHandler (700-line God Class) and
HTTPRequestHandler — both replaced by new architecture in Stage 4
- Create Drivers/ group for the three low-level protocol drivers,
mirroring the Transport/ pattern:
MQTTAsyncClient → Drivers/MQTTDriver (class: MQTTDriver)
WebSocketServer → Drivers/WebSocketDriver (class: WebSocketDriver)
UARTCommandHandler → Drivers/UARTDriver (class: UARTDriver)
- Update all includes and type references across CommunicationRouter,
all three Transport wrappers, and MQTTHandler
- Add -std=gnu++14 + build_unflags to platformio.ini so std::make_unique
compiles on ESP32 (required by CommunicationRouter::registerHandlers)
Build: passing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>