Commit Graph
1397 Commits
Author SHA1 Message Date
MUSTARDTIGERFPV f0c4c6af00 Enable the on-demand mOTA context for every classic ESP32 build
Move OTA_HEAP_CONTEXT from two hand-edited envs to a pre-script gated on
build.mcu == "esp32", so every classic ESP32 image gets it and none can drift.
S2/S3/C-series and nRF52 keep the .bss singleton: they have no equivalent
static-DRAM ceiling, so there a guaranteed-present workspace is the better
trade for what is ultimately a recovery path. It has to be a build flag rather
than a header default, because OTA_HEAP_CONTEXT must hold the same value in
every translation unit that sees OtaContext.h - OtaContext.cpp included - and a
header test on CONFIG_IDF_TARGET_ESP32 would depend on include order relative
to sdkconfig.h. The script defers to OTA_SHARED_COMPANION_QUEUE where a Full
Companion recipe already owns the storage.

Fix a gap this exposes in the roles that now use it. Only CLI entry points
acquire the context, so once it was released, a repeater with the temporary
radio profile up would no longer serve or announce its own firmware - LoRa OTA
would look enabled and silently do nothing. ota_service_temp_radio_context()
holds the workspace for exactly the temp-radio window and hands it back
outside it, which is where the saving was coming from anyway. Wired into the
repeater, room server and sensor loops; the Companion keeps its own
acquire-on-host-demand policy, since its context is borrowed from the offline
message queue and must not be taken speculatively.

Static DRAM, classic ESP32 (bytes occupied of a 124,580 region):
  Heltec_v2_repeater                   108,332 -> 70,732
  Heltec_v2_room_server                 83,716 -> 68,300
  Heltec_v2_companion_radio_ble        123,236 -> 107,772  (was failing on main)
  Tbeam_SX1262_repeater                 86,932 -> 71,468
  Tbeam_SX1262_repeater_observer_mqtt  121,132 -> 83,532   (was failing)
2026-09-09 01:24:00 -07:00
MUSTARDTIGERFPV afa1036304 Move large repeater tables off classic ESP32 static DRAM
Classic ESP32 links into a dram0_0_seg of only 124,580 bytes: memory.ld
carves the BT controller's 0xdb5c (56,156) reservation off the 0x2c200
window before the application gets any. Three large objects dominated what
was left, and Tbeam_SX1262_repeater_observer_mqtt overran the build's 8 KiB
static reserve by 4,744 bytes.

Heap-allocate them instead, each with a defined behaviour when the
allocation fails:

- OtaContext: generalize the Companion's borrowed-storage path behind
  OTA_DYNAMIC_CONTEXT and add OTA_HEAP_CONTEXT, which allocates the context
  on first use and frees it once no transfer, apply or folder link needs it.
  A repeater is idle nearly all the time, so the workspace is usually absent.
  Exhaustion is reported to the caller and the operation declines.
- ClientACL: the client table becomes a pointer with a live capacity;
  capacity 0 refuses new clients rather than writing through a null table.
- MyMesh flood packet filters: likewise, with flood_packet_filter_slots as
  the live bound for every rule loop. At capacity 0 the node forwards
  unfiltered, and both save paths refuse to write so a stored ruleset is
  never replaced by an empty file.

Also override the Arduino SDK's weak btInUse() in simple_repeater so
initArduino() releases the BT controller memory to the heap. That grows the
runtime heap these tables now come from; it cannot recover the same
reservation from the linker's static window.

Static DRAM, classic ESP32:
  Heltec_v2_repeater                   108,332 -> 70,732
  Tbeam_SX1262_repeater_observer_mqtt  121,132 -> 83,532  (was failing)
2026-09-09 01:24:00 -07:00
mikecarper 726598559a Add multi-tap channel navigation for messages 2026-09-08 22:47:15 -07:00
mikecarper ecf4ffb824 Allow frequency changes over authorized LoRa CLI 2026-09-08 22:07:30 -07:00
mikecarper 06c51fdef5 Allow local CLI maintenance across direct connections 2026-09-08 21:44:57 -07:00
mikecarper 373c2daebe Enable the shared terminal on WiFi-only Companions 2026-09-08 19:56:12 -07:00
mikecarper c946adadfe Share the Companion terminal with the WiFi console 2026-09-08 19:48:15 -07:00
mikecarper 6fbc6bed19 Preserve MQTT settings across slot changes 2026-09-08 18:55:00 -07:00
mikecarper 4c8aad5b16 Unify device controls and restore the WiFi console 2026-09-08 18:36:23 -07:00
mikecarper 3746f9d5f4 cleanup 2026-09-08 17:46:37 -07:00
mikecarper cf4dc13c62 Add button navigation hints to the hidden John reader 2026-09-08 17:31:18 -07:00
mikecarper d89d28f7ed Merge origin/keymindCascade with companion button hints 2026-09-08 17:24:27 -07:00
mikecarper 5f25ae3bb3 Show button controls on companion home and message screens 2026-09-08 17:11:43 -07:00
mikecarper bcc577ae98 Place setup AP status below the WiFi address 2026-09-08 16:56:10 -07:00
mikecarper 86eabef4ff Show connected WiFi address on the V4 setup screen 2026-09-08 16:47:19 -07:00
mikecarper aab46c7c84 Use native display resolution and adaptive typography 2026-09-08 16:02:16 -07:00
mikecarper 272dc9aa4b Use readable 6px message font and keep 5px on tiny panels 2026-09-08 14:23:39 -07:00
mikecarper c0645fdc18 Use compact message text and sender lines on all small displays 2026-09-08 13:36:40 -07:00
mikecarper 6db10c3986 Cache Full Companion paths and shared secrets to recover RAM 2026-09-08 12:21:30 -07:00
mikecarper f090cf19d7 Avoid nested MQTT preference copies on the Companion loop stack 2026-09-08 10:05:59 -07:00
mikecarper d88b162f28 Restore the V4 WiFi setup QR with a one-pixel border 2026-09-08 09:30:31 -07:00
mikecarper 0d7ca2d343 Gate every firmware build on runtime RAM and share nRF52 mOTA storage 2026-09-08 02:09:26 -07:00
mikecarper 2ea493994e Share T096 Full mOTA memory with the offline queue 2026-09-08 01:15:19 -07:00
mikecarper d28535f503 Add independent Companion Bluetooth stealth flag
Keep stealth separate from custom, saved-random and rotating MAC policies without migrating the development MAC mode. Persist authenticated peer state, guard advertising transitions and recovery, and expose the setting through the CLI and WebConfig.

Add regression and CI checks and record exact XIAO BLE pairing, reconnect, reboot and address-rotation hardware results.
2026-09-07 23:46:55 -07:00
mikecarper 8d72c3e3da Add configurable Companion Bluetooth addresses 2026-09-07 18:29:00 -07:00
mikecarper 09639d7e02 Fix G3 USB sleep and two-minute button wake 2026-09-07 16:28:02 -07:00
mikecarper a2c3761700 Prepare 1.17.1.5 USA Cascade release and verify update capabilities 2026-09-05 08:59:50 -07:00
mikecarper 8995675e1c Enforce classic ESP32 memory budgets and safe image merging 2026-09-05 08:22:56 -07:00
mikecarper b724d19d6f Protect ESP32 HWCDC console sessions 2026-09-04 17:18:54 -07:00
mikecarper 65a53285d9 Make uf2reset available across nRF52 CLI roles 2026-09-04 02:01:40 -07:00
mikecarper e36b092aa3 Fix USB radio stalls and add durable replay timestamp recovery 2026-09-03 23:58:32 -07:00
mikecarper 73f10f3fc3 Automatically recover internal Companion ExtraFS on boot 2026-09-03 15:15:23 -07:00
mikecarper 3443fc88ef Hide message footer on compact displays 2026-09-03 09:12:06 -07:00
mikecarper 9d920c4061 Give Full builds exclusive USB mOTA ownership 2026-09-03 02:33:23 -07:00
mikecarper da774e9e75 Add observed login path commands 2026-09-02 19:23:56 -07:00
mikecarper 2ce59b58ed Harden nRF52 contact and settings persistence 2026-09-02 17:32:43 -07:00
mikecarper 249c3680b3 Fix auto nRF52 Companion OTA builds 2026-09-02 12:02:41 -07:00
mikecarper cb27fa8539 Fix nRF52 contact persistence and ExtraFS recovery 2026-09-02 11:41:38 -07:00
mikecarper 4d89de8544 Improve companion setup and USB session recovery 2026-09-02 03:44:28 -07:00
mikecarper 9816e21834 Harden nRF52 OTA, USB sessions, and T096 controls
Bind Companion replies to request transports, make dual-CDC USB sessions nonblocking and reconnect-safe, and harden nRF52 watchdog/OTA storage paths. Fix T096 button debounce, display wake, sleep races, and the compact message layout; add exact WisBlock OTA profiles plus expanded native/static/HIL documentation.
2026-09-01 20:51:43 -07:00
mikecarper 5de1820765 Unify companion BLE and WiFi setup flows 2026-09-01 01:25:00 -07:00
mikecarper 1264f62e9d Add WiFi setup QR to ESP32 displays 2026-08-31 21:49:12 -07:00
mikecarper a5f3a5c5da Make Indicator WiFi setup state actionable 2026-08-31 20:54:56 -07:00
mikecarper 6df9a9f686 Keep Indicator RGB scanout alive during expander recovery 2026-08-31 19:10:54 -07:00
mikecarper 260b07999e Recover Indicator display after warm reset 2026-08-31 19:06:07 -07:00
mikecarper bf2d4e4b93 Make Indicator WiFi display authoritative 2026-08-31 18:45:44 -07:00
mikecarper b562af845a Refresh Indicator WiFi connection state 2026-08-31 18:36:44 -07:00
mikecarper ec94ac44ae Add Indicator WiFi setup as eighth home page 2026-08-31 17:31:48 -07:00
mikecarper 0496affcf8 Keep Indicator setup text large on fallback canvas 2026-08-31 16:36:46 -07:00
mikecarper 4bbdf4b071 Enlarge Indicator native setup screen 2026-08-31 16:10:03 -07:00