Commit Graph
1662 Commits
Author SHA1 Message Date
mikecarper 9ce2a076eb Include and qualify Meshtext in RAK4631 Full Companion
Port Meshtext settings to verified atomic nRF52 storage and use the existing radio RNG and hardware entropy. Keep the ExtraFS boundary, GPS, contacts, channel count and 8 KiB stack unchanged; omit unused library data to fit the image. Require linked codec and Companion transport evidence and build the real RAK Full profile in CI. Add configuration and storage-failure regression coverage.
2026-10-12 22:39:00 -07:00
mikecarper 6b3f7df4d0 Suspend failed ESP32 MQTT and NTP uplinks for power saving
Share one bounded WiFi outage and recovery schedule across MQTT, automatic NTP, Companion station ownership and WebConfig. Preserve enabled settings and foreground access while allowing normal sleep after confirmed physical shutdown.

Honor failed SDK client stops before handing off WiFi, protect clean teardown and reconfiguration, and retry transient ESP-NOW channel restoration without repeated disconnects. Add production-method, SDK failure and real sleep regressions to CI.

Validation: native MQTT/NTP/clock/reconnect suites; production power and wrapper failure tests; browser, room HTTP, OTA and combined bridge regressions; Full Heltec V4 repeater, room and companion builds with capability, flash and linked-memory checks.
2026-10-12 14:57:01 -07:00
mikecarper cbafd44047 Add verified USB-only ESP32 partition migration bridges 2026-10-11 13:28:23 -07:00
mikecarper f304b8ff77 Add Meshtext Companion channel chat and automatic radio2 setup 2026-10-11 02:08:02 -07:00
mikecarper 41f48344bd Add opt-in low power Sensor dog tracking
Acquire fresh GPS and validated UTC, check an authenticated owner Companion, and apply saved lost-status cadence with bounded awake windows. Persist request tags, routes, and six-hour flood reservations; preserve the four-day cutoff across sleep and restart.

Keep Dispatcher recovery active after a failed radio wake, honor denied flood retries after lost TxDone, and qualify GPS ownership and clock corrections. Add executable regression tests and nRF52/ESP32 Sensor build jobs.

Validation: six firmware builds, 1829 native test cases, sanitized tracker/storage/GPS/sleep/recovery tests, and strict documentation build. Bluetooth Find My advertising and automatic Room mailbox polling remain separate work.
2026-10-10 20:08:58 -07:00
mikecarper 3e8c637866 Add Companion lost-status replies and repair room mailbox test adapters
Save an opt-in off/no/yes answer to private Am I lost questions from known
chat contacts. Keep reply traffic and ACK state bounded, preserve pending
user delivery, and expose the setting through local CLI and ESP32 WebConfig.

Retain compact STM32 application/filesystem boundaries, qualify the Tag BLE
queue allowance, and exercise saved-image compatibility and browser controls.
Fix stale room mailbox protocol dependencies in the ACL/route test fixtures.

Validation: ten Companion builds, sanitized production-path regressions,
preference fault/compatibility tests, browser tests, and 86 capacity/build
recipe checks passed. No live radio was flashed for this feature.
2026-10-10 19:24:42 -07:00
mikecarper 33204b768a Add owner-controlled personal room mailboxes and WiFi management 2026-10-10 18:26:13 -07:00
mikecarper 4606f3da60 Add room catch-up and Wi-Fi administration 2026-10-10 11:51:00 -07:00
mikecarper 0eb1d03a16 Let room users manage their own return routes 2026-10-10 11:27:39 -07:00
mikecarper 04f98ea44c Reduce neighbor discovery RAM without changing published results 2026-10-10 01:30:09 -07:00
mikecarper d031609f26 Improve room retention, moderation and local browser access
Add opt-in bounded chat history, persist explicit room ACL roles, enforce full-key bans and per-user quotas, and provide versioned information-board reads plus an ESP32 local room page. Preserve stored evidence on faults and withhold room delivery acknowledgments when a Companion cannot retain the message.

Exercise production handlers and filesystem fault recovery, pinned official-app JavaScript, real Chromium interactions, and representative ESP32, nRF52, RP2040 and STM32 builds. Add regression suites and bounded browser-workspace RAM reservations to CI.
2026-10-09 23:44:00 -07:00
mikecarper 6e4b501dd6 fix(room): preserve ACL roles and persist room topics
Allow unknown blank-password guests only when read-only access is enabled,
disable empty configured credentials, and preserve explicit ACL roles on
reconnect unless a valid admin password selects Admin.

Save room topics through verified, recoverable filesystem transactions. Deliver
topics after older unread posts with independent ACK state and bounded retries,
including clock correction and long-uptime timer handling.

Exercise production handlers and pinned unmodified app JavaScript in CI.
Document topic commands and login policy. Native tests (1829), fault-injection
and compatibility suites, Pico W, V4 Full, G2 Full, and RAK4631 Full/Reduced
build qualification passed. Hardware behavior remains untested for this change.
2026-10-09 22:31:35 -07:00
mikecarper ddf625e9d0 Fix packet, delivery, clock and radio stability regressions
Reject truncated anonymous reply paths and advert metadata before copying,
while preserving timestamp-only empty-password logins. Limit room posting to
read-write/admin ACL roles, retain inbox frames until the requesting transport
accepts them, and lock raw LittleFS traversal against concurrent writes.

Separate ISR event generations from main-loop radio state. Confirm RX/TX IRQs,
detach concrete wrapper callbacks safely, and discard inconsistent LR2021 FIFO
snapshots before rearming. Preserve bridge RX frames through packet-pool
exhaustion and bound ESP-NOW retries and missing-callback recovery. Screen RTC
register layouts without losing DS1307 startup, and ignore poisoned future
contact timestamps during clock bootstrap.

Keep the nRF52 loop stack at 8 KiB while reducing the OTA listing call chain
from 7,832 to 6,056 static bytes. Retain all target names through lossless Full
Companion compression and the canonical size optimizer. Preserve constrained
STM32 filesystems and bind corrected ESP32 UART/OLED budgets to source size
assertions. Document the separately measured preexisting W12 package limits.

Adapted for this branch from meshcore-dev/MeshCore PRs #3521, #3340, #3362,
#2062, #3503, #3038, #3534, #3544 and #3512.

Validation: 1,829 native tests; sanitized parser, inbox, LittleFS, ACL, clock,
RTC, IRQ/FIFO and bridge fault tests; 332 additional Companion cases; real
RAK4631 Full and both repeater profiles, G2 Full/standard, V3 Full and both
constrained STM32 release recipes. Radio-family compile coverage continues
separately; W12 full/portable package guards remain enforced.
2026-10-09 19:56:08 -07:00
mikecarper 466eb008c7 Target signed fleet commands by region and GPS radius 2026-10-09 01:32:12 -07:00
mikecarper fdad79eaf7 Support atomic two-packet signed fleet commands
Automatically split longer signed envelopes into two bounded group-data packets, reserve both before queueing, and roll back exact packet copies and retries on admission failure. Collect fragments in either order with a fixed deadline and verify the complete command before durable replay reservation and dispatch.

Raise whole-fleet protocol capacity to 230 bytes, preserve target-specific budgets and radio acknowledgement barriers, and reject rule-token and USB rescue-line truncation. Document existing app input limits and add real-signature, sanitizer, queue failure, timeout, replay, and compact-board regressions.
2026-10-09 00:46:50 -07:00
mikecarper d74a0f8b44 Default fleet commands to compact whole-fleet targets 2026-10-08 23:57:50 -07:00
mikecarper 89f26fe1c9 Support signed fleet radio schedules and clock updates 2026-10-08 23:27:38 -07:00
mikecarper b0c02b1e47 Support public-key prefixes and lists in signed fleet commands 2026-10-08 17:32:05 -07:00
mikecarper d83fa7cf8e Add signed private fleet controls for filtering and secondary radio
Enroll a private channel and publisher public key on repeaters and room servers. Local Companion fleet sends sign targeted or whole-fleet commands, with expiry, durable replay protection, and a restricted command allowlist. Preserve exact transmitted-reply barriers for secondary-radio changes, bound validation and replies, and qualify crypto, persistence, transport scope, role permissions, and compact-profile exclusions with regression tests.
2026-10-08 16:45:19 -07:00
mikecarper 7a463937ca Reduce shared RAM usage without lowering firmware capacities
Specialize repeater ACL session state, compact recent and flood records, stream Merkle proofs, and release cold OTA buffers safely. Preserve saved formats, stack sizes, table capacities, and OTA source limits. Account for lazy buffers when active and add compatibility, ARM alignment, allocation failure, and queued-response tests.

Validated six representative board/role builds, 1736 native test cases, sanitizer fixtures, and strict documentation. Document the preexisting Wio-E5 Mini flash overflow separately.
2026-10-08 14:41:16 -07:00
mikecarper df88a6ef95 Add opt-in combined RAK4631 Ethernet test image
Keep Full sensors, UART2, adaptive OTA storage and the 8 KiB loop stack. Arbitrate shared SPI and OTA workspace ownership, move network waits into a worker, and use bounded queued TCP operations. Add reproducible test configs, RAM checks and regression coverage. Validated the Full build, UF2 layout and 29 sanitizer runtime scenarios.
2026-10-08 13:53:31 -07:00
mikecarper 8c4e09275e fix(esp32): defer station maintenance while an AP owns WiFi
Starting or restarting MQTT during browser OTA could remove the active AP by forcing STA mode. Defer shared MQTT startup and recovery, and Companion WiFi startup, pending credential reloads and saved-SSID retries, until the live SDK AP releases the driver. Preserve the setup owner's deliberate credential handoff and cooperative stop acknowledgement.

Validated 91 source host tests, including 20 new AP ownership cases and nine reverted controls under ASan/UBSan. Hardware and firmware build qualification remain separate; the Arduino mode snapshot is not atomic.
2026-10-07 02:44:18 -07:00
mikecarper 1e421ff4fc Fix MQTT startup after ESP32 WebConfig provisioning 2026-10-06 19:28:10 -07:00
mikecarper 3bb7c7bdd8 Merge upstream dev while preserving local GPS and USB recovery 2026-10-06 12:56:19 -07:00
mikecarper 219e936ef8 Preserve requested ESP-NOW across manual setup and master restore 2026-10-06 11:46:10 -07:00
mikecarper 97f16dedd0 Fix ESP32 Full idle radio teardown and compact AP startup 2026-10-06 11:46:10 -07:00
mikecarper 1adf0c6d01 Scope charger controls to T-Beam and Mesh Solar flash budgets 2026-10-06 11:22:03 -07:00
mikecarper c97dbd791a Add persistent T-Beam charge voltage controls and report Mesh Solar limits 2026-10-06 10:56:32 -07:00
mikecarper 19379eb9b8 Use C6L native USB and recover diagnostics-only Companion sessions 2026-10-06 10:14:59 -07:00
mikecarper df5e591319 Bound telemetry replies and preserve Sensor send retries 2026-10-06 09:56:00 -07:00
mikecarper ba6e48b5ce Fix Room and Sensor requests and add G3 Sensor builds
Bound ACL replies for encrypted routes, authorize Sensor ACL access using the actual Admin role, and preserve request retries after failed queue admission. Validate stored paths for replies, while keeping Room keep-alives direct-only.

Add both G3 RF-slot Sensor profiles, suppress battery alarms on unavailable measurements, and remove the unsupported Sensor WebConfig capability. Add executable regression coverage and CI checks.
2026-10-06 09:20:05 -07:00
mikecarper 95913c5301 Retry saved WebConfig WiFi when the MQTT worker is absent 2026-10-05 22:10:36 -07:00
mikecarper 1d0ae06800 Keep the console responsive during MQTT shutdown 2026-10-05 19:05:58 -07:00
mikecarper 51d74a200e Retain independent RS232 in Full MQTT repeaters 2026-10-05 18:21:42 -07:00
mikecarper 5f10e7d601 Include runtime ESP-NOW in Full ESP32 repeaters 2026-10-05 17:33:02 -07:00
mikecarper 7ef67c49f5 Combine MKE S3 repeater bridge modes at runtime 2026-10-05 17:12:10 -07:00
mikecarper 0b9a80d7ed Avoid repeated missing SPIFFS scans during ESP32 startup 2026-10-05 14:12:44 -07:00
mikecarper 7821329851 Keep OTA headers aligned with the checked-out vendored source 2026-10-05 11:56:00 -07:00
mikecarper 0529a461f2 Keep automatic ESP-NOW retries paused during browser OTA 2026-10-05 11:06:30 -07:00
mikecarper c38ba5f8d0 Make ESP32 OTA startup handle WiFi and WebConfig automatically
Report the upload address and required network, honor AP switches on an existing uploader, and keep delayed WebConfig cleanup from disabling OTA WiFi. Preserve actionable startup errors and account for OTA in wireless state controls.

Exercise the production OTA lifecycle and stock website console, including power-saving idle sessions, in host regression tests.
2026-10-05 10:31:43 -07:00
mikecarper 19d02c0dfa Preserve flood policies across qualified RAM capacity changes 2026-10-05 03:33:44 -07:00
mikecarper 982f96ca96 Avoid Companion request tag collisions after login 2026-10-05 01:47:05 -07:00
mikecarper 835c7a8e6e Migrate ESP32 native USB roles to bounded hardware CDC
Switch eight S3 board defaults and 78 remaining TinyUSB recipes to hardware Serial/JTAG while preserving UART and other platforms. Restore retained S3 PHY ownership after a TinyUSB OTA restart and prepare KISS queues before enabling the driver.

Add real recipe resolution, Companion/KISS transport sanitizer coverage, and RF lifecycle reset regressions to CI. Native tests pass 1765/1765; SDK, transport, recipe and USB watchdog checks pass. Board and role cross-compilation and physical OTA qualification continue.
2026-10-04 23:36:54 -07:00
mikecarper e4420519a4 Fit Access Control replies to encrypted packet route budgets 2026-10-04 14:24:03 -07:00
mikecarper 9268c57f8c Support stock serial MQTT bridges on Full Companion 2026-10-04 14:14:53 -07:00
mikecarper 9c43efb0bc Coalesce ESP background contact I/O and defer backup cleanup 2026-10-04 11:50:12 -07:00
mikecarper 15bdb7fc4d Batch ESP background contact CRC checks without growing scratch storage 2026-10-04 09:27:54 -07:00
mikecarper 55e4f47338 Service ESP received advert cache writes between loop passes 2026-10-04 08:20:28 -07:00
mikecarper 0a3187ac30 Stage ESP contact transaction startup between loop passes
Heltec V4 timing measured 2.19 seconds for recovery checks, temporary-file cleanup, open and buffer configuration combined in one lazy-save pass. Defer those startup operations across guarded companion loops while explicit durability callers still initialize synchronously.

Track ownership only after attempting to create the temporary file, preserve unowned stale files on early cancellation, and reject premature writes or commits. Cover startup faults, interruption, mutation, cache pressure and synchronous-construction negative controls with native sanitizer tests.
2026-10-04 05:27:09 -07:00
mikecarper 4f114e914b Keep ESP contact saves responsive on PSRAM boards
Extend the cooperative contact transaction to uncached ESP32 storage,
including the PSRAM policy used by the XIAO and V4. Preserve owned contact
copies, the 152-byte disk format, revision cancellation and synchronous
durability operations. Keep contact capacities unchanged.

Avoid SDK error logs when optional blob or transaction cleanup files are
absent, while preserving metadata and deletion failure handling.

Validate cached ESP/nRF and uncached PSRAM paths under ASan/UBSan,
including bounded writes, mutation cancellation, faults, recovery and
reboot readback. Update the existing uncached production fixture.
2026-10-04 04:01:40 -07:00