Commit Graph
1104 Commits
Author SHA1 Message Date
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
liamcottle e3c1c34828 fix for mdns string not compiling due to ambiguous overload 2026-11-12 16:08:30 +13: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 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
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
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 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 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
Olexandr Tyshchenko 8c7e1a8f5d GPS guard: gps guard on/off, saved in the GPS prefs 2026-11-09 23:50:48 +02:00
Olexandr Tyshchenko d72f67d37b GPS guard: save gps fence in the GPS prefs 2026-11-09 23:16:29 +02:00
Olexandr Tyshchenko da1828fd9d Companion: set/get adc.multiplier CLI command, persisted in prefs
Repeaters, room servers and sensors already let the battery ADC multiplier be tuned with 'set adc.multiplier' (CommonCLI). The companion firmware had no equivalent, so a board whose divider differs from the build default (common on DIY ProMicro / Faketec boards) always reported a wrong battery voltage.

Adds the same command to the companion CLI. The value is stored in the companion prefs (comp.adc_mult, 0 = board default) and applied at startup via MainBoard::setAdcMultiplier().
2026-11-08 18:07:58 +02:00
Maxwell 25c1867bbd Add min/max/avg history queries to repeaters
Move TimeSeriesData from simple_sensor into src/helpers and drive it with
monotonic uptime, so RTC changes cannot stall recording or break queries.
Keep the old RTCClock* overloads as deprecated for custom sensor sketches.

Record 24h of battery, noise floor, TX/RX airtime % and MCU temperature on
repeaters and answer the existing 0x04 min/max/avg request using the same
format as sensor nodes. No packets are sent by this feature.
REPEATER_HISTORY_SLOTS=0 removes it; default off on STM32/RP2040.

Add native tests for TimeSeriesData and document the request and channels.
2026-11-08 16:34:54 +02:00
Florent 6eea5e7185 ui_task: let user choose if enter in gps screen toggles or triggers gps 2026-11-08 08:47:35 -04:00
Florent 3fd36e7ac6 gps: adapt ui-new and the sensor managers 2026-11-08 08:47:34 -04:00
Florent fe6a47d0c9 gps: move the gps CLI to GpsPrefs and convert all targets 2026-11-08 08:47:34 -04:00
Florent df5a768c5d gps: add GpsDriver, handle the hardware and software switches in the drivers 2026-11-08 08:47:34 -04:00
anders-dc 9fd02ff3bc fix(companion): guard null _serial in contact overwrite and full callbacks 2026-11-08 11:01:05 +01:00
agessaman 322cd638fb Merge remote-tracking branch 'upstream/dev' into feat/kiss-agc-fem-control 2026-11-06 20:38:01 -08:00
Li Hardy Extreme 9a2230b60e feat: mDNS ESP32 - enable local network discovery over mDNS 2026-11-06 00:10:59 +01:00
Will MacGregorandClaude Opus 5 bb3e77dc36 Enable simple_room_server on the STM32 platform
The room server gated its filesystem paths on NRF52_PLATFORM only, so an
STM32 build fell through to the ESP32 branch and failed to compile:

  MyMesh.cpp:147: no matching function for call to
    'Adafruit_LittleFS::open(const char*&, const char [2], bool)'
  main.cpp:69:   'store' was not declared in this scope

STM32 uses the same InternalFS / Adafruit_LittleFS API as nRF52, including
append semantics (FILE_O_WRITE opens LFS_O_RDWR|LFS_O_CREAT and then seeks
to the end), so the nRF52 branch is already correct for it. Add
STM32_PLATFORM alongside NRF52_PLATFORM in the four remaining gates;
saveIdentity() already did this.

This unblocks the room_server example on the existing STM32WL boards
(wio-e5-mini, wio-e5-dev, rak3x72, tiny_relay) as well as new ones.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-11-04 09:46:27 -05:00
Liam Cottle 77d81d1f82 Merge pull request #3603 from A13xB0/companion-buzzer-cli
Add CLI command to toggle the buzzer for companions
2026-10-30 12:53:18 +13:00
akalinin-softvelum 1df6262d58 companion: enable e-ink refresh loop only with EINK_REFRESH_LOOP
Only builds that define EINK_REFRESH_LOOP install the busy hook; for now
the T-Echo companion BLE/USB envs.
2026-10-29 13:21:11 +00:00
akalinin-softvelum 05423e516a companion: keep mesh/BLE running during e-ink panel refresh
Use GxEPD2's busy callback to run the mesh, interface and sensor loops
(loopCore(), shared with loop()) while the panel refreshes, instead of
blocking the main loop. Covers the partial refresh in endFrame(), the
full wipe in startFrame(), and the sleep icon / blank refresh on turnOff().
2026-10-29 12:38:30 +00:00
fdlamotte 04d72b1049 Merge pull request #3687 from fdlamotte/display_prefs
ui: add some parameters to the cli (mostly regarding eink behaviour)
2026-10-29 08:35:36 -04:00
Florent 5d7100ae7d ui: add some parameters to the cli (mostly regarding eink behaviour) 2026-10-29 08:34:41 -04:00
ripplebiz 42ded8da64 Merge pull request #3688 from Blake-Latchford/fix/stats-dup-count-wrap
Saturate duplicate packet stats instead of wrapping
2026-10-28 17:06:21 +11:00
Liam Cottle fd56b1a36c Merge pull request #3615 from radek-sixi/fix/common-radio-prefs-signed-tx-power
Fix unsigned conversion of negative TX power in CommonRadioPrefs
2026-10-27 22:44:04 +13:00
Blake LatchfordandClaude Opus 5.5 26e438904e Saturate duplicate packet stats instead of wrapping
Tested on a Heltec V4 repeater with the counter seeded at 65530.

Fixes #3255

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 21:45:10 -04:00
ripplebiz 46216b2d0d Merge pull request #3617 from aXistem-dev/feat/tz-offset-quarter-hours
Show quarter-hour timezone offsets with two decimals
2026-10-26 12:27:10 +11:00
ripplebiz 55abbe72b2 Merge pull request #3667 from Blake-Latchford/fix/kiss-modem-usbcdc-tx-buffer
Fix broken KISS modem build on 6 ESP32-S3 platforms
2026-10-26 12:02:57 +11:00
fdlamotte ea8e95447f Merge pull request #3659 from fdlamotte/elecrow_eink_refactor
Elecrow eink refactor
2026-10-24 19:50:03 -04:00
Florent da98f5318d UiTask: better cleaning of eink screens when hibernating 2026-10-24 10:16:56 -04:00
Blake Latchford 47259633f2 Fix broken KISS modem build on 6 ESP32-S3 platforms
Broken out from PR #3496 which has been open for a month.
2026-10-22 17:57:33 -04:00
Marcel Verdult 56b5f4e9c6 fix(chat): refuse a negative text length for a group message
CMD_SEND_CHANNEL_TXT_MSG reads txt_type, channel_idx and a 4 byte timestamp, so
the frame needs 7 bytes before the text starts, and the branch had no length
guard. For a shorter frame "len - i" is computed in size_t, wraps, and reaches
sendGroupMessage() as a negative int. The clamp there tests
"text_len + prefix_len > MAX_TEXT_LEN", which a negative value passes, and the
following memcpy() converts the length back to a size_t: a 3 byte frame asks for
4294967292 bytes into a 197 byte stack buffer.

Two guards, because there are two mistakes. The branch now states its minimum
like most other branches of handleCmdFrame do, so a frame below 7 bytes is
answered through the existing path instead of being parsed. And
sendGroupMessage() refuses a negative length the way sendGroupData() in the same
file already does, which protects every other caller.

A frame of exactly 7 bytes keeps working and sends an empty message, as before.

Evidence. On a T-Echo running dev 428a95c6, built with
FIRMWARE_BUILD_DATE "f1-dev" and confirmed by "ver => v1.18.0 (Build: f1-dev)":

  CH_TXT len=7    -> RESP_CODE_OK
  GET_STATS core  -> uptime=78s
  CH_TXT len=3    -> NO REPLY
  DEVICE_QUERY    -> NO REPLY  (three times over 8 s, node never came back)
2026-10-22 09:33:07 +00:00
Florent 408d674ace DisplayDriver: fixing alignment issue in vtable for nrf52 and epd display 2026-10-21 17:13:27 -04:00
Florent a31e2c92df refactoring eink devices behaviour 2026-10-21 14:08:56 -04:00
Confituurke a8e8d01a3c Use two decimals only for exact quarter-hour offsets 2026-10-21 11:24:34 +02:00
R0ck 332f298544 Apply buzzer setting changes in the UI so no reboot needed. 2026-10-17 23:53:27 +01:00
R0ck 2ed45f08e7 Move to companion firmware, remove from varient 2026-10-17 23:37:14 +01:00
Confituurke b7389353e2 Show quarter-hour timezone offsets with two decimals
'get tz.offset' printed one decimal, so a UTC+5:45 offset (5.75)
read back as 5.8. Print two decimals when the offset is on a quarter
hour (x.25 / x.75); everything else keeps one decimal.
2026-10-17 13:03:06 +02:00
rado 85ad886589 Fix unsigned conversion of negative TX power in CommonRadioPrefs 2026-10-17 09:36:59 +02:00
Liam Cottle 428a95c643 Merge pull request #3606 from amdoolittle/feature/ble-conditional-display
Remove BLE screen when BLE not available
2026-10-17 15:38:18 +13:00
liamcottle 0e63c183a8 tz_offset should be treated as float when down casting calculation result to int32 2026-10-17 15:22:46 +13:00
liamcottle 7a0fde2912 timezone offset is now stored as float to allow half hour offsets 2026-10-17 15:16:38 +13:00
amdoolittle 6e1f474f7d Update UITask.cpp
Housekeeping: removed unnecessary space
2026-10-16 17:30:19 -07:00
amdoolittle b9c328a882 Remove BLE screen when BLE not available 2026-10-16 10:04:44 -07:00