Commit Graph
336 Commits
Author SHA1 Message Date
mikecarper 89dcd82089 Add guarded hardware acceptance and restoration tools 2026-10-18 00:24:03 -07:00
mikecarper 80023f79e0 Fix ESP32-C6 GPIO hold capability and add cross-platform smoke builds 2026-10-17 21:41:47 -07:00
mikecarper 040182e8ec Merge remote-tracking branch 'origin/pr-21' into codex/integrate-open-prs-17-21 2026-10-17 21:13:27 -07:00
mikecarper 9a5331eecd Merge remote-tracking branch 'origin/pr-19' into codex/integrate-open-prs-17-21 2026-10-17 21:13:27 -07:00
mikecarper 24653842e8 Merge remote-tracking branch 'origin/pr-18' into codex/integrate-open-prs-17-21 2026-10-17 21:13:27 -07:00
nullrouten0andClaude Opus 5.5 618c18d385 Keep whole contact records ahead of a partial trailing record
Upstream MeshCore, and this fork up to v1.17.1.6 except ESP32 Full
builds, rewrote /contacts3 in place, one record after another. A reset
or a full volume during that save leaves whole records followed by part
of the next one. Upstream reads such a file up to the short read. Here
readableContactFile() treats any size that is not a multiple of 152
bytes as unreadable, and since 2311160a9 the bounded recovery then
deletes /contacts3. On the first boot after an upgrade, three whole
records plus one stray byte became zero contacts.

Invariant: on ESP32, RP2040 and STM32, when /contacts3 holds at least
one whole record followed by part of one, and /contacts3.bak does not
exist, the whole records load and nothing is written or deleted at
boot. The next ordinary save publishes only whole records through the
existing transaction. Unchanged: whole-record images; a backup still
wins over an incomplete primary, including a backup that is unreadable
or of unknown presence at boot, which keeps its retry at the recovery
boundary; read errors keep the bounded recovery; a file with no whole
record is still discarded; nRF52 is not touched.

selectContactFile() makes this check only after the strict checks of
both names fail, through a new partial_tail mode of
readableContactFile(). loadContacts() drops its own size check; its
whole-record loop bound already stops before the tail.

Add test_companion_contact_partial_tail.py, which runs the real load,
recovery and save paths on the uncached ESP32, RP2040 and STM32
harness and on the ESP32 Full cache harness under ASan/UBSan. On the
old code all four fail with zero contacts and /contacts3 deleted. It
catches 14 of 15 mutations of this change, including a full revert;
the other drops a guard whose value is read only when the file handle
is valid. Two cases in the uncached storage fixture used a one-byte
truncation as their unreadable image; they now use a file shorter than
one record, so they still exercise the discard path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:57:09 +00:00
nullrouten0andClaude Opus 5.5 ef1e4a70cb Lock WebConfig logins per client address with a shared failure cap
/api/login locked every client for 30 s after five failures from anyone.
Anyone who could reach the login page could keep the owner locked out by
failing on purpose. If no login succeeded after a lockout, the lock also
returned from 2^31 to 2^32 ms (about 24.9 to 49.7 days) later, because the
deadline was never cleared and was compared as a signed difference.

Count failures per remote address instead. Five failures lock that address
for 30 s, as before. A shared budget caps failures from all addresses
together, so changing address does not add guesses: it holds six failures
and refills one every 6 s, the old global rate, so one failing address can
never empty it on its own. While it is empty every client waits, as before.
Lock times are measured as elapsed time.

The policy is a pure header, WebConfigLoginThrottle.h.
test_webconfig_login_throttle.py runs it directly (isolation, boundaries,
one-hour rate bounds, millis() half-wrap, saturation, eviction) and runs the
real handleLogin with ArduinoJson under ASan/UBSan. Putting every client on
one key, as the old code did, fails the handler test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:57:09 +00:00
nullrouten0andClaude Opus 5.5 09435b049d Use the node's admin password for the migration bridge AP
The Wi-Fi, LoRa first-stage and Partition Expander bridges serve an
unauthenticated /update behind an AP whose password was fixed and published,
so anyone in range during a migration could upload firmware while the private
key is staged. Use the old node's saved admin password as the WPA2
passphrase, read from /com_prefs or /node_prefs at offset 56 as the firmware
loads it. The operator already used that password to start the old updater.

Fall back to the published password, with a serial warning, when the saved
admin password is missing, unreadable, shorter than 8 characters or not
printable ASCII, so no node becomes unreachable. The legacy filesystem is
mounted without formatting and the password is never printed. Migration
admission, flash sequencing, /update gating and the USB bridge are unchanged.
Update both guides and the package README.

Add a sanitizer-backed host test that compiles the bridge's actual Wi-Fi
block against fake SPIFFS and WiFi: both boots, file precedence, WPA2 length
and terminator bounds, printable characters, stock 1.10/1.11 file sizes,
truncated fields, and mount, seek and partial-read failures. It fails 8 of 8
on the previous code and catches 27 of 27 code mutations. Verified 13 related
host test files and the esp32_s3_4mb_partition_migrator build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:57:09 +00:00
nullrouten0andClaude Opus 5.5 6b61e28404 Keep guest-password room logins out of the durable replay store
On a room server the guest password grants Read/Write, which the login
replay store treats as a role that needs a durable record. Every new
guest-password identity therefore took one of the 128 permanent slots,
and once they were used up the store failed closed for every new
identity, including a new administrator device, until the filesystem was
erased. Rooms often publish the guest password.

A guest-password Read/Write session (one without explicitly assigned
permissions) now uses the policy public readers already use: it must
beat its in-boot timestamp and any record the identity already has,
which is still advanced, but it never creates a new record.
Administrator logins and explicitly assigned roles keep the durable
reservation and still fail closed on a full store.

Tests: test_room_login_replay_capacity.py runs the real room login
handler against the real ClientACL replay store with ASan/UBSan: guest
churn cannot lock out a new admin or assigned writer, a former admin's
record still binds guest-password logins, and a store full of privileged
records still refuses a new admin. It fails 2 of 3 on the previous code.
Two expectations in test_room_login_integration.py and the login profile
contract follow the new policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:57:09 +00:00
mikecarperandnullrouten0 3db4582bbb Integrate upstream GPS PRs 3624, 3625 and 3626
Port the guarded NMEA buffer, validated RMC clock samples and coordinate bounds from meshcore-dev/MeshCore#3624, #3625 and #3626. Adapt clock admission to retain this branch's signed date limits, bounded loop work, tracker acquisitions, sample consumption, diagnostics and periodic settings.

Upstream-PR: https://github.com/meshcore-dev/MeshCore/pull/3624
Upstream-Commit: 1ac389bbef0084623a3115c526156ae8f414d3ea
Upstream-PR: https://github.com/meshcore-dev/MeshCore/pull/3625
Upstream-Commit: 72ed4dcf08869c6900ef579e7af1b28471a86895
Upstream-PR: https://github.com/meshcore-dev/MeshCore/pull/3626
Upstream-Commit: 499727a71c564a7b5d451b8f480d940e185fe742

Co-authored-by: nullrouten0 <201262769+nullrouten0@users.noreply.github.com>
2026-10-17 19:53:08 -07:00
mikecarper 55f67f9062 Fit Mini Repeater with approved optional service cuts 2026-10-17 19:35:05 -07:00
mikecarper b2a8245199 Bound SH1106 retry allocations and verify ESP32 Full RAM 2026-10-17 17:59:33 -07:00
mikecarper f73ddc8bce Check all small STM32 Companions at release version length in CI 2026-10-17 17:47:21 -07:00
mikecarper 3d04bb3048 Sleep unused onboard SX1262 in RAK13302 builds
Adapt the optional onboard-radio probe for RAK3401 and RAK4631 cores using the external RAK13302 image. Preserve SPI1 radio ownership, external FEM startup, and ordinary RAK4631 primary-radio operation.

Probe before boot voltage protection, bound missing-chip waits, release temporary pads, and confirm cold sleep without waking the chip. Add sanitizer-backed host regression tests and CI coverage.
2026-10-17 17:02:54 -07:00
mikecarper ff548d2481 Expose read-only RX power-saving diagnostics through framed CLI 2026-10-17 15:56:43 -07:00
mikecarper 5ee9ceeb20 Protect nRF SD OTA authorization RAM from source-only stores 2026-10-17 15:35:34 -07:00
mikecarper 9c3df94f99 Honor periodic OTA cadence after the four-beacon startup burst 2026-10-17 15:12:59 -07:00
mikecarper 97be2b9b21 Delay displayed radio preamble advice for two minutes 2026-10-17 14:45:33 -07:00
mikecarper 64a928d18f Reduce Indicator radio expander traffic with guarded IQ reuse 2026-10-17 14:19:42 -07:00
mikecarper 05c0ed8bb2 Fit STM32 Companions with equivalent compact field arithmetic 2026-10-17 13:53:00 -07:00
mikecarper 8874cf62ca Fix W12 TX prearming without standby PA drain 2026-10-17 13:36:38 -07:00
mikecarper f1d281a766 Allow safe nRF52 MCU idle between radio2 scan deadlines 2026-10-17 13:21:05 -07:00
mikecarper 364e3cabd5 Merge remote-tracking branch 'origin/keymindCascade' into keymindCascade 2026-10-17 11:37:01 -07:00
mikecarper 86984e8e22 Enable RAK4631 Companion DC/DC in all transports 2026-10-17 11:35:50 -07:00
mikecarper 4805b5cdbb Fix T096 Companion runtime RAM with RGB332 framebuffer 2026-10-17 11:22:15 -07:00
mikecarper 5bdc6de0ed Sleep ST7735 controllers before releasing display power 2026-10-17 11:02:29 -07:00
mikecarper 21f8b3384f Enable T096 DC/DC initialization before battery checks 2026-10-17 11:01:01 -07:00
mikecarper dd7a10f9aa Sleep between noise-floor samples and reduce idle refreshes 2026-10-17 10:18:14 -07:00
mikecarper 629557fcfe Fix nRF52 idle sleep event and CryptoCell handling 2026-10-17 02:22:26 -07:00
mikecarper 756d887bad Add on-demand power-saving diagnostics 2026-10-17 01:15:54 -07:00
mikecarper ce53567a4c Consolidate onboard QSPI infrastructure build profiles 2026-10-16 23:42:10 -07:00
mikecarper a16229a3eb Bound GPS UTC fields and accept variable time precision 2026-10-16 20:35:11 -07:00
mikecarper 135d361368 Require fresh complete GPS observations before clock synchronization 2026-10-16 19:48:34 -07:00
mikecarper 0dcba50d88 Reject unsupported RXPS before changing suspended scan policy
Keep rejected power-saving requests from changing radio2's saved RX policy or timings. Exercise actual CLI, scan restoration and calibration sleep guards with semantic negative controls.
2026-10-16 19:17:22 -07:00
mikecarper 4348fdcc56 Keep UI startup and rescue windows closed after observed expiry 2026-10-16 19:00:45 -07:00
mikecarper eda70c832b Format infrastructure startup version labels without allocating 2026-10-16 18:27:08 -07:00
mikecarper a24f9d5ef8 Keep sensor UI polling and refresh working across uptime rollover 2026-10-16 17:56:45 -07:00
mikecarper 9684e410e3 Keep RGB Companion status timing working across rollover 2026-10-16 17:21:44 -07:00
mikecarper ec2bf83882 Keep Companion backlight button polling working across rollover 2026-10-16 17:04:33 -07:00
mikecarper b483a917f6 Keep monochrome Companion LED timing working across rollover 2026-10-16 16:54:08 -07:00
mikecarper eec1caa170 Keep Companion sensor polling running across timer rollover 2026-10-16 16:43:54 -07:00
mikecarper 4c3a5691e1 Keep Companion UI deadlines working across rollover and long idle 2026-10-16 16:28:58 -07:00
mikecarper d01b63f0c3 Keep RTTTL tones and queued speech running across timer rollover 2026-10-16 16:08:33 -07:00
mikecarper 9b4d3350df Drive every RGB LED channel for Companion notifications 2026-10-16 15:50:38 -07:00
mikecarper 866f9d682f Preserve armed OTA handoffs when debug resume is requested 2026-10-16 15:43:32 -07:00
mikecarper 4865162fb4 Reserve configured NOR pins from user GPIO control 2026-10-16 15:09:46 -07:00
mikecarper 9e4891989f Preserve armed OTA handoffs by rejecting apply reentry 2026-10-16 15:00:23 -07:00
mikecarper 5fc0943f59 Report uncertain preference saves without promising rollback 2026-10-16 13:45:48 -07:00
mikecarper f6c00be3e0 Bound region name exports for small destinations 2026-10-16 12:54:36 -07:00
mikecarper df0e7c3f89 Preserve durable region policy on failed replacement saves 2026-10-16 11:56:00 -07:00