mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-27 07:18:11 +00:00
feat(repeater): dedicated Tools screen + optional radio profile
Move the repeater controls out of Settings > Radio (where the indented sub-item labels collided with the value column on a 128px OLED) onto their own full-width Tools > Repeater screen, holding the toggle, the five flood-politeness filters, and live forwarding stats (Forwarded / Pool free / Queue) together. Toggle text standardised to ON/OFF throughout. Adds an optional dedicated radio profile (Network: Current/Custom): enabling the repeater can switch the radio to a preset/manual freq/bw/sf/cr and disabling restores the companion's params (revert-on-disable). A profile equal to the companion = same network; a different one = drop onto a separate repeater network. MyMesh::applyRepeaterRadio() is the single decision point (boot + every toggle/edit), gated by repeaterProfileValid(); the profile re-applies after a reboot left with the repeater on. Persisted behind schema 0xC0DE0010, cleared to off when an upgraded file yields an invalid config. Docs updated (settings_screen, tools_screen, README, FEATURES). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -71,23 +71,11 @@ Lists all available home screen pages. For each entry:
|
||||
| SF | 5–12 | LEFT/RIGHT. Spreading factor. |
|
||||
| BW | 7.8–500 kHz | LEFT/RIGHT cycles the standard LoRa bandwidths. |
|
||||
| CR | 5–8 | LEFT/RIGHT. Coding rate (4/5–4/8). |
|
||||
| Repeater | ON / OFF | When ON the companion also relays mesh traffic on its **current** frequency (no dedicated band needed), while still working as a normal companion. Loop-detection and flood-depth limits are always applied. Forwarding activity is visible in **Tools › Diagnostics**. |
|
||||
|
||||
When **Repeater** is ON, five optional "politeness" sub-items appear below it (all default OFF, so a plain repeater is unaffected). They only filter **flood** traffic — on a direct route this node is the named next hop, so it never drops those.
|
||||
|
||||
| Setting | Options | Notes |
|
||||
| -------------- | ------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| Skip advert | ON / OFF | Don't re-flood **advert** packets (the highest-volume flood traffic); messages and acks still relay. |
|
||||
| Max hops | Off / 1–8 | Drop a flood packet once it has already travelled this many hops. |
|
||||
| Yield | Off / x2–x9 | Scales the retransmit delay for **forwarded** floods only (own sends are unaffected), so a mobile companion defers to better-sited fixed repeaters. Widens the window for **Suppress dup**. |
|
||||
| Min SNR | Off / −20…10 dB | Drop a flood copy received below this signal-to-noise threshold, so marginal fringe traffic isn't re-flooded. |
|
||||
| Suppress dup | ON / OFF | If the same flood packet is overheard from another node while still queued to retransmit, cancel our copy — a peer already relayed it. Cuts redundant airtime in dense meshes; pairs with **Yield**. |
|
||||
|
||||
| Setting | Options | Notes |
|
||||
| --------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Pwr save | ON / OFF | **Battery saver.** Hardware duty-cycle receive: the SX126x cycles RX↔sleep on its own and wakes on a preamble, cutting average RX current. Trades a little receive latency; leave OFF for lowest-latency reception. Requires an SX126x radio (otherwise stays on continuous RX). |
|
||||
| Auto pwr | ON / OFF | **Adaptive Power Control.** Lowers actual TX power on strong links to save energy, ramping back up — to the **TX Pwr** ceiling — on weak or lost links. Link quality comes from direct-message ACK SNR and, for channel messages (no ACK), from hearing a repeater rebroadcast your packet. The radio page / name bar shows the live power. Default OFF (fixed TX power). |
|
||||
|
||||
The **repeater** mode and its flood filters live on their own screen — see **Tools › Repeater**.
|
||||
|
||||
---
|
||||
|
||||
### System
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
| :-----------------------: | :-----------------------: |
|
||||
|  |  |
|
||||
|
||||
The Tools screen is a hub for GPS trail recording, nearby node browsing, ringtone editing, auto-reply bot, auto-advert, compass, and device diagnostics. Navigate the tool list with **UP/DOWN** and press **Enter** to open a tool.
|
||||
The Tools screen is a hub for GPS trail recording, nearby node browsing, ringtone editing, auto-reply bot, auto-advert, compass, device diagnostics, and repeater mode. Navigate the tool list with **UP/DOWN** and press **Enter** to open a tool.
|
||||
|
||||
---
|
||||
|
||||
@@ -312,4 +312,31 @@ A single read-only screen of live device and mesh stats, refreshed once a second
|
||||
|
||||
The packet counters and **Forwarded** are cumulative since boot. Press **Enter** to open a confirm popup that resets them (defaults to *Cancel*); the live readings (noise, RSSI/SNR, pool, queue, uptime) are not affected. **Cancel/Back** returns to the Tools list.
|
||||
|
||||
The counters make the repeater behaviour observable: **Forwarded** confirms the node is actually relaying (not just configured to), and **Pool free** / **Queue** show whether forwarding is exhausting the packet pool. See **Settings › Radio › Repeater** for the relaying options.
|
||||
The counters make the repeater behaviour observable: **Forwarded** confirms the node is actually relaying (not just configured to), and **Pool free** / **Queue** show whether forwarding is exhausting the packet pool. See **Tools › Repeater** for the relaying options (which also shows these same forwarding stats in context).
|
||||
|
||||
---
|
||||
|
||||
## Repeater
|
||||
|
||||
Turns the companion into a packet **repeater** while it keeps working as a normal companion — no separate firmware. By default it relays on its **current** frequency, or you can give it a dedicated radio profile to switch to while relaying (see **Network** below). Loop-detection and an advert flood-depth cap are always applied. This screen keeps the toggle, the network/profile, its flood-filter options, and live forwarding stats together.
|
||||
|
||||
Navigate with **UP/DOWN**; change a value with **LEFT/RIGHT** (or **Enter** for toggles). **Cancel/Back** saves and returns to Tools.
|
||||
|
||||
| Setting | Options | Notes |
|
||||
| -------------- | --------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| Repeater | ON / OFF | Master switch. The options below appear only while it is ON. |
|
||||
| Network | Current / Custom | **Current**: relay on the companion's own frequency (default). **Custom**: enabling the repeater switches the radio to a dedicated profile (below) and disabling restores the companion's settings — so you can drop onto a separate repeater network and come back. Switching to Custom seeds the profile from your current settings. |
|
||||
| Rpt preset | named presets | _(Custom only)_ **Enter** picks a community/saved preset for the repeater profile. |
|
||||
| Rpt freq | chip range | _(Custom only)_ **Enter** opens the digit-by-digit editor (chip-validated bounds). |
|
||||
| Rpt SF / BW / CR | 5–12 / 7.8–500 kHz / 5–8 | _(Custom only)_ **LEFT/RIGHT** to adjust the profile's spreading factor, bandwidth, coding rate. |
|
||||
| Skip advert | ON / OFF | Don't re-flood **advert** packets (the highest-volume flood traffic); messages and acks still relay. |
|
||||
| Max hops | OFF / 1–8 | Drop a flood packet once it has already travelled this many hops. |
|
||||
| Yield | OFF / x2–x9 | Scales the retransmit delay for **forwarded** floods only (your own sends are unaffected), so a mobile companion defers to better-sited fixed repeaters. Widens the window for **Suppress dup**. |
|
||||
| Min SNR | OFF / −20…10 dB | Drop a flood copy received below this signal-to-noise threshold, so marginal fringe traffic isn't re-flooded. |
|
||||
| Suppress dup | ON / OFF | If the same flood packet is overheard from another node while still queued to retransmit, cancel our copy — a peer already relayed it. Cuts redundant airtime in dense meshes; pairs with **Yield**. |
|
||||
|
||||
The five flood filters are **opt-in** (default OFF, so a plain repeater is unaffected) and act on **flood** traffic only — on a direct route this node is the named next hop, so it never drops those.
|
||||
|
||||
**Same network vs. separate network.** With **Network = Current** (or a Custom profile set equal to your companion settings) the repeater stays on your own network — you keep messaging while relaying. With a *different* Custom profile the device moves entirely onto that network while relaying (a single radio can't be on two at once) and returns to your companion network when the repeater is switched off. The profile also re-applies after a reboot if the repeater was left on.
|
||||
|
||||
While the repeater is ON, the bottom of the screen shows live stats: **Forwarded** (packets actually re-transmitted — reflects Suppress dup), **Pool free**, and **Queue**. The same numbers appear, alongside the full device picture, in **Tools › Diagnostics**.
|
||||
|
||||
Reference in New Issue
Block a user