Commit Graph
5389 Commits
Author SHA1 Message Date
mikecarper f565f34bef Revise README for Halo Keymind Cascade Branch updates
Updated README to reflect changes in Halo Keymind Cascade Branch, including new features and improvements.
2026-09-29 16:05:35 -07:00
mikecarper 21641885d2 Support stock nRF52 bootloader version formats and audit images 2026-09-29 14:37:27 -07:00
mikecarper c212885040 Add bounded OTAFIX bootloader version fallback 2026-09-29 11:40:40 -07:00
mikecarper 01cb58c8e4 Point RAK OTA guides to compatible OTAFIX 2.4.10 2026-09-29 11:30:44 -07:00
mikecarper 21d42aa57f Fix LoRa OTA TempRadio compatibility and lease handling
Accept preamble-bearing TempRadio status from newer firmware while retaining legacy replies. Keep the 20-minute hard minimum but make the 120-minute and timeout estimates advisory, with a window-only override. Add parser, rehearsal, relay identity, and RAK bootloader regression coverage.
2026-09-29 07:48:01 -07:00
Huw Duddy 33468c4f80 Merge pull request #2472 from emkZero/variant-techo-lite-usb-companion
variants: USB Companion variant for LilyGo T-Echo Lite
2026-09-29 23:00:41 +10:00
Huw Duddy 37a71d9381 Merge pull request #3495 from meshcore-dev/increase-max-search-results
increased MAX_SEARCH_RESULTS to 24. (was 8)
2026-09-29 20:42:48 +10:00
mikecarper 84429ae520 Use internal bootloader staging regardless of RAK app storage 2026-09-29 03:27:10 -07:00
taco 74413f0e4d T1000e GPS: use RTC backup for faster fix 2026-09-29 20:16:32 +10:00
taco 11755c8199 MeshTracker X1 GPS: use RTC backup for faster fix 2026-09-29 20:14:19 +10:00
taco 037e27833b feat: add AirohaSleep.h helper for faster fix on AG3335 based GPS 2026-09-29 20:12:08 +10:00
taco 3fa8dbf4d1 feat: add waitFor() and drain() to LocationProvider to support sending commands to GPS 2026-09-29 20:10:51 +10:00
mikecarper c3f37e129a Support compatible RAK bootloader updates with adaptive app storage 2026-09-29 03:08:53 -07:00
mikecarper 666150ab2f Merge remote-tracking branch 'origin/keymindCascade' into keymindCascade 2026-09-28 17:46:45 -07:00
mikecarper addfa0f683 Pin RAK3401 OTA chain participants by public key 2026-09-28 17:46:41 -07:00
mikecarper f5afc73d6d Keep get radio reply compatible with Companion apps 2026-09-28 15:47:24 -07:00
mikecarper e900526c3f Classify held DM count as a read-only CLI query 2026-09-28 14:15:39 -07:00
mikecarper 60dc8e2d28 Fix one-key DM contact priority and STM32 flash budget 2026-09-28 14:00:12 -07:00
mikecarper 898cadae2c Share high-contact RAK offline queue with held one-key DMs 2026-09-28 12:47:12 -07:00
mikecarper eaf19c3638 Port consent-gated one-key DM queue to keymindCascade 2026-09-28 12:09:05 -07:00
Liam Cottle 5d266dcb43 Merge pull request #1896 from weebl2000/robust-time-esp32
Keep time in RTC slow memory, prevents date dropping to 1970 date after crash/watchdog/brownout reset on ESP32
2026-09-28 23:13:49 +13:00
mikecarper ea4917b322 Support private text with one known public key 2026-09-28 00:19:31 -07:00
mikecarper fd7b93c52d Link ESP32 picker to exact partition expansion packages 2026-09-27 21:13:25 -07:00
Liam Cottle b9f519ef5a Merge pull request #1809 from DanielNovak/fix-decrypt-block-alignment-check
Fix stack buffer overflow in MACThenDecrypt
2026-09-28 13:41:02 +13:00
mikecarper ba2187db2c Revert adaptive RAK app-owned bootloader recovery after ACL test 2026-09-27 15:07:29 -07:00
mikecarper ec86d96039 Use application capabilities for adaptive RAK recovery status 2026-09-27 13:21:40 -07:00
mikecarper 3d984bfe8b Show live ESP32 partition check in migration guidance 2026-09-27 12:57:12 -07:00
mikecarper 6c3e52c923 Document ESP32 partition migration in picker and catalogs 2026-09-27 12:53:13 -07:00
mikecarper ed3c1ec75c Align STM32WL size test with four qualified USB images 2026-09-27 10:33:13 -07:00
mikecarper 4db7780ba7 Prepare 1.17.1.7 Cascade release catalogs and STM32WL USB images 2026-09-27 10:20:43 -07:00
Kevin Le a27e78e4da Added GPS PowerSaving v2 for some boards 2026-09-27 23:33:01 +07:00
Kevin Le b049177b81 Fixed for GPS PowerSaving v2 on T1000e 2026-09-27 19:21:29 +07:00
Kevin Le f00424bdb9 GPS PowerSaving v2 for T1000e 2026-09-27 18:27:43 +07:00
Kevin Le 186cde1a20 GPS on upon telemetry request only if GPS is active 2026-09-27 15:46:07 +07:00
mikecarper a134c509d5 Merge adaptive RAK LoRa bootloader recovery
Merge application-owned signed bootloader recovery for the adaptive RAK3401 and RAK4631 profiles.
2026-09-27 00:32:19 -07:00
Liam Cottle db7a5f942f Merge pull request #3508 from marcelverdult/fix/rak11310-attach-dynamic-prefs
Fix RAK11310 build: add no-op attachDynamicPrefs()
2026-09-27 20:03:59 +13:00
mikecarper abaedd3894 Add application-owned RAK bootloader recovery over LoRa 2026-09-26 23:47:44 -07:00
mikecarper 5480b36b56 Refresh CLI test contracts for backup and retry controls 2026-09-26 22:50:54 -07:00
mikecarper 8ae82a5e2f Update Companion session harness for private-key backup state 2026-09-26 22:36:54 -07:00
mikecarper 45fe38ff97 Merge upstream dev into keymindCascade 2026-09-26 22:01:28 -07:00
mikecarper 709a6fa735 Precompute ESP32 release partition lookup table 2026-09-26 19:58:28 -07:00
mikecarper 0ad51a29cb Protect remote admin identity backup replies 2026-09-26 18:01:43 -07:00
Adam Gessaman 3015d5adae Merge branch 'feat/mqtt-connection-health' into observer-firmware-dev 2026-09-26 14:19:06 -07:00
agessaman 5f14b941f3 fix(mqtt): exclude unready slots from slot health and keep cf monotonic
A slot waiting on a token/IATA/credential stays enabled but never attempts a
connection, so it held mqtt_slots_up below mqtt_slots_total (and down= at 1)
permanently -- a standing false alert on a node that is merely unconfigured.
slots_total and down= now count only ready slots, matching the CLI's "wait".

mqtt_connect_failures summed only enabled slots, so disabling a failing slot
made it drop. It now sums every slot, monotonic within a boot.

cf: moves after the error tail in mqttN.diag so a clamped 160-byte reply
loses the count rather than the refusal/TLS detail. A failed start now clears
the attempt flag instead of restoring a possibly stale one. Outage comments
corrected: the clock starts at a slot's first DISCONNECTED, not first connect.
2026-09-26 13:54:43 -07:00
agessaman e24e6feab5 fix(mqtt): count only failed starts, not rejected reconnects, in cf
reconnect() on a started client returns ESP_FAIL while an attempt is already
in progress. On a Heltec V3, a live reconfigure hit exactly that and the
attempt then connected, yet cf read 1. Count start_failures only when
connect() on a stopped client fails, and restore the attempt flag to its
prior value on any failed call so the in-progress attempt is still judged by
its own outcome.
2026-09-26 12:48:44 -07:00
agessaman 99a4b6fad0 fix(mqtt): count failed starts and ignore bounced sessions in cf
connect()/reconnect() returning an error started no attempt, so no event
arrived and the failure went uncounted -- the low-heap case the counter exists
for. Counted now in a bridge-task-only start_failures, summed into cf: and
mqtt_connect_failures.

A renewal or corrected-clock bounce whose softDisconnect() times out gets its
old session's DISCONNECTED after the new attempt raised the flag. That session
is still marked connected until the handler runs, so the gate now also
requires !connected. An ignored late CONNECTED clears the flag too.

cf: no longer depends on dc being non-zero. Comments corrected for the
PSRAM-fallback stack cost and heap_largest's sampling point; the worst-case
test now models 6 slots.
2026-09-26 12:25:53 -07:00
agessaman 2f6d139729 fix(mqtt): count connect failures from a flag set before the attempt
The Starting-state gate raced the event task: client_state becomes Starting
only after connect()/reconnect() returns, so a fast failure could deliver
DISCONNECTED first and go uncounted, while a deliberate stop of an attempt in
flight was counted as a failure. A per-slot flag is now raised before the call
and cleared by onConnect, a failed start, or stopSlotClient().

Also stops zero-valued connect_failures/slots_breaker from creating an empty
stats object.
2026-09-26 11:53:54 -07:00
agessaman 3230fb6afc feat(mqtt): count connect failures and report tripped breakers
Two gaps remained after the first connection-health commit.

A slot retrying into a heap that cannot satisfy its TLS allocation moved no
counter at all. disconnect_count rose, but it also rises for dropped live
sessions, so it could not separate "actively failing to connect" from "was
connected, dropped once". Adds a per-slot connect_failures, incremented in
onDisconnect when the event arrives while the client is Starting -- meaning
it ended an attempt that never reached onConnect. Late events from a stopped
or quarantined client, and soft-disconnects of a live session, are in other
states and are not miscounted.

A slot parked by the circuit breaker also looked identical to one still
retrying, despite being materially worse: the breaker only probes every 30
minutes, so recovery is far slower and an operator may need to intervene.

Surfaces both:
- `mqttN.diag` gains `cf:<n>` beside the existing `dc:<n>`.
- the status payload gains `mqtt_connect_failures` (summed across slots) and
  `mqtt_slots_breaker` (count of tripped slots), each emitted only when
  non-zero so a healthy board's payload does not grow.

The counter is what distinguishes a retrying slot from a quiet one: while a
slot is down its publish counters cannot move by definition, so this is the
only value that shows the device is still trying.

Both suggested by adversarial review.
2026-09-26 11:10:13 -07:00
agessaman 9512a68953 fix(mqtt): size the status buffer for real field maxima
The worst-case test added with the connection-health fields did not model
production maxima -- it used a 28-byte model and a 24-byte firmware string,
while MQTTBridge permits _origin[32], _device_id[65], _board_model[64],
_firmware_version[64] and derives a 63-byte client version. isValidName()
rejects [ ] / \ : , ? * but permits '"', so a 31-character node name of
quotes is legal and every quote escapes to two bytes.

Measured at those real maxima:

  without connection-health fields   762 bytes
  with connection-health fields      851 bytes
  buffer                             768 bytes

So the 768-byte buffer already had only six bytes of headroom before this
work, and the four new fields overflow it. Overflow is silent:
serializeComplete() returns 0 and clears the buffer, and the bridge
publishes only a positive length, so a device would simply stop publishing
status with no error anywhere -- the same blindness the connection-health
fields exist to remove.

Raises STATUS_JSON_BUFFER_SIZE to 1024 and corrects the test to use the
actual maxima. Status serializes into the shared 2048-byte publish scratch
buffer, so this costs no extra RAM; only the PSRAM-allocation-failed stack
fallback grows by 256 bytes. A static_assert keeps the status ceiling within
the shared buffer.

Found by adversarial review of the preceding commit.
2026-09-26 11:09:21 -07:00
agessaman 2c60fee9d5 feat(mqtt): report slot connection health so an outage is visible
A slot that cannot establish TLS reported nothing. The per-slot counters
track publish successes and failures, and a slot that never connects never
attempts a publish -- so its ok count freezes and its error count stays at
zero for the entire outage. Observed on hardware: a slot sat dead for over
five hours while `sN=` showed 0 errors and the published status payload
carried no indication at all.

Two surfaces gain the missing signal:

- `get mqtt.stats` gains `down=<n>` (omitted when zero, like `filt=`) and
  marks each disconnected slot with a trailing `!`. The marker goes after
  the counts so existing "s(\d)=(\d+)/(\d+)" parsers keep matching.
- The published status payload gains `mqtt_slots_up`, `mqtt_slots_total`,
  `heap_largest`, and `mqtt_outage_secs`. These ride on every healthy slot's
  status message, because the slot that is down cannot report itself.

`mqtt_slots_up < mqtt_slots_total` is the condition to alert on.
`mqtt_outage_secs` is detail: it is present only when the outage has a known
start, so its absence does not imply health -- a slot that has never
connected since boot has no outage start time.

`heap_largest` is included because free heap alone does not predict a failed
connection. A slot needs one contiguous 16,384-byte block for its TLS record
buffers; measured immediately before an attempt this value predicted the
outcome in every observed case, while total free heap was 85 KB throughout a
multi-hour outage. A low value with every slot up is normal rather than a
fault -- established sessions already hold their buffers.

Publish-error semantics are unchanged: connect failures are not folded into
them.

Adds host coverage for the new fields, for the outage key's presence rule,
and for worst-case payload size. That last one matters because
serializeComplete() returns 0 and clears the buffer on overflow and the
bridge publishes only a positive length, so exceeding the 768-byte status
buffer would silently stop status publication -- the same blindness this
change exists to remove.
2026-09-26 11:05:40 -07:00