Commit Graph
3770 Commits
Author SHA1 Message Date
fdlamotte 7a900cf1c8 Merge pull request #3823 from AlexandrTyshchenko/fix/gps-first-fix-timeout
Limit the first periodic GPS acquisition after boot
2026-11-13 14:47:17 -04:00
Olexandr Tyshchenko 069b9fdaf8 GPS: first fix timeout as a saved setting (gps firstfix), 1 h by default
A cold start can take up to ~30 min with a weak sky view, so the default
limit before the first fix since boot goes from 15 min to 1 h.

The limit is now a GPS preference, set with `gps firstfix <duration>`
(0 = no limit, at most 1 day) and saved with the other GPS settings, so
repeaters and companions can use different values without a rebuild.
GPS_FIRST_FIX_TIMEOUT_MS stays as the build default.
2026-11-13 14:29:02 +02:00
Olexandr Tyshchenko ac2bf9372a Limit the first periodic GPS acquisition after boot
Before the first fix since boot, a periodic acquisition had no timeout. If no
fix is accepted (no sky view, no antenna, or a guard rejecting spoofed fixes),
the receiver then stayed on until a fix was accepted.

Give that window its own limit, GPS_FIRST_FIX_TIMEOUT_MS (15 min by default,
enough for a full almanac; 0 keeps the old behaviour). It counts as a miss and
the next acquisition starts after the configured period.
2026-11-12 10:48:10 +02:00
Liam Cottle bb870313e4 Merge pull request #3822 from liamcottle/fix/3811
fix for mdns string not compiling due to ambiguous overload
2026-11-12 16:10:48 +13:00
liamcottle e3c1c34828 fix for mdns string not compiling due to ambiguous overload 2026-11-12 16:08:30 +13:00
fdlamotte 7812ecaea6 Merge pull request #3819 from nullrouten0/fix/gps-nmea-buffer-tail
GPS: stop MicroNMEA reading past the NMEA buffer
2026-11-11 18:29:30 -04:00
nullrouten0andClaude Sonnet 5.5 e1c1d76c5f GPS: stop MicroNMEA reading past the NMEA buffer
Add a 16-byte zeroed tail behind the 100-byte NMEA buffer. MicroNMEA's
fixed-width field skips can read a few bytes past the end of a malformed
sentence; with the tail those reads land on NUL bytes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 17:58:36 +00:00
fdlamotte 6e6b7b105f Merge pull request #3817 from AlexandrTyshchenko/docs/gps-guard-alert-telemetry
GPS guard: drop leftovers of the alert telemetry channel
2026-11-11 10:39:49 -04:00
Olexandr Tyshchenko b920e7d249 GPS guard: drop leftovers of the alert telemetry channel
#3813 removed the telemetry channel for the GPS time alert. Remove the
docs sentence that still described it and the now unused
GpsGuard::getAlertOffset().
2026-11-11 16:18:58 +02:00
fdlamotte c4258a5beb Merge pull request #3801 from AlexandrTyshchenko/feature/gps-guard-time-wait
GPS guard: show "time wait" instead of "rej nofix" between fixes
2026-11-11 10:13:11 -04:00
fdlamotte 0f51fd70e7 Merge pull request #3815 from fdlamotte/advert_loc_pref
CommonCLI: get/set loc to replace gps advert command
2026-11-11 10:11:49 -04:00
Florent bed7286192 CommonCLI: get/set loc to replace gps advert command 2026-11-11 09:52:03 -04:00
fdlamotte 1e384b109d Merge pull request #3813 from fdlamotte/gps_guard_telem_removal
gps_guard: remove time alert telemetry
2026-11-11 08:06:44 -04:00
fdlamotte d1d802717a Merge pull request #3811 from fdlamotte/mdns_using_char
companion_radio: rewrite mdns part removing String class
2026-11-11 07:58:59 -04:00
Florent 79e0f4eafe gps_guard: remove time alert telemetry 2026-11-11 07:58:39 -04:00
fdlamotte 5a762ad907 Merge pull request #3812 from fdlamotte/revert-3784
Revert "Merge pull request #3784 from Maxwell456/feature/repeater-his…
2026-11-11 07:52:27 -04:00
Florent 74f1f5a156 Revert "Merge pull request #3784 from Maxwell456/feature/repeater-history"
This reverts commit f678f6ac15, reversing
changes made to b8ae75d258.
2026-11-11 07:49:41 -04:00
Florent 85bba10742 companion_radio: rewrite mdns part removing String class 2026-11-11 07:37:24 -04:00
fdlamotte e7c6d079cc Merge pull request #3810 from fdlamotte/revert_rak13302_tests
tests: revert rak13302 tests
2026-11-11 07:30:25 -04:00
Florent 0147165b14 tests: revert rak13302 tests 2026-11-11 07:26:01 -04:00
Liam Cottle 09eac55bc3 Merge pull request #3807 from Valentin-Metz/fix/cli-reply-buffer-overflow
Fix stack-buffer overflow in CLI reply buffers
2026-11-11 17:37:42 +13:00
Valentin Metz 224658694f Fix stack-buffer overflow in CLI reply buffers
The remote-CLI reply buffers in onPeerDataRecv() (repeater, room server,
sensor) and BaseChatMesh were sized temp[166] for a 5-byte datagram
header plus 161 bytes of reply. But MyMesh::handleCommand() first
reflects a 3-byte correlation prefix (e.g. 'aa|') into the reply, after
which CommonCLI commands may write up to 160 chars + NUL into the
remaining 158 bytes -- overflowing the buffer by 2 bytes (e.g. a full
'regions' listing via exportTo(reply, 160)).

Triggering this remotely crashes the node (observed as an unresponsive
repeater after a prefixed 'regions' query); the 2 out-of-bounds bytes
are a printable region-name character and a NUL.

Size the buffers for the full worst case instead:
5 header + 3 prefix + 160 reply + 1 NUL = 169.

Verified with a host ASan harness reproducing the exact layout:
prefixed 'regions' with a 25-region listing overflowed temp[166]
(BufStream::write, RegionMap.cpp) and now passes clean with temp[169];
unprefixed (serial) path unaffected.
2026-11-11 05:30:54 +01:00
Olexandr Tyshchenko 196ca97751 GPS guard: show "time wait" instead of "rej nofix" between fixes
When the last GPS time check passed but there is no current trusted fix
(e.g. the GPS is asleep between periodic fixes), gps guard showed
"time rej nofix", which reads like a rejection although the clock is fine.
Show "time wait" instead. A real rejection without a trusted fix (GPS time
arriving while fixes are rejected) still shows "rej nofix".
2026-11-11 01:48:12 +02:00
fdlamotte ef4477b69d Merge pull request #3798 from AlexandrTyshchenko/feature/gps-baud-probe-list
GPS: GPS_BAUD_PROBE_LIST as a build flag for any NmeaGpsDriver; enable on Station G2/G3
2026-11-10 18:57:35 -04:00
Olexandr Tyshchenko ef6ef2e9d2 GPS: GPS_BAUD_PROBE_LIST as a build flag for any NmeaGpsDriver; enable on Station G2/G3
The probe list was wired only in variants/promicro/target.cpp. It is now the
default list of NmeaGpsDriver when GPS_BAUD_PROBE_LIST is set, so a variant
enables baud autodetection with a build flag alone.

Station G2 and G3 enable it: their Grove UART connector is used with M5Stack
Unit GPS modules, which default to 115200.
2026-11-10 23:51:29 +02:00
fdlamotte f678f6ac15 Merge pull request #3784 from Maxwell456/feature/repeater-history
Add min/max/avg history queries to repeaters
2026-11-10 12:42:53 -04:00
fdlamotte b8ae75d258 Merge pull request #3770 from lihardyextreme/feature-mdns
feat: mDNS ESP32 - enable local network discovery over mDNS
2026-11-10 12:07:18 -04:00
fdlamotte 44702f93a9 Merge pull request #3793 from fdlamotte/eink_hibernate_when_off
eink: some updates (busy loop + hibernate when screen off)
2026-11-10 12:00:43 -04:00
Florent 8d5bd2e2c7 eink: some updates (busy loop + hibernate when screen off) 2026-11-10 11:52:38 -04:00
fdlamotte be5efc242f Merge pull request #3778 from dahuib/rak16000-v1.18.0-clean
Support RAK16000 (INA219 at 0x41)
2026-11-10 11:45:43 -04:00
dahuib a655d1f785 Support RAK16000 (INA219 at 0x41) on dev 2026-11-10 15:57:32 +01:00
fdlamotte d495d2edf5 Merge pull request #3623 from BeGiBue/feature/wio-l1-eink-repeater
Add repeater environment for Wio Tracker L1 E-Ink
2026-11-10 09:06:45 -04:00
fdlamotte d1df7d2722 Merge pull request #3664 from Martin-hub1/dev
Add DFRobot LoRaWAN ESP32-S3 Companion BLE firmware
2026-11-10 09:06:07 -04:00
fdlamotte 4b71ed4498 Merge pull request #3613 from agessaman/feat/rak13302-auto-onboard-sleep
feat(rak3401): automatically sleep the RAK4631’s onboard SX1262 when paired with a RAK13302
2026-11-10 09:01:51 -04:00
fdlamotte 2367886a4c Merge pull request #3724 from akalinin-softvelum/feature/eink-busy-hook-v2
companion: keep mesh/BLE running during e-ink refresh
2026-11-10 08:40:43 -04:00
fdlamotte b7ab9fbc6f Merge pull request #3725 from Blake-Latchford/fix/espnow-no-lora-build
Fix Generic_ESPNOW_* builds on boards without a LoRa radio
2026-11-10 08:25:37 -04:00
fdlamotte 6f4cd39a6e Merge pull request #3648 from olimexsmart/feature/lilygo-t3-stm32
Add LilyGO T3 STM32 support
2026-11-10 08:23:03 -04:00
fdlamotte ad97616894 Merge branch 'dev' into feature/lilygo-t3-stm32 2026-11-10 08:22:52 -04:00
fdlamotte d6d51333c2 Merge pull request #3762 from wmacgreg/feature/nucleo-wl55jc
Add variant for ST Nucleo-WL55JC1 (STM32WL55JC) 🤖🤖
2026-11-10 08:14:51 -04:00
fdlamotte e6d141d6f7 Merge pull request #3785 from AlexandrTyshchenko/feature/companion-adc-multiplier
Companion: set/get adc.multiplier CLI command
2026-11-10 08:11:33 -04:00
fdlamotte 62ae611afd Merge pull request #3753 from fdlamotte/gps_refactor
Big GPS refactor
2026-11-10 07:44:00 -04:00
fdlamotte 544514f5b4 Merge pull request #4 from AlexandrTyshchenko/feature/gps-guard-refactor
GPS: optional anti-spoofing guard for position and time (GPS_GUARD)
2026-11-09 18:02:06 -04:00
Olexandr Tyshchenko 8c7e1a8f5d GPS guard: gps guard on/off, saved in the GPS prefs 2026-11-09 23:50:48 +02:00
fdlamotte 519cf4c029 Merge pull request #3 from AlexandrTyshchenko/feature/gps-baud-autodetect-refactor
NmeaGpsDriver: optional UART baud rate detection from a per-board list
2026-11-09 17:38:29 -04:00
Olexandr Tyshchenko d72f67d37b GPS guard: save gps fence in the GPS prefs 2026-11-09 23:16:29 +02:00
Olexandr Tyshchenko cbfa66df9d NmeaGpsDriver: baud rates to probe come from the board, not a build flag 2026-11-09 22:59:47 +02:00
Olexandr Tyshchenko fbd20ac64b GpsGuard: let GPS correct a clock outside the plausible window 2026-11-09 22:54:18 +02:00
Olexandr Tyshchenko eea64ffb74 GPS guard: drop time force, it goes to a separate PR 2026-11-09 22:30:24 +02:00
Olexandr Tyshchenko 181041ac64 GpsGuard: do not show a stale time ok without a current trusted fix 2026-11-09 22:15:45 +02:00
Olexandr Tyshchenko d644f0a516 GPS: optional anti-spoofing guard for position and time (GPS_GUARD)
A spoofed GPS signal can move a fixed node anywhere and set its clock to
any time; the clock only moves forward, so a time pushed into the future
breaks timestamps and replay protection until fixed by hand.

With GPS_GUARD, MicroNMEALocationProvider asks a GpsGuard before a fix is
stored as the last fix (satellites, HDOP, optional region box, fence
around the configured position, jump speed, N stable fixes) and before
GPS time is written to the clock (trusted fix current, not before the
build date, small steps once the clock is valid, drift-sized after the
first sync). Without a trusted fix no live position is reported.

CLI in CommonGpsPrefs: 'gps guard', 'gps guard accept', 'gps fence',
'gps ref'; CommonCLI keeps the reference on set lat/lon and gps setloc,
resets the time anchor on manual clock sets and adds 'time force'.

Ported from #3736 onto the GpsDriver/LocationProvider refactor.
2026-11-09 20:43:09 +02:00