Commit Graph
5384 Commits
Author SHA1 Message Date
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 5c4b6d6301 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 346cf2fd1f Support compatible RAK bootloader updates with adaptive app storage 2026-09-29 03:08:53 -07:00
mikecarper 793531e16b Merge remote-tracking branch 'origin/keymindCascade' into keymindCascade 2026-09-28 17:46:45 -07:00
mikecarper 50c43ca172 Pin RAK3401 OTA chain participants by public key 2026-09-28 17:46:41 -07:00
mikecarper ca23d38ef6 Keep get radio reply compatible with Companion apps 2026-09-28 15:47:24 -07:00
mikecarper a645b6c518 Classify held DM count as a read-only CLI query 2026-09-28 14:15:39 -07:00
mikecarper 5be7f119ac Fix one-key DM contact priority and STM32 flash budget 2026-09-28 14:00:12 -07:00
mikecarper 94b711bdd4 Share high-contact RAK offline queue with held one-key DMs 2026-09-28 12:47:12 -07:00
mikecarper 7ba8c5bfa2 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 01054ba979 Support private text with one known public key 2026-09-28 00:19:31 -07:00
mikecarper 687896fa33 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 ea40663f09 Revert adaptive RAK app-owned bootloader recovery after ACL test 2026-09-27 15:07:29 -07:00
mikecarper a007346561 Use application capabilities for adaptive RAK recovery status 2026-09-27 13:21:40 -07:00
mikecarper 51211834e8 Show live ESP32 partition check in migration guidance 2026-09-27 12:57:12 -07:00
mikecarper dbf387b681 Document ESP32 partition migration in picker and catalogs 2026-09-27 12:53:13 -07:00
mikecarper 0d9732f2f2 Align STM32WL size test with four qualified USB images
Firmware Builder / create-release (push) Canceled after 0s
Firmware Builder / build (push) Canceled after 0s
Firmware Builder / generate-build-matrix (push) Canceled after 0s
Build Repeater Firmwares / build-repeater-firmwares (push) Canceled after 0s
full-profiles-v1.17.1.7-halo-keymind-cascade-dev-2d03e098 lora-ota-v1.17.1.7-halo-keymind-cascade-dev-2d03e098 repeater-room-v1.17.1.7-halo-keymind-cascade-dev-2d03e098 utility-v1.17.1.7-halo-keymind-cascade-dev-2d03e098 v1.17.1.7-halo-keymind-cascade-dev-2d03e098
2026-09-27 10:33:13 -07:00
mikecarper bb24681188 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 2d03e098cf Merge adaptive RAK LoRa bootloader recovery
Merge application-owned signed bootloader recovery for the adaptive RAK3401 and RAK4631 profiles.
rak3401-mota-1.16.07-to-1.17.1.7-legacy24
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 9709c8c764 Add application-owned RAK bootloader recovery over LoRa 2026-09-26 23:47:44 -07:00
mikecarper 8edef5c4a0 Refresh CLI test contracts for backup and retry controls 2026-09-26 22:50:54 -07:00
mikecarper edc1c04cd3 Update Companion session harness for private-key backup state 2026-09-26 22:36:54 -07:00
mikecarper e34f119780 Merge upstream dev into keymindCascade 2026-09-26 22:01:28 -07:00
mikecarper ee3010f496 Precompute ESP32 release partition lookup table 2026-09-26 19:58:28 -07:00
mikecarper 001e9a62e7 Protect remote admin identity backup replies 2026-09-26 18:01:43 -07:00
Adam Gessaman 1e23d7c1e4 Merge branch 'feat/mqtt-connection-health' into observer-firmware-dev 2026-09-26 14:19:06 -07:00
agessaman 7d0a602b20 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 f37445f8a7 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 6390763c71 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 73098a44b6 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 7004b81c0c 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 383339eccc 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 f7ed2f176d 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
agessaman 43b55de26f Merge branch 'fix/mqtt-omit-unknown-snr-rssi' into observer-firmware-dev 2026-09-26 10:52:15 -07:00
fdlamotte 1934a4988d Merge pull request #3202 from F4FPR/m6-power-observability
ThinkNode M6: expose external-power and charger state
2026-09-26 13:51:11 -04:00
agessamanandACETyr a91009e3dd fix(mqtt): omit SNR/RSSI instead of publishing placeholder values
The reconstruction-less fallback path in buildPacketJSON (queued packet
with no captured raw frame that cannot be re-serialized) published
fabricated SNR 12.5 / RSSI -65 that consumers could not distinguish
from real radio readings. It now passes NAN / MQTT_RSSI_UNKNOWN, and
buildPacketMessage omits the SNR/RSSI keys entirely when no measurement
exists, mirroring the existing score omission.

Ports the fix from ACETyr's PR #13 (0a037040) on mqtt-bridge-implementation.

Co-Authored-By: ACETyr <35745290+ACETyr@users.noreply.github.com>
2026-09-26 10:46:11 -07:00
fdlamotte 90493d749d Merge pull request #3201 from F4FPR/gps-l76k-constellation-init-m6
GPS: configure L76K for GPS, BeiDou and GLONASS
2026-09-26 13:42:55 -04:00
fdlamotte 6c7acd2bb1 Merge branch 'dev' into gps-l76k-constellation-init-m6 2026-09-26 13:38:40 -04:00