Commit Graph
96 Commits
Author SHA1 Message Date
mikecarper d2c52e4d04 Compile STM32 USB Companion in CI to catch framework drift 2026-09-13 17:32:33 -07:00
mikecarper d4a641ff8a Keep STM32 text conversion compatible with current Arduino cores 2026-09-13 17:24:56 -07:00
mikecarper 0938da5ea6 Default all USB Companions to ASCII across host sessions 2026-09-13 17:13:51 -07:00
mikecarper 794cf15395 Preserve Full USB packet logging and verify packaged firmware 2026-09-13 15:34:00 -07:00
mikecarper a7f58dd437 Refresh 1.17.1.6 picker metadata and preserve capacity directions 2026-09-13 12:51:12 -07:00
mikecarper 283acd27f5 Repair constrained nRF52 release builds and retain size-failure diagnostics 2026-09-13 09:37:50 -07:00
mikecarper 3b6c894ee2 Add two-profile LoRa operation and radio CLI regression coverage
Implement radio2, tempradio2, radioat2 and tempradioat2 across Mesh roles,
with RX-only/RX+TX operation, optional preambles and persistent cross-TX
policy. Keep temporary OTA traffic on its profile by default and maintain
independent retry ownership and backoff for each profile.

Use slow-first receive scanning with 4.8-symbol visits and automatic
preambles rounded up in steps of eight. Preserve pending RX, restore power
saving on exit, and discard work bound to changed or expired profiles.

Restore the infrastructure path.hash.mode setter and report unsupported
extra.sf settings consistently. Add CLI, scheduling, scan and retry tests,
setup documentation, and the V4/XIAO hardware validation results.

Validation: 1,422 native tests, eight KISS tests, 63 final focused profile
tests, 18 checks from the staged source, sanitizer-enabled OTA transfers,
and builds for V4 Mesh roles, Full XIAO Companion and nRF52 T1000-E.
Hardware checks cover reception, cross-TX policy, expiry, reboot and OTA
discovery while receiving main-channel adverts.
2026-09-13 08:25:00 -07:00
mikecarper 12a3a467e1 Make repeater RX watchdog MeshCore-aware and tune temporary radio
Use RX-only radio recovery and feed the repeater reboot watchdog after MeshCore parsing. Default to 24 hours, apply temporary watchdog and advert intervals in RAM, and report temporary durations as days, hours, and minutes. Add regression coverage and an ESP-NOW bridge setup guide.
2026-09-11 22:10:13 -07:00
mikecarper fa010196b1 Merge PR #7 with reviewed ExpressLRS power and memory fixes
Integrate ExpressLRS TX module support and its stacked ESP32 heap changes.
Use the approved Linkflow calibration (17-30 dBm), preserve the PA drive
and output path after radio recovery, and keep LoRa OTA enabled.

Preserve stored ACLs and filters on allocation failure, release owned
client/filter buffers, service heap OTA contexts on Companions, release
self-serving workspaces after TempRadio, and reset staged-resume state
when a context is released. Keep manual staging and active operations
alive. Account for all moved allocations in the runtime RAM gate.

Validation: 1,393 native cases; radio-power, heap-context, ACL persistence,
shared-queue transfer, display/inbox, radio receive, and memory regressions.
Firmware builds passed for Linkflow, Heltec V2 Companion, T-Beam MQTT
repeater, Heltec V4 R8 MQTT repeater, RAK4631 repeater, and Indicator Full.
Physical verification awaits access to the currently offline lab Pi.
2026-09-10 22:06:16 -07:00
mikecarper 01cc7b8ae4 Separate Companion message history from pending inbox
Default to retained history with a separate pending count, and add persistent display.inbox CLI modes for history, pending, and unread. Preserve browsing while clients are connected and show the active USB or Bluetooth connection.

Fixes #5
2026-09-10 21:42:57 -07:00
mikecarper a814a00ce7 Add configurable battery and USB display behavior
Persist separate display modes and timeouts in seconds for battery and USB power, expose four controls in WebConfig and CLI, and apply one shared policy across display-equipped roles.

Detect R8 external power from a USB host or calibrated battery voltage above 4.21 V, with cached sampling and hysteresis. Add policy, persistence, browser, and R8 power-detection regression coverage.
2026-09-10 21:03:15 -07:00
mikecarper 2bf668ac95 Run receive recovery and radio status regression tests in CI 2026-09-10 13:25:41 -07:00
mikecarper 602dbfe3d9 Fix inherited nRF52 USB READY hang in build-local TinyUSB driver 2026-09-10 02:37:15 -07:00
mikecarper 14796e6573 Fix touchscreen navigation and add runtime touch diagnostics 2026-09-09 17:38:41 -07:00
mikecarper 4c1ed2593a Fix bootloader version discovery and tolerate legacy OTA probes 2026-09-08 16:17:43 -07:00
mikecarper e0a229fb91 Publish memory-corrected 1.17.1.5 catalogs and picker directions 2026-09-08 02:53:48 -07:00
mikecarper aa20e9278e Gate every firmware build on runtime RAM and share nRF52 mOTA storage 2026-09-08 02:09:26 -07:00
mikecarper 1b6a9dcb6a Share T096 Full mOTA memory with the offline queue 2026-09-08 01:15:19 -07:00
mikecarper 6958d82432 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 b25005f52f Document and test 1.17.1.5 USB logging sleep workaround 2026-09-07 16:55:28 -07:00
mikecarper fc3298c84d Fix G3 USB sleep and two-minute button wake 2026-09-07 16:28:02 -07:00
mikecarper f8dfcaa240 Enforce classic ESP32 memory budgets and safe image merging 2026-09-05 08:22:56 -07:00
mikecarper 69d9d9e62a Make uf2reset available across nRF52 CLI roles 2026-09-04 02:01:40 -07:00
mikecarper 509f831442 Add external QSPI staging for nRF52 OTA 2026-08-20 17:51:52 -07:00
mikecarper 1e4fee0750 Merge remote-tracking branch 'review/observer-firmware' into keymindCascade
# Conflicts:
#	MQTT_IMPLEMENTATION.md
#	examples/simple_repeater/MyMesh.cpp
#	examples/simple_room_server/MyMesh.cpp
#	examples/simple_sensor/SensorMesh.cpp
#	src/helpers/CommonCLI.h
#	src/helpers/MQTTPresets.h
#	src/helpers/bridges/MQTTBridge.cpp
#	src/helpers/bridges/MQTTBridge.h
#	src/helpers/radiolib/CustomLLCC68Wrapper.h
#	src/helpers/ui/SH1106Display.cpp
2026-08-19 13:45:47 -07:00
mikecarper 7605b12cc7 Merge remote-tracking branch 'review/observer-firmware' into keymindCascade
# Conflicts:
#	.github/workflows/build-observer-firmwares.yml
#	.gitignore
#	MQTT_IMPLEMENTATION.md
#	MQTT_INTERNALS.md
#	README.md
#	STABILITY_TESTABILITY_HANDOFF.md
#	docs/cli_commands.md
#	examples/companion_radio/MyMesh.cpp
#	examples/simple_repeater/MyMesh.cpp
#	examples/simple_repeater/UITask.cpp
#	examples/simple_room_server/MyMesh.cpp
#	examples/simple_room_server/UITask.cpp
#	examples/simple_sensor/SensorMesh.cpp
#	platformio.ini
#	scripts/generate_webconfig_html.py
#	scripts/webconfig_mock_server.py
#	src/helpers/CommonCLI.cpp
#	src/helpers/CommonCLI.h
#	src/helpers/JWTHelper.cpp
#	src/helpers/MQTTDefaults.h
#	src/helpers/MQTTMessageBuilder.cpp
#	src/helpers/MQTTPayloadBuilder.h
#	src/helpers/MQTTPresets.h
#	src/helpers/bridges/MQTTBridge.h
#	src/helpers/esp32/WebConfigServer.cpp
#	src/helpers/esp32/WebConfigServer.h
#	src/helpers/ui/SH1106Display.cpp
#	variants/lilygo_tbeam_SX1262/platformio.ini
#	variants/lilygo_tbeam_SX1276/platformio.ini
#	variants/lilygo_tlora_v2_1/platformio.ini
#	variants/thinknode_m7/platformio.ini
#	webui/index.html
2026-08-14 08:53:02 -07:00
agessaman 47c80fecf3 ci: bump observer channel base version to v1.17.1
Both channels move together so a node comparing its embedded base against
its own channel's manifest does not read as permanently behind.

Resets the per-base build counter to N=1 on both channels. Nodes still on
v1.17.0.N take the diff_base branch in ESP32Board's OTA comparison, so the
counter going backwards does not strand them.
2026-08-14 08:10:42 -07:00
mikecarper ea3843e0b4 Merge branch 'PowerSaving-v17' of https://github.com/IoTThinks/MeshCore into keymindCascade
# Conflicts:
#	examples/companion_radio/MyMesh.cpp
#	examples/companion_radio/NodePrefs.h
#	examples/simple_repeater/MyMesh.cpp
#	examples/simple_room_server/MyMesh.cpp
#	examples/simple_sensor/SensorMesh.cpp
#	platformio.ini
#	src/MeshCore.h
#	src/helpers/CommonCLI.cpp
#	src/helpers/CommonCLI.h
#	src/helpers/radiolib/CustomSX1262Wrapper.h
#	src/helpers/radiolib/CustomSX1268Wrapper.h
#	src/helpers/radiolib/LR11x0Reset.h
#	src/helpers/radiolib/SX126xReset.h
2026-08-11 13:28:43 -07:00
IoTThinks f0b1f9fdf7 Merge branch 'meshcore-dev:main' into main 2026-08-10 19:17:59 +07:00
agessaman 8f12b89d6d ci: bump observer channel base version to v1.17.0
Both channels move together: the beta workflow's FIRMWARE_VERSION must equal
production's, since a node compares its embedded base against its own channel's
manifest and a mismatch would read as permanently behind.

Resets the per-base build counter to N=1 on both channels. Nodes still on
v1.16.0.N take the diff_base branch in ESP32Board's OTA comparison ('different
base version is always an update'), so the counter going backwards does not
strand them; the build-number arithmetic only runs when the base matches.

The flasher repo's config.json version key still needs the matching bump.
2026-08-09 06:57:43 -07:00
agessaman 339bffa97d ci: sync the portal page to the flasher site for /webconfig
The flasher's /webconfig page frames webui/index.html — the real page this
firmware serves — and runs it against a browser simulator, so visitors drive the
actual product rather than looking at screenshots of it. That only stays true if
the page travels with the docs, so it joins the .md files this workflow already
syncs, and the flasher's build-webconfig-demo.py re-injects the simulator.

Triggers on webui/index.html alongside the existing markdown paths. Still gated
on observer-firmware, so nothing publishes until the portal CLI reaches the
release channel at v1.17.0; the flasher carries a hand-copied page until then.
2026-08-08 20:02:31 -07:00
mikecarper 64f9942001 Add telemetry history decoder page 2026-08-05 18:19:34 -07:00
agessaman 612c52132c merge: upstream/dev into observer-firmware-dev (2026-07-30, db232808)
Absorbs 106 upstream commits. Seven files conflicted; the substantive one
was upstream's new JSON ConfigSerializer (PR #2982), which replaces the
binary /com_prefs layout with /prefs.json and makes NodePrefs a
ConfigSerializer subclass.

Prefs migration
- Adopt upstream's ConfigSerializer. writeCommonPrefsImage() and its
  documented offsets (0-294) are deleted, along with the now-unreachable
  saveCommonPrefsImageAtomically()/CommonPrefsFileStore atomic rename path.
- Load order is /prefs.json, then /com_prefs, then /node_prefs. Upstream
  dropped the /node_prefs fallback; it is restored here so devices that
  never advanced past that filename keep their config.
- Legacy files are never removed, so migration cannot destroy its own
  source and a deferred or failed save simply retries next boot.
- /com_prefs is treated as a format migration only, not an "upgrade", so
  it does not trip the bridge.source tx->rx flip on existing nodes.
- The MQTTPrefsAtomicStore legacy gate is retained: the observer tail
  recovered from an old-format file still commits to /mqtt_prefs before
  /prefs.json is written.
- MQTTPrefs and /mqtt_prefs are untouched; savePrefs keeps its save_mqtt
  parameter and now returns upstream's bool.

Fixes to upstream code
- RadioPrefs::structure() bound both "rxgain" and "fem_rxgain" to
  rx_boosted_gain, so radio_fem_rxgain was never persisted. Bound to the
  correct field.
- discovery_mod_timestamp was dropped from structure(); it gates
  'since'-filtered DISCOVER replies and is set on every config change, so
  losing it would silently stop discovery responses after a reboot. Added
  as "disc_mod".

Merge artifacts repaired
- Restored bblanchon/ArduinoJson to the native test env; a clean but wrong
  auto-merge at the lib_deps block boundary dropped it and broke all 19
  host test suites.
- Migrated the fork's WebConfig UITask screens off the removed
  DisplayDriver::Color enum to upstream's UIColor element types.
- Removed duplicate getCADEnabled() definitions in companion MyMesh.cpp
  and simple_sensor SensorMesh.cpp that both sides had added.
- Dropped memset(&_prefs, 0, ...) in the four example meshes; NodePrefs now
  has a vtable. guard gains an initializer that memset used to provide.

Other resolutions
- simple_room_server keeps both the fork's discover.* commands and
  upstream's new room.post.
- docs/payloads.md taken from upstream, undoing content earlier merges had
  reverted (Control data section, split login tables).

Verified: 273/273 host tests pass across native and native_kiss_modem;
Heltec v3 repeater, repeater_observer_mqtt, room_server_observer_mqtt,
sensor, and companion_radio_ble all build clean.
2026-07-30 14:56:23 -07:00
IoTThinks 9fb94272c6 Update GitHub funding username to IoTThinks 2026-07-27 09:54:21 +07:00
agessaman 0c86e0dcde chore: ignore throwaway build worktrees
observer-firmware had a .build-wt-<sha> worktree committed as a gitlink, which
made every CI checkout warn "No url found for submodule path ... in .gitmodules"
and broke `git submodule` in fresh clones. This branch has no such entry; ignore
the pattern so it stays that way, and skip it in both channels' paths-ignore
since a build worktree can never change the binaries.

The production build workflow is taken from observer-firmware verbatim, keeping
the copy on this branch identical and conflict-free on promotion.
2026-07-24 20:18:20 -07:00
agessaman c691864397 ci: give the beta channel its own concurrency group
Concurrency groups are repo-wide, not per-branch, so the beta build sharing
`flasher-publish` with the production workflows meant an in-flight beta build
forced a production build into the pending state — where the next run queued into
that group cancelled it outright. That is what silently dropped the production
build of the eastidahomesh preset fix: the beta build held the group from
22:29:24 to 22:37:34, production's build queued at 22:31:26 and went pending, and
its docs sync evicted it a second later.

Beta now uses its own group and, since the channels are no longer serialized
against each other, its flasher push rebase-retries the same way production's
does (with --autostash, because the scoped add here leaves the checkout dirty).

Also refresh the two workflow copies this branch never received: they still
triggered on the retired mqtt-bridge-implementation-flex branch, so they were
dead on push while still sitting in the shared group. Taking production's current
versions verbatim keeps them inert here and conflict-free on promotion.
2026-07-24 20:04:55 -07:00
mikecarper c1caa5ad81 Merge observer firmware and webconfig updates
# Conflicts:
#	MQTT_INTERNALS.md
#	build.sh
#	docs/cli_commands.md
#	examples/simple_repeater/MyMesh.cpp
#	examples/simple_repeater/MyMesh.h
#	examples/simple_repeater/UITask.cpp
#	examples/simple_room_server/MyMesh.cpp
#	examples/simple_room_server/MyMesh.h
#	examples/simple_room_server/UITask.cpp
#	examples/simple_sensor/SensorMesh.cpp
#	platformio.ini
#	scripts/generate_webconfig_html.py
#	src/MeshCore.h
#	src/helpers/CommonCLI.cpp
#	src/helpers/CommonCLI.h
#	src/helpers/CommonCLI_Observer.cpp
#	src/helpers/ESP32Board.h
#	src/helpers/MQTTMessageBuilder.cpp
#	src/helpers/MQTTPresets.h
#	src/helpers/NRF52Board.cpp
#	src/helpers/NRF52Board.h
#	src/helpers/bridges/MQTTBridge.cpp
#	src/helpers/bridges/MQTTBridge.h
#	src/helpers/esp32/WebConfigServer.cpp
#	src/helpers/esp32/WebConfigServer.h
#	src/helpers/radiolib/RadioLibWrappers.cpp
#	src/helpers/radiolib/RadioLibWrappers.h
#	variants/lilygo_tbeam_SX1262/platformio.ini
#	variants/lilygo_tbeam_SX1276/platformio.ini
#	variants/lilygo_tlora_v2_1/platformio.ini
#	webui/index.html
2026-07-24 02:16:47 -07:00
mikecarper 566ef08f25 Merge upstream dev into keymindCascade 2026-07-24 01:23:20 -07:00
Liam Cottle d531a98da1 Merge pull request #2819 from ViezeVingertjes/fix/kiss-modem-usb-backpressure
fix: prevent ESP32 KISS modem stalls under USB backpressure
2026-07-24 11:51:34 +12:00
mikecarper 371d86c4b1 Normalize tracked text to ASCII 2026-07-22 00:43:38 -07:00
agessaman 8cec341d78 ci(mqtt): add preset name-parity check across channels
Keep observer-firmware and observer-firmware-dev from drifting on
built-in MQTT preset names while allowing config details to differ.
2026-07-21 08:54:02 -07:00
liamcottle 8c987c8689 Merge remote-tracking branch 'official/main' into dev 2026-07-20 20:42:09 +12:00
agessaman f5090667b9 build: add FILENAME_CHANNEL_TAG; dev channel tags asset filenames with -dev
Dev-channel assets are now named <env>-v1.16.0-dev-<hash>.bin so a
downloaded file identifies its channel at a glance; production names are
unchanged (tag unset). The tag sits between version and hash, lowercase
letters only — the flasher-side parsers (gen-slim ASSET_RE, /releases
Worker label+dedupe, flasher.js stale-URL recovery) were made
tag-tolerant first and are already deployed. Filename-end hash
extraction (release pruning) is position-independent and unaffected.

Pushing this intentionally triggers a beta build: that publish is what
applies the new naming. The Worker's dedupe collapses the untagged
9276b6a generation and the new tagged one to the newest per env, so the
flasher never lists both.
2026-07-19 22:37:09 -07:00
agessaman a2a7cceefb ci(beta): stop deriving config-beta.json; sync release notes to the release body
The flasher's Version dropdown is feed-driven now (/releases on the
firmware-proxy Worker lists both channels), so the beta channel needs no
config of its own: drop the config-beta.json derivation and the
update-firmware.py --config call (which would exit nonzero once
config.json's observer entries become github defs with no embedded
filenames). The flasher commit is now scoped to beta/v/ and the counter.

The release body gets the dev-channel warning + firmware-notes.html via
gh_retry'd 'gh release edit' (non-fatal), serving as this channel's
dropdown changelog.

MUST land before the flasher config.json conversion, together with the
matching production-workflow change (26db31f6 on observer-firmware).

Workflow-only commit: pushing this triggers no build.
2026-07-19 21:47:22 -07:00
agessaman 48799d5361 ci(beta): source slim manifests from build output
Flip gen-slim-manifests.py to its new --bin-dir mode (flasher repo PR #1):
beta/v manifests now come from out/ — the assets actually uploaded to the
release — instead of the derived config-beta.json, which the /releases
feed migration will retire. STATIC_PATH already exists in this workflow's
env and stays the manifest download host.

Workflow-only commit (.github/** is in paths-ignore): pushing this
triggers no build; the change is exercised by the next real push to
observer-firmware-dev.
2026-07-19 21:25:54 -07:00
agessaman 9fc90ee099 ci(beta): retry GitHub API calls in the publish step
Run 29708863985 had every build shard green and then died here:

  HTTP 503 ... (https://api.github.com/repos/agessaman/MeshCore/releases)
  Error: Process completed with exit code 1

'gh release create' hit a transient 503 during a GitHub incident and, under
'bash -e', threw away ~15 minutes of building across 14 runners. Nothing was
wrong with the code.

Add a gh_retry helper (5 attempts, exponential backoff 10/20/40/80s) around the
create and upload calls. 'until' in a condition does not trip -e, so the helper
is safe in this shell.

Deliberate choices:
- The existence check is NOT retried: 'release does not exist' is the expected
  answer on a first run and retrying would only burn backoff. A 5xx there falls
  through to create, which now tolerates an already-existing release.
- Prune failures no longer fail the job. Pruning is housekeeping that runs AFTER
  a successful upload; leaving stale assets until the next run beats reporting
  failure for a build whose binaries are already published.
- The prune's second 'gh release view' is gone — it reuses the asset list already
  fetched, removing an API call as well as an unretried failure point.

Retry helper unit-tested for the success, transient-recovery, and
exhaustion paths.

Production (build-observer-firmwares.yml) has the identical fragility and should
get the same treatment; not changed here to keep this scoped to the beta channel.
2026-07-19 17:23:10 -07:00
agessaman f1390afa71 ci(beta): drop self-referencing env redeclarations
The build step redeclared OTA_MANIFEST_BASE_URL and OTA_CHANNEL_TAG as
${{ env.X }}, referencing the very variables it was setting. Workflow-level
env: is already inherited by every step, so this was redundant; had the
self-reference resolved empty it would have silently blanked the channel and
produced firmware with no manifest base. The verify step would have caught it,
but the risk is unnecessary.
2026-07-19 15:14:26 -07:00
agessaman 8daa86096d ci(beta): trigger on push to observer-firmware-dev
Dispatch-only does not work in this repo. The fork's default branch is `dev`
(an upstream mirror carrying none of the observer workflows), and GitHub only
surfaces workflow_dispatch for workflows present on the DEFAULT branch — so the
beta workflow would never have appeared in the Actions UI and could not have
been run at all.

Adding fork-specific workflows to `dev` would pollute the upstream mirror and
conflict on every upstream sync, so the push trigger is the right mechanism: it
runs from the file on the pushed branch, which is exactly how the production
observer workflow already works.

workflow_dispatch is retained (harmless, and starts working if the default
branch ever changes). paths-ignore mirrors production so docs/CI-only commits
do not rebuild firmware.

Trade-off now explicit in the file: every push to observer-firmware-dev
publishes a dev build. Stage on a side branch and fast-forward when you intend
to release.
2026-07-19 15:07:10 -07:00
agessaman 5f027f1a9c docs: rename branch to observer-firmware-dev; document release channels
The branch was named as a one-off dated merge (merge/upstream-dev-20260719),
but it is actually the standing development line: upstream merges land here and
the dev/beta firmware channel is built from it. Rename accordingly and reframe
the handoff so future upstream merges land ON this branch rather than spawning a
new dated branch each time.

Adds a "Branch and Release Channels" section with the full production vs
dev/beta separation table (branch, workflow, release tag, manifest base,
download host, flasher config, embedded version), and restates why both channels
share FIRMWARE_VERSION: the OTA logic treats a differing base as "always an
update", so channels must separate by manifest URL, never by base version.

Also corrects the beta workflow's dispatch-only rationale, which cited a
short-lived branch name that no longer applies. Dispatch-only still stands, for
the better reason: publishing firmware that real nodes pull over the air should
be explicit, not a side effect of every commit to a dev branch.
2026-07-19 14:52:58 -07:00
agessaman c51e7ea426 ci(beta): tag version as beta-dev and publish config-beta.json
- OTA_CHANNEL_TAG is now 'beta-dev', so the embedded version carries the
  channel AND its provenance: v1.16.0.N-observer-beta-dev-<hash>. This channel
  is built from the upstream-dev-merged line, so 'dev' is visible in `ver`,
  the MQTT firmware_version, and SNMP rather than inferred from a branch name.
  Verified on a real build; OTA version parsing is unaffected.

- config-beta.json is now written into the flasher checkout and committed,
  reversing the earlier ephemeral approach: the flasher SPA loads it directly
  for ?config=config-beta, so it has to be served. It is still DERIVED from
  config.json on every beta build rather than hand-maintained, so the dev/beta
  device list cannot drift from production.
2026-07-19 14:50:23 -07:00