Cache manifest checks in a short-lived task so slow HTTP requests do not stall mesh service. Serialize checks with pull updates and keep results independent of bridge lifetime.
Scheduled updates and an open upload portal must hold off self-heal before flash writes begin. Treat config batches as busy for at most two minutes so saves can finish without an abandoned batch blocking recovery forever.
The driver treats an OTA upload or the manifest update sequence as
in progress, is told about every bridge start, stop, restart and slot
restart, and reboots only when a second fresh sample still shows the cause.
ObserverBridgeControl::poll now ticks the self-heal policy about every 10 s
on the main loop, whether or not the bridge exists or runs. An alert is
logged and sent on the mesh alert channel when alerts are on; a reboot first
records the cause and count in RTC no-init memory, then reboots through the
board. A healthy period clears the record. Adds the mqtt_selfheal_enabled
runtime pref, default on.
At boot the repeater and room server read the core dump summary once
into a 72-byte static record (the summary itself is heap-borrowed and
freed). `get crash` prints it, and every status message this boot
carries it as a `crash` field, formatted into the unused tail of the
publish scratch buffer so the bridge task stack is untouched. The flash
dump is erased by the bridge task after a status carrying it has been
published, or immediately by `clear crash`, so it survives boots where
MQTT never connects. Xtensa observer builds only.
Both roles forward setBridgeState, restartBridge, restartBridgeSlot, the
config batch callbacks, the loop poll and the deferred OTA to
ObserverBridgeControl. OTA now resumes only a bridge that was meant to be
running, and SNMP is attached on every start in both roles.
Revert 22eb9b87a kept rolling back upstream changes to files the fork never
modified. Take upstream's version for those 24 files: nRF52 board RAM limits,
SenseCAP Solar LED/GPS pins, T1000-E signed NTC table, secure_chat airtime
default, devcontainer.
Repeaters, room servers and sensors already let the battery ADC multiplier be tuned with 'set adc.multiplier' (CommonCLI). The companion firmware had no equivalent, so a board whose divider differs from the build default (common on DIY ProMicro / Faketec boards) always reported a wrong battery voltage.
Adds the same command to the companion CLI. The value is stored in the companion prefs (comp.adc_mult, 0 = board default) and applied at startup via MainBoard::setAdcMultiplier().
Move TimeSeriesData from simple_sensor into src/helpers and drive it with
monotonic uptime, so RTC changes cannot stall recording or break queries.
Keep the old RTCClock* overloads as deprecated for custom sensor sketches.
Record 24h of battery, noise floor, TX/RX airtime % and MCU temperature on
repeaters and answer the existing 0x04 min/max/avg request using the same
format as sensor nodes. No packets are sent by this feature.
REPEATER_HISTORY_SLOTS=0 removes it; default off on STM32/RP2040.
Add native tests for TimeSeriesData and document the request and channels.
Each slot gains a neighbors setting. auto (default) follows the node:
mqtt.neighbors on sends to the slot, and auto sends only if the slot's
preset asks for neighbor data. on and off override that for the slot,
so a custom broker can receive neighbors without every other slot, and
a listed preset can be opted out. mqtt.neighbors off still stops
periodic snapshots on every slot; a slot set off is also skipped by a
manual discover.scopes.
The periodic cycle runs only while some slot would receive it. The mesh
now hands the bridge a slot bitmask with each snapshot instead of a
mode, so the MQTT task never reads prefs. Stored as slotN.neighbors in
/mqtt.json (missing = auto; older firmware ignores the key). Web config
gains a per-slot select; the bridge logs each slot a snapshot reaches.
- Store the mode as neighbors.mode in /mqtt.json and keep
neighbors.enabled as the 0/1 older firmware validates (1 only for on).
Older firmware no longer repairs and rewrites the file, so an off set
here survives a rollback and re-upgrade. A file without mode maps
enabled 0 to auto and 1 to on without counting as a repair, so the
upgrade does not rewrite every node's file.
- Out-of-range values repair to off instead of auto.
- Abandon a periodic scope pass when collection turns off mid-run, so it
stops querying neighbors for a snapshot no slot would receive.
- Pass the mode a snapshot ran under to the bridge instead of having the
MQTT task read the live pref across cores.
- Webconfig mock server handles auto/on/off; test README lists the new
suite; replace a serializer assertion that could not fail with
round-trip, legacy-file, repair, and normalize tests.
mqtt.neighbors gains an auto mode, now the default. In auto the periodic
neighbor cycle runs only while a slot uses a preset whose broker asks for
neighbor data, and the periodic snapshot goes only to those slots. comchan
is the first preset to opt in (MQTTPresetPolicy.h, keyed by name so
MQTTPresets.h stays identical across channels).
Stored values: 0 = auto (was off), 1 = on, 2 = off. Nodes that never
touched the setting upgrade to auto; older firmware repairs 2 to 0, so a
rollback keeps neighbors off. on keeps its old behavior (every slot), and
a manual discover.scopes still publishes to every connected slot in any
mode.
The web config toggle becomes an auto/on/off select, and the config JSON
reports the mode name.
The room server gated its filesystem paths on NRF52_PLATFORM only, so an
STM32 build fell through to the ESP32 branch and failed to compile:
MyMesh.cpp:147: no matching function for call to
'Adafruit_LittleFS::open(const char*&, const char [2], bool)'
main.cpp:69: 'store' was not declared in this scope
STM32 uses the same InternalFS / Adafruit_LittleFS API as nRF52, including
append semantics (FILE_O_WRITE opens LFS_O_RDWR|LFS_O_CREAT and then seeks
to the end), so the nRF52 branch is already correct for it. Add
STM32_PLATFORM alongside NRF52_PLATFORM in the four remaining gates;
saveIdentity() already did this.
This unblocks the room_server example on the existing STM32WL boards
(wio-e5-mini, wio-e5-dev, rak3x72, tiny_relay) as well as new ones.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Use GxEPD2's busy callback to run the mesh, interface and sensor loops
(loopCore(), shared with loop()) while the panel refreshes, instead of
blocking the main loop. Covers the partial refresh in endFrame(), the
full wipe in startFrame(), and the sleep icon / blank refresh on turnOff().
Adds `set/get wifi.txpower default|2..20` so the WiFi TX power cap can be
changed per node without a rebuild.
- Stored as whole dBm in MQTTPrefs (/mqtt.json wifi.tx_power). 0 means the
build's MQTT_WIFI_TX_POWER, so saving prefs never pins today's default and
a later build can still move a board's default. Files without the key load
as board default; out-of-range values are repaired to it.
- WifiTxPowerPolicy holds parsing, the build-default clamp to the SDK's
[8, 84] quarter-dBm range, and formatting. No quantization table: replies
report esp_wifi_get_max_tx_power() readback, since rounding is per chip.
- Applied via esp_wifi_set_max_tx_power() right after WiFi.mode(WIFI_STA)
(so association is capped), after every association, immediately from the
CLI, and when the setup AP starts and tears down back to STA.
- WebConfig: TX power selector with the radio's reported value; config JSON
gains wifi.txpower and wifi.txpower_applied; key allowlisted; mock server
and CLI audit updated.
- Host tests for the policy and for serializer round-trip/repair.
CMD_SEND_CHANNEL_TXT_MSG reads txt_type, channel_idx and a 4 byte timestamp, so
the frame needs 7 bytes before the text starts, and the branch had no length
guard. For a shorter frame "len - i" is computed in size_t, wraps, and reaches
sendGroupMessage() as a negative int. The clamp there tests
"text_len + prefix_len > MAX_TEXT_LEN", which a negative value passes, and the
following memcpy() converts the length back to a size_t: a 3 byte frame asks for
4294967292 bytes into a 197 byte stack buffer.
Two guards, because there are two mistakes. The branch now states its minimum
like most other branches of handleCmdFrame do, so a frame below 7 bytes is
answered through the existing path instead of being parsed. And
sendGroupMessage() refuses a negative length the way sendGroupData() in the same
file already does, which protects every other caller.
A frame of exactly 7 bytes keeps working and sends an empty message, as before.
Evidence. On a T-Echo running dev 428a95c6, built with
FIRMWARE_BUILD_DATE "f1-dev" and confirmed by "ver => v1.18.0 (Build: f1-dev)":
CH_TXT len=7 -> RESP_CODE_OK
GET_STATS core -> uptime=78s
CH_TXT len=3 -> NO REPLY
DEVICE_QUERY -> NO REPLY (three times over 8 s, node never came back)