41 Commits
Author SHA1 Message Date
liquidraver 8c0464ea30 logo thiccification and docs chores 2026-08-24 21:43:40 +02:00
liquidraver c45e7ae774 second audit sweep 2026-08-14 11:05:52 +02:00
liquidraver 5aab507490 code cleanup 2026-08-14 09:19:46 +02:00
liquidraver 3a3ac3df2e lr20xx: expose per-packet frequency error and fix the duty-cycle wake budget 2026-08-12 14:55:16 +02:00
liquidraver b839c2c5d1 bump lr sdk and audit refactor 2026-08-12 14:40:52 +02:00
liquidraver 101e97f54a lr20xx: bump vendored SDK to v2.0.2 and load the firmware Patch RAM 2026-08-11 22:36:31 +02:00
liquidraver 9f66e9749c x1 debug v1 2026-08-10 08:32:43 +02:00
liquidraver f83ce0bed4 gps fiddling 2026-08-04 16:04:05 +02:00
liquidraver 02d9fa4ab8 M9 keys P2 2026-07-21 18:24:29 +02:00
liquidraver 3e04c11621 lr1110 updater final 2026-07-21 14:43:39 +02:00
liquidraver c897d1a1ca normalize builds 2026-07-16 19:12:01 +02:00
liquidraver 5cb38b13dc upgrade formatted to be flasher compatible 2026-07-16 10:52:31 +02:00
liquidraver fe14c73f52 bump version 2026-07-04 11:55:24 +02:00
liquidraver 487693f669 update documentation 2026-07-04 09:41:09 +02:00
liquidraver 14cb8c61f9 meshtimesync p1 2026-07-03 09:11:43 +02:00
liquidraver 0e5cd5f6de Fix joystick UI path editor to encode/decode paths at the mesh's actual hash size, not always 1-byte 2026-07-01 22:19:37 +02:00
liquidraver 2771872886 bump to 1.16.3 2026-06-17 15:52:57 +02:00
liquidraver 1970231553 fix esp s3 ble pairing error 2026-06-15 21:14:41 +02:00
liquidraver cc8ade8298 bound AdvertDataParser name copy to _name size (helpers audit) 2026-06-11 14:18:15 +02:00
liquidraver b7c72fe5ee route CAD_DONE/CAD_DETECTED to DIO1 so LR1110 LBT CAD completes (radio2 audit) 2026-06-11 13:58:08 +02:00
liquidraver a9c797b837 guard GPS month_days[] index against out-of-range GNSS month (gps audit) 2026-06-11 13:30:01 +02:00
liquidraver 966bf24c96 defer MQTT connect publish to main loop (uplink cross-thread fix) 2026-06-11 12:32:37 +02:00
liquidraver a03390baa7 guard TRACE path append, multi-ack len, runt flood ACK (core-mesh audit) 2026-06-11 08:43:00 +02:00
liquidraver 0ce847b9bb small fixes 2026-06-11 07:32:50 +02:00
liquidraver 8761a82d93 fix USB protocol handling and bump version 2026-06-03 10:09:43 +02:00
liquidraver 515f3610e1 crypto: harden first-boot identity entropy + 3 RNG fixes
Adds a layered entropy mixer for first-boot identity Ed25519 keygen,
primarily to address ESP32 where the hardware TRNG (WDEV_RND_REG) is
only fed real entropy once the internal WiFi/BT radio is enabled —
but identity gen runs before that on companion and indefinitely
before that on a bare repeater. ESP-IDF's bootloader_random_enable()
is not compiled by Zephyr-Espressif HAL, ruling out that workaround.
Design reviewed with nextgens (author of upstream meshcore-dev/
MeshCore#2280 which fixes the same issue via BT/WiFi init/pull/deinit).

ZephyrRNG::random — retry sys_csrand_get up to 4x with k_msleep
backoff; cold-reboot on persistent failure. Previously fell back
silently to sys_rand_get (xoshiro PRNG), which would have produced
a weak Ed25519 seed on CSPRNG error. BUILD_ASSERT enforces
CONFIG_CSPRNG_ENABLED.

ZephyrRNG::mixIdentitySeed — layered entropy mixer for one-shot
identity keygen. Combines sys_csrand_get (early + late),
HWINFO unique device ID, caller-supplied ADC LSB noise, 200ms of
CPU cycle-counter jitter (NIST SP 800-90B class source), and
50ms more jitter in an independent timing window. Conditioned via
AES-256-CTR (NIST SP 800-108 KDF-in-Counter-Mode): SHA-256 of the
pool extracts a 32-byte AES key; AES-256-ECB on an incrementing
128-bit counter expands to the requested output length. Uses PSA
crypto already enabled in zephcore_common.conf. NIST-style
repetition-count + variance health check on jitter samples;
reboot on degenerate output. ~280ms one-time cost at first boot.
LoRa radio TRNG was considered as an additional source but rejected
on expert advice — radio sources are attacker-influenceable
(jamming/spoofing).

ui-joystick BLE passkey — switch from sys_rand32_get (non-crypto
xoshiro) to sys_csrand_get. The 6-digit passkey is the MITM
protection the rest of the BLE config enforces; predictable PINs
weaken it.

Identity reserved-prefix loop — replace the silent 10-attempt cap
(which committed whatever it had on fall-through) with a
bounded-retry-then-reboot pattern.

Also: fix a pre-existing scope bug at main_companion.cpp:357 in
the MESH_EVENT_PREFS_DIRTY handler — data_store was referenced
inside mesh_event_loop() but declared 50+ lines later. Moved the
call into a forward-declared helper defined after the statics.
Unrelated to crypto work but uncovered during build verification;
every companion build was broken.
2026-05-28 09:34:43 +02:00
liquidraver 3a35fec8b3 ui: make housekeeping refresh path on-demand
Stop doing UI work nobody asked for. The 5 s housekeeping tick was
reading env sensors (I2C, 10-50 ms), the battery ADC (regulator
toggle + 8 samples, every 60 s), and re-rendering the display
unconditionally — all while the display might be off and nothing
on-air had requested any of it.

Now:
- render_sensors() reads env sensors only when the user is on
  that page (event-driven, never fires during idle)
- battery refresh is lazy on ui_pages_render() with a 30 s
  freshness guard; explicit ui_set_battery() calls also count
- the unconditional OLED rerender from housekeeping is gone;
  real state changes (messages, BLE, button press) still fire
  schedule_render() directly

Telemetry / stats paths read fresh ADC + sensors on demand and
were never using the UI cache, so over-the-air consumers are
unaffected.
2026-05-20 22:10:14 +02:00
liquidraver 51983b0e66 expand CMakeLists.txt change 2026-05-20 21:08:10 +02:00
liquidraver f0c29a612f ble cleanup 2026-05-20 10:27:42 +02:00
liquidraver b271179cc9 activate PSRAM in capable devices to fit OTA 2026-05-18 22:31:04 +02:00
liquidraver 3441caf8b0 new rx busy latch 2026-05-14 22:24:48 +02:00
liquidraver e78e197dee sx1262 fixes
- calibrate_image: revert to datasheet band table.  Narrow ±2 MHz
  window had truncation bug placing 433/869 MHz operating freq
  outside their own calibration windows.  DS §9.2.1 confirms cal
  is range-validity, not point-precision
- reset_agc: K_FOREVER mutex → K_MSEC(50).  Was holding dispatcher
  thread up to ~3 s if a long TX/RX held the SPI lock.  Now bails
  with WARN log; caller retries next maintenance interval.
2026-05-11 11:26:33 +02:00
liquidraver 98fcddb502 add formatter tools 2026-05-06 21:56:23 +02:00
liquidraver fc28b32d52 west update 2026-03-29 18:20:20 +02:00
liquidraver 4bd84ddf7e APC first test 2026-03-14 14:01:10 +01:00
liquidraver d2ffe67420 thinknode m1 fixes 2026-03-14 10:37:49 +01:00
liquidraver 463cee9b31 thinknode m3 + wismesh tag ADC fix + fast advert for 1 min 2026-03-08 21:23:28 +01:00
liquidraver 86efd92f52 west update + rebase sx patch 2026-03-03 15:07:24 +01:00
liquidraver 9b6a47d27b port multibyte paths 2026-02-26 15:40:51 +01:00
liquidraver 73222600b2 merge everything important up until d05d6abab8b52c0f20a0f85a0939c74bc762b4ad meschore/dev 2026-02-22 13:41:57 +01:00
liquidraver 8d1823d0b6 First iteration that seems to work 2026-02-20 12:43:13 +01:00