Commit Graph
4027 Commits
Author SHA1 Message Date
liamcottle e672679d6e refactored companion interfaces to allow for multiple active connection modes 2026-07-28 03:18:54 +12:00
liamcottle b4143a4402 rename class 2026-07-28 03:18:54 +12:00
liamcottle 5de857f8f8 initial ch390 ethernet support for thinknode m7 companion 2026-07-28 03:18:54 +12:00
ripplebizandGitHub c86e63d2f5 Merge pull request #2982 from meshcore-dev/config-serializer
Config serializer
2026-07-27 17:58:03 +10:00
ripplebizandGitHub 301bc10dd3 Merge pull request #3034 from meshcore-dev/ui-color-refactor
UI color refactor
2026-07-27 17:45:12 +10:00
Liam CottleandGitHub cee6d94894 Merge pull request #3040 from blowfishpro/docs/FixPayloadDocsFormatting
Increase header levels on "Payloads" documentation page to fix table of contents
2026-07-27 14:13:09 +12:00
Talia b62b421456 docs: increase header levels on payloads page to fix table of contents
mkdocs will only consider the first H1 (if any) and subheaders under it for the table of contents

this increases the header levels of everything below "important concepts" by 1 so that the table of contents correctly resolves them
2026-07-26 15:55:27 -07:00
Jakub 096e4580b5 Merge branch 'bot-actions-gpio'
# Conflicts:
#	release-notes.md
2026-07-25 18:46:34 +02:00
JakubandClaude Opus 4.8 5844fa2390 refactor(bot,ui): dedupe bot token parsing, drop redundant turnOn, fix comment
Post-review cleanups, no behaviour change:
- botScanCommands() parsed the command name and its two args with three
  near-identical read-token loops; extracted a single readToken() lambda.
- Fn+Esc lock branch turned the display on twice (the unlock arm repeated
  what the branch head already did); dropped the redundant call.
- setGpioMode()'s comment said "Cycle" (cycling lives in GpioScreen); now
  describes what it actually does — set a specific mode + persist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 00:00:07 +02:00
JakubandClaude Sonnet 5 0a61b7ef15 fix(bot,ui): defer bot actions past throttle, fix CardKB lock bypass, add !gps fix timeout arg
- Bot Actions (!buzz/!gps/!advert/!gpio1-4) ran their side effect
  immediately during botScanCommands(), before quiet-hours/cooldown/
  per-contact throttle were checked -- those gates only suppressed the
  reply text, not the actual buzz/GPS toggle/advert/pin write. botCommandReply()
  now only records what was requested; applyPendingBotActions() runs the
  deferred effects once a wrapper's throttle checks pass and the ack sent,
  mirroring the existing _locfix_requested pattern. resetPendingBotActions()
  clears everything on every throttled/aborted path.

- CardKB's Fn+<letter> accent-popup shortcut bypassed the locked-input gate
  (it called into KeyboardWidget directly instead of through the
  enqueueKey()/dequeue path every other key uses, so it wasn't discarded
  while _locked). Now checks _locked itself.

- Since a locked device now correctly ignores CardKB entirely, Fn+Esc
  (single press) is added as CardKB's own lock/unlock gesture -- otherwise
  a CardKB-only setup had no way to unlock. Esc rather than the adjacent
  Fn+Backspace, to avoid an accidental press.

- botScanCommands() now parses up to two arguments per command instead of
  one. Used by "!gps fix [seconds]" to override the default 90s timeout
  (clamped 15-300s) for a poor sky view where 90s isn't always enough to
  reach isLocFixReady()'s HDOP/satellite bar.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 23:51:31 +02:00
JakubandClaude Sonnet 5 7b6ae8e2cb feat(gps): use HDOP for !gps fix readiness, satellite count as fallback
Satellite count alone is a poor proxy for fix quality -- few satellites
in good geometry can beat many in poor geometry. LocationProvider now
exposes getHDOP() (default -1 = unsupported); MicroNMEA implements it.
isLocFixReady() prefers HDOP <= 2.0 when available, falling back to the
old >=8 satellite threshold for providers that don't report it (e.g.
RAK12500/u-blox).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 22:49:17 +02:00
JakubandClaude Sonnet 5 5e3c958114 docs: label the Admin login fixes as v1.23.1
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
v1.23.1
2026-07-24 21:35:19 +02:00
JakubandClaude Sonnet 5 2c656f5af7 fix(ui): a stale login reply for a different node could be accepted
Same fix as hotfix/admin-login-timeout (96b44460). AdminScreen's only
guard was "_phase == LOGIN" (true for any node sat at the login
screen), not that the reply actually named _target. Now also checks
pub_key against _target.id.pub_key.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 18:27:02 +02:00
JakubandClaude Sonnet 5 96b444601f fix(ui): a stale login reply for a different node could be accepted
AdminScreen::onRoomLoginResult()'s only guard was "_phase == LOGIN" --
true for *any* node currently sat at the login screen, not specifically
_target. Combined with UITask::onRoomLoginResult()'s current-screen
dispatch (not requester-based), a slow reply for an earlier login
attempt (this screen's own previous target, or even MessagesScreen's)
arriving while the user has since opened Admin on a different,
password-less node -- still parked at the blank LOGIN keyboard, so
_phase == LOGIN here too -- was accepted as that new node's own login
result, flipping _admin_ok/_phase to COMMAND without ever actually
authenticating with it.

Root-caused by cancelUiPendingLogin() (previous commit): that fix
covers the "gave up, then it resolved late" path, but not "a reply for
a genuinely different pubkey arrives while merely _phase == LOGIN".
Checking pub_key against _target.id.pub_key closes that regardless of
which path let the reply through.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 18:24:59 +02:00
JakubandClaude Sonnet 5 9932fb01df fix(ui): late Admin login reply could be misrouted after giving up
Same fix as hotfix/admin-login-timeout (5a5ebe9f). UITask::onRoomLoginResult()
dispatches by whichever screen is currently shown, not by who sent the
request, so a reply arriving after AdminScreen gave up (Cancel or the
timeout fix) could land on MessagesScreen instead and persist its own
unrelated _login_pw as the "confirmed" password for that pubkey.
MyMesh::cancelUiPendingLogin(pub_key) stops tracking the request on
give-up so a late reply matches nothing instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 18:21:31 +02:00
JakubandClaude Sonnet 5 5a5ebe9ff1 fix(ui): late Admin login reply could be misrouted after giving up
UITask::onRoomLoginResult() dispatches a login reply to whichever
screen is *currently* shown (curr == admin_screen ? AdminScreen :
MessagesScreen), not to whoever actually sent the request. Neither
giving up path (manual Cancel, or the timeout added in 23f43cac) told
MyMesh to stop tracking the request, so a reply that still arrived
after the user had navigated away landed on whatever screen they'd
moved to instead -- most likely MessagesScreen, which then persisted
its own unrelated _login_pw as the "confirmed" password for that
pubkey, silently corrupting the saved password even on a genuine
success.

Adds MyMesh::cancelUiPendingLogin(pub_key), pubkey-guarded so it's a
no-op if a newer request has since overwritten ui_pending_login, called
from both of AdminScreen's give-up paths. A late reply now simply
matches nothing and is dropped.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 18:20:08 +02:00
JakubandClaude Sonnet 5 0ab74bdd41 fix(ui): Admin password change didn't update the saved login copy
Same fix as hotfix/admin-login-timeout (05609019). Tools > Admin >
System > "Admin password" changes the remote's admin credential but
never updated this device's saved copy, so the next login retried the
password just replaced -- likely the actual trigger behind the
"stuck on Logging in..." report. Parses CommonCLI's "password now: <v>"
success echo and saves that as the new on-device password.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 18:13:33 +02:00
JakubandClaude Sonnet 5 05609019b4 fix(ui): Admin password change didn't update the saved login copy
Tools > Admin > System > "Admin password" (set-only, sends "password
<new>") changes the remote node's own admin credential, but nothing
updated this device's saved copy of it -- so the very next login
attempt to that node retried the password just replaced, landing
straight in the "stuck on Logging in..." case fixed in the previous
commit. Likely the actual trigger behind that report.

CommonCLI::handleCommand() always echoes a successful password change
back as "password now: <value>" (truncation and all), so parsing that
reply gives the exact value now required to log back in, rather than
trusting what we sent (which the remote may have truncated further).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 18:11:30 +02:00
JakubandClaude Sonnet 5 220d46de8e feat(bot): !gps fix -- single-shot GPS location
Turns GPS on (if it wasn't already), waits for a stabilised fix
(isValid() + >=8 satellites, then averages 10s of readings), sends the
position, and restores GPS to whatever state it was in before -- up to
a 90s timeout, after which it reports a partial fix (if it got any
samples) or plain failure.

Replies in two parts since a fix takes seconds-to-minutes, unlike every
other bot command here: an immediate "acquiring fix..." ack (through
the existing synchronous command path), then the actual position as a
separate follow-up message once ready, delivered to whichever
destination (DM/room/channel) the request came from. Only one fix can
be in flight at a time -- a second request while one is pending gets an
immediate "already pending" instead of silently replacing it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 17:57:05 +02:00
JakubandClaude Sonnet 5 176094d32e fix(ui): Admin login could hang forever on "Logging in..."
AdminScreen's LOGIN phase had no timeout, unlike its COMMAND phase
(_cmd_deadline_ms). If a login reply never arrived -- most commonly a
saved password gone stale after the remote node's password changed,
silently dropped instead of nacked -- the screen stayed stuck with only
a manual Cancel to escape.

sendRoomLogin() now returns the same est_timeout sendAdminCommand()
already exposes; AdminScreen uses it to arm a deadline (poll(),
mirroring the COMMAND-phase pattern) that forgets the stale password
and returns to the picker on expiry, same as an explicit login
rejection already does.

Same fix as hotfix/admin-login-timeout (23f43cac), split out of this
branch's other in-progress work.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 17:56:46 +02:00
JakubandClaude Sonnet 5 23f43cac59 fix(ui): Admin login could hang forever on "Logging in..."
AdminScreen's LOGIN phase had no timeout, unlike its COMMAND phase
(_cmd_deadline_ms). If a login reply never arrived -- most commonly a
saved password gone stale after the remote node's password changed,
silently dropped instead of nacked -- the screen stayed stuck with only
a manual Cancel to escape.

sendRoomLogin() now returns the same est_timeout sendAdminCommand()
already exposes; AdminScreen uses it to arm a deadline (poll(),
mirroring the COMMAND-phase pattern) that forgets the stale password
and returns to the picker on expiry, same as an explicit login
rejection already does.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 17:50:56 +02:00
ripplebizandGitHub e3de413a69 Merge pull request #3036 from oltaco/add-preamble-irq-flag
Fix missing PREAMBLE_DETECTED IRQ flag for all radio wrappers
2026-07-25 01:40:19 +10:00
taco 6b83de507d SX1268: add PREAMBLE_DETECTED to reported irq flags 2026-07-25 00:46:39 +10:00
taco 0d2b988f24 STM32WLx: add PREAMBLE_DETECTED to reported irq flags 2026-07-25 00:46:39 +10:00
taco c56928347f LLCC68: add PREAMBLE_DETECTED to reported irq flags 2026-07-25 00:46:39 +10:00
taco ea5d7c8bf5 LR1110: add PREAMBLE_DETECTED to reported irq flags 2026-07-25 00:46:36 +10:00
taco fae4803158 SX1262: add PREAMBLE_DETECTED to reported irq flags 2026-07-25 00:38:44 +10:00
JakubandClaude Sonnet 5 a0b1c80c85 feat(ui): compact on-screen keyboard toggle for external keyboards
Add Settings > Keyboard "Ext. KB" row (boards with a CardKB-capable I2C
bus only): switching it to Compact hides the letter grid and special-row
icons in favour of a one-line status (script/page, caps) plus a Fn-shortcut
reminder, since an external-keyboard typist never looks at the on-screen
grid. Accent/placeholder popups still render as before. Off by default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 15:51:51 +02:00
Scott Powell f83ad03e5e * T114 display fix 2026-07-24 18:35:56 +10:00
Scott Powell 0c04a47355 * fixed for mono ST7789 display driver 2026-07-24 15:31:22 +10:00
Scott Powell 3857f45826 * monochrome displays now do _not_ invert titlebar 2026-07-24 15:14:56 +10:00
Scott Powell ee79df4c4f Merge branch 'dev' into config-serializer
# Conflicts:
#	test/mocks/Arduino.h
#	test/mocks/Stream.h
2026-07-24 15:06:48 +10:00
Liam CottleandGitHub e780cca237 Merge pull request #3033 from liamcottle/board/lilygo-tbeam-sx1276
Increase LilyGo T-Beam SX1276 channels from 8 to 40
2026-07-24 15:34:19 +12:00
liamcottle 520fa77f4f increase tbeam sx1276 max group channels from 8 to 40 2026-07-24 15:31:01 +12:00
Liam CottleandGitHub d531a98da1 Merge pull request #2819 from ViezeVingertjes/fix/kiss-modem-usb-backpressure
fix: prevent ESP32 KISS modem stalls under USB backpressure
2026-07-24 11:51:34 +12:00
Nick Dunklee 783b21bb9f Global nrf52 hardware crypto, removed from individual configs
Select nodes had this flag enabled, testing by the community
and hardware specs indicate this can be enabled global for all
node types using this chipset.

Any nodes down the line that may be quirky can be individually
disabled with `-U USE_CC310_HW_CRYPTO`.
2026-07-23 14:02:34 -06:00
JakubandClaude Sonnet 5 ad4668242b fix(ui): CardKB key handling - debounce, Fn modifier for submit/accents
CardKB is level-triggered (repeats the held byte every poll) and its Enter
key collided with the on-screen keyboard grid's own commit action, causing
duplicate characters and accidental message sends. Debounce polling and use
the CardKB v1.1 Fn modifier (confirmed working on real hardware) instead of
tracking navigation state: plain Enter now behaves like the physical centre
button, Fn+Enter submits, Fn+Tab opens the Hold-Enter equivalent, and
Fn+<letter> opens that letter's accent popup directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 17:49:04 +02:00
Liam CottleandGitHub 8a69f34101 Merge pull request #3023 from agessaman/fix/rx-boosted-gain
fix(room_server): support RX boosted gain
2026-07-23 03:22:41 +12:00
Scott Powell 56274db4ad * build fixes for old ESP32 boards 2026-07-22 19:52:23 +10:00
Scott Powell a96a66aa99 * build fixes for NullDisplayDriver 2026-07-22 18:55:59 +10:00
Scott Powell b8504e55c6 * refactor of Color mapping in UITasks / DisplayDrivers
* color displays now with a new light theme
2026-07-22 16:03:33 +10:00
JakubandClaude Sonnet 5 7cae6470bf feat(ui): CardKB (I2C keyboard) support with full keyboard-only navigation
Auto-detected at boot on Wire1/Grove (addr 0x5F) -- no setting to flip, and a
no-op on boards without that bus or with nothing attached. This UI's key
codes (KEY_LEFT/UP/DOWN/RIGHT/ENTER/CANCEL) already match CardKB's own byte
protocol, so most input needs zero translation and flows through the same
key queue as physical buttons.

Two bytes get remapped in UITask::pollCardKB():
- Enter, only when the on-screen keyboard's plain grid state is active (no
  placeholder/accent popup, not in cursor-mode), becomes a new KEY_KB_ENTER
  sentinel meaning "submit the field" -- reusing plain KEY_ENTER there would
  insert a stray character, since a CardKB typist's row/col never reflect an
  intentional grid selection. Everywhere else Enter is untouched, so
  selecting a placeholder or committing an accent still works normally.
- Tab (otherwise unused) becomes KEY_CONTEXT_MENU, standing in for the
  "Hold-Enter" long-press gesture CardKB has no way to produce -- without it,
  ~30 context menus across the UI (message reply/navigate, Bot/Admin/
  Repeater, ...) would be unreachable from the keyboard alone.

KeyboardWidget gains a direct-typing path: printable ASCII inserts straight
at the cursor bypassing the grid, Backspace deletes, KEY_KB_ENTER submits.

Build-verified: WioTrackerL1_companion_solo_dual and
WioTrackerL1Eink_companion_solo_dual both compile and link clean; also
smoke-tested Heltec_mesh_solar_companion_radio_ble (no ENV_PIN_SDA/SCL) to
confirm zero regression on boards without the feature.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 23:43:33 +02:00
JakubandClaude Sonnet 5 a57d5d67bb rename(ui): Auto-Reply Bot -> Remote Bot
The bot outgrew "auto-reply" once it gained Actions (!buzz/!gps/!advert/
!gpio1-4) that control device hardware remotely, not just answer messages.
Renames the Tools screen entry and all doc cross-references; already-shipped
release notes (v1.23) are left as-is to match what actually shipped under
that name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 23:15:41 +02:00
agessaman a71cc23854 fix(room_server): support RX boosted gain
The room server never supported RX boosted gain, while the repeater
does. Three consequences on SX1262/SX1268 boards:

- boosted gain was never applied to the radio at boot, so a room server
  ran in power-saving RX mode while an identical repeater ran boosted -
  a real receive-sensitivity difference with nothing pointing at it
- _prefs.rx_boosted_gain was never initialised (the prefs are memset to
  0 before defaults are set), so it defaulted to off
- 'set radio.rxgain on' replied "Error: unsupported" but CommonCLI had
  already written the value to prefs and saved them, so a stale setting
  survived reboot and was never applied

Mirror the repeater's implementation: initialise the pref default under
the same USE_SX1262/USE_SX1268 and SX126X_RX_BOOSTED_GAIN guards, apply
it during radio init, and override setRxBoostedGain() so the CLI reports
success and takes effect.

Built Heltec_v3_room_server (SX1262) and LilyGo_T3S3_sx1276_room_server
(guards compile out cleanly).
2026-07-21 12:23:20 -07:00
JakubandClaude Sonnet 5 5bfebc6559 feat(bot): Actions commands, multi-trigger, and user GPIO pins
- Auto-Reply Bot gains Actions (!buzz/!gps/!advert) behind a new per-target
  toggle nested under Commands (bot_actions_dm/ch/room); off by default.
- Bot Trigger fields accept comma-separated multiple phrases, matching any
  one fires the reply.
- New user-assignable GPIO feature (Wio Tracker L1): !gpio1..!gpio4 bot
  commands plus a Tools > GPIO screen. Each pin cycles Off/Input/Output;
  GPIO1/GPIO2 (P0.02/P0.29, the nRF52840's AIN0/AIN5) also offer a read-only
  Analog mode via direct SAADC access. GPIO3/GPIO4 (P0.09/P0.10) are the
  chip's NFC1/NFC2 pins, repurposed as plain GPIO via a one-time UICR
  NFCPINS bit-clear in initVariant() (adapted from Adafruit's own
  nfc_to_gpio example) -- confirmed working on real hardware.
- Fix: DM/room reply-prefix ("@[nick] ") stripping happened at the wrong
  layer, hiding the "To:" header on DM replies and leaking the raw prefix
  into room messages' list view; a related mismatch had the history
  scrollbar's sizing pass wrap room messages with the sender name still
  attached, disagreeing with the actual rendered text.

Build-verified: WioTrackerL1_companion_solo_dual and
WioTrackerL1Eink_companion_solo_dual both compile and link clean
(sizeof(NodePrefs) confirmed 2720 via real build, not guessed).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 20:30:03 +02:00
Scott Powell 78240e9477 * optimised: value-init not needed 2026-07-21 19:22:09 +10:00
ripplebizandGitHub 4157e43ace Merge pull request #3005 from axhoff/agent/fix-ble-reconnect
Fix bonded BLE reconnects on ESP32
2026-07-21 19:17:34 +10:00
ripplebizandGitHub 8b048ab19a Merge pull request #3007 from axhoff/agent/synchronize-ble-receive-queue
Synchronize the ESP32 BLE receive queue
2026-07-21 18:10:37 +10:00
ripplebizandGitHub 6a15e1712b Merge pull request #3006 from axhoff/agent/fix-heltec-v4-usb-companion
Enable hardware USB serial on Heltec V4
2026-07-21 17:54:22 +10:00
Liam CottleandGitHub 7124fa1439 Merge pull request #2815 from UltimateCodeWarrior/fix/tbeam-supreme-v3-oled-i2c
Fix blank OLED on T-Beam Supreme V3 (I2C bus init + 0x3D address)
2026-07-21 19:17:32 +12:00