Commit Graph
126 Commits
Author SHA1 Message Date
tthandClaude Opus 5 9d5491f5db Merge upstream v1.17.0 (origin/main) into the analyzer/BLE fork
Upstream shipped companion/repeater/room-server v1.17.0 today; its tree is
identical to origin/main, so that is what this merges. Our base was 7 Jul
(7b566670), i.e. 350 files / +11k lines of upstream behind.

Conflicts and how they were settled:

* Mesh.cpp -- upstream split the dedup into wasSeen() + explicit markSeen().
  Kept BOTH: their new call pair AND our payload-length bound on the TRACE
  path-hash read, which is what stops a crafted short TRACE from steering
  isHashMatch() past the buffer.
* companion_radio/main.cpp -- upstream grew its own MultiSerialInterface
  (BLE + USB + WiFi + Ethernet registered side by side), which is a superset
  of the SerialDualInterface we backported from PR #1779. Took theirs whole;
  our copy is now dead code. NOTE: envs that relied on the backport for a USB
  console alongside BLE now need an explicit -D ENABLE_USB_INTERFACE.
* ui-new/UITask.cpp -- isSerialEnabled() was renamed isBluetoothEnabled()
  upstream and DisplayDriver::RED became UIColor::warning_txt. Same intent
  either way: no BT pin on screen while Bluetooth is off.
* EnvironmentSensorManager.cpp -- upstream fixed the millis() wrap on the GPS
  update timer in the exact line our gpsDutyLoop() call sits on. Kept both,
  with their wrap-safe compare.
* NRF52Board.cpp -- upstream independently arrived at the same sd_temp_get()
  fix for SoftDevice-protected TEMP. Took their form, kept our comment, which
  is the only place recording WHY (APP_MEMACC fault -> reboot on telemetry).
* RadioLibWrappers.{h,cpp}, simple_repeater/main.cpp -- add/add. Their
  configSideDetectors()/performChannelScan()/external watchdog next to our
  irqDoneMask()/probeDio1()/BLE pump/WDT feed. The repeater console keeps the
  1032-byte reply buffer for paged analyzer output and now clears it, since a
  static buffer would otherwise reprint the previous reply.
* .vscode/extensions.json -- deleted upstream, and it is in .gitignore; our
  only change was a comment. Gone.

Built clean: Xiao_x1_rpt, Xiao_x2_cmp, Xiao_x3_obs, SenseCap_s1_rpt,
T1000E_cmp_cz. Not flashed to anything yet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 22:44:07 +02:00
Scott Powell 49319023e5 Merge branch 'dev'
# Conflicts:
#	docs/payloads.md
2026-08-09 14:36:53 -04:00
tthandClaude Opus 5 b9848fe79a feat(radio): DIO1-less operation + pin diagnostics, to salvage bench-board
bench-board died 29. 7. 2026 to a breadboard short that put GND on D1 (= DIO1)
and 5 V on D0. Signature: `sent 0` with tx_timeout climbing WHILE A WITNESS
HEARD THE FRAMES, plus `recv 0` at strong signal -- the radio works, the
interrupt line does not. setPacketReceivedAction() is the only thing that
ever sets STATE_INT_READY, so a dead line means nothing is ever picked up.

LORA_POLL_IRQ reads completion from the chip's IRQ status register over SPI
instead. The chip latches those events regardless of whether they are mapped
out to a DIO pin, so this bypasses the whole line and therefore works no
matter WHICH end of it broke. Rewiring DIO1 to a spare GPIO only helps if the
broken end is the MCU's input pad -- and that is the less likely end, because
grounding an input cannot damage the input, it stresses whatever drives the
net. Polling is strictly stronger: if it does not revive the node, no wire
will either. Cost is one extra SPI read per Dispatcher pass, next to the
isReceivingPacket() read already in that path.

getIrqFlags() returns the RAW chip register (SX126x bits, not RadioLib's
generic RADIOLIB_IRQ_* indices), so the mask comes from a new virtual
irqDoneMask() that only the chip-specific wrapper can fill in.

PIN_DIAG answers "which end?" without a multimeter:

  - boot-time pull-up/pull-down sweep of every header pin, placed BEFORE
    radio_init() because that halt()s when the radio does not answer -- so it
    is the only diagnostic that still runs with the module unplugged, which is
    also the only state where D1's result means anything (attached, the SX1262
    drives DIO1 low and a healthy board reads 0 too). The internal pull is the
    ohmmeter. It cannot see a lifted pad -- the resistor is on the die -- hence
    the optional PIN_DIAG_LOOP_A/B jumper loopback, which drives from outside
    and reads while pulling AGAINST the driver.

  - `dio1` has the radio assert DIO1 via a 1-byte transmit and compares the
    IRQ status register against the actual pin level. Where they disagree is
    where the break is.

All of it is behind #ifdef; a build without the flags is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 21:32:58 +02:00
tthandClaude Opus 5 cca22dd45d feat(repeater): channel bot in the analyzer build -- listens and answers without repeating
The #tth-test bot needed a host process (slidge) plus a dedicated serial
companion node. Putting it in the firmware removes both: the observer node
answers by itself, and the serial console stays free for the CoreScope feed.

Not a port of the Solo bot. That one lives in examples/companion_radio on a
branch 610 commits diverged from ours, and it can only be configured from an
on-device BotScreen -- a XIAO has no display or buttons, so it would compile
and never arm. What made a local implementation cheap is that mesh::Mesh
already exposes everything:

  * Mesh::onRecvPacket() calls searchChannelsByHash() + onGroupDataRecv() and
    THEN routeRecvPacket() (Mesh.cpp:236-249), so reading a channel is
    independent of forwarding it. Both hooks are no-op virtuals, which is the
    only reason a repeater is normally deaf to channel traffic.
  * allowPacketForward() gates only RECEIVED packets, so a node with
    `repeat off` can still originate a reply. That is the point here: the
    observer sits metres from another repeater and must never forward, but it
    does have to answer.
  * createGroupDatagram() is in mesh::Mesh and sendFloodScoped() is a plain
    alias for sendFlood(), so none of the chat/contact machinery is needed.

Written against the mesh::Mesh API only, so it drops into
examples/simple_room_server unchanged if we ever want it there.

Commands are the ones only an analyzer can answer: !path (per-hop hashes at
the packet's own hash width, not a hardcoded 1 byte -- one node here runs 3),
!snr from the frame that carried the request, !heard from the registry.

Two guards, because this node's replies are its only transmissions:
anti-loop compares the sender prefix against _prefs.node_name (the runtime
name, so it holds even when stored prefs override the build-time one), and a
cooldown caps the reply rate. Both are needed: the cooldown alone would only
slow a ping-pong down, not stop it.

The channel key comes in as hex via -D BOT_CHANNEL_PSK, which is the form
`meshcore-cli get_channel <n>` prints -- no base64 round trip and no
base64.hpp dependency in this build. Hash derivation matches
BaseChatMesh::addChannel(); cross-checked against a live node, whose
128-bit key hashes to the same channel_hash the node reports.

All of it compiles out without BOT_CHANNEL_PSK. Costs 2.4 KB flash and 48 B
RAM over the plain analyzer build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 18:30:47 +02:00
tthandClaude Opus 5 3c27e7745f feat(repeater): dfu [uf2|serial|ota] — deterministic reboot into the bootloader
The 1200-baud touch was the wrong mechanism, not an unreliable one. The
Adafruit bootloader chooses its mode from GPREGRET at boot, and the core
already exposes exactly that (cores/nRF5/wiring.c):

  enterUf2Dfu()    0x57  DFU_MAGIC_UF2_RESET          -> mass-storage drive
  enterSerialDfu() 0x4e  DFU_MAGIC_SERIAL_ONLY_RESET  -> CDC only, no drive
  enterOTADfu()    0xA8  DFU_MAGIC_OTA_RESET          -> BLE DFU

The touch only ever requests the *serial* one. That is why no UF2 drive ever
appeared however long we waited for it, and it is the real reason today's
flashes kept going sideways -- I read "coin flip" into what was simply a
request for a different mode, and then wedged two boards proving it.

`dfu` writes the magic and resets, so the board lands in the mode you asked
for, every time. The reply goes out first and the reset happens ~700 ms later
from loop(), since reset_mcu() never returns and over BLE the notification
still has to be pumped out of the TX ring.

LOCAL ONLY (sender_timestamp == 0, the same physical-presence test CommonCLI
uses for `erase` and `set freq`). Over the mesh this would park a node in a
bootloader that waits forever, on a mast, with no way back but a visit.

Builds clean; NOT yet exercised on hardware -- the boards that could test it
are the ones still running firmware without the command.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 12:53:20 +02:00
tthandClaude Opus 5 59e974854f feat(repeater): blink on|off, txpwr with RadioLib's verdict; UF2 flash helper
blink: a fixed burst is a race against walking to the bench -- 30 blinks
(~7 s) was not enough to find the board in time. `blink on` now runs until
`blink off`, with a 10-minute backstop so a node left blinking does not
quietly eat a battery. Cap on the counted form raised to 999.

txpwr: `set tx` cannot tell you whether the radio took the value. It clamps
to -9..30, saves the pref and replies "OK", but SX1262 accepts only -9..+22
and rejects the rest WITHOUT touching the PA -- so `get tx` can report a
power the radio never had. An earlier sweep here measured +2 dBm and -9 dBm
as RSSI -44.1 and -44.0 at a witness and concluded runtime tx power "does
not work"; that conclusion rested on an instrument that could not
distinguish a refused request from a link that does not care.
RadioLibWrapper::setTxPower keeps the status now (the signature stays void,
it implements an upstream callback), and `txpwr [dBm]` reports it. It
deliberately does not write the pref, so a sweep cannot leave a node booting
at some experimental power.

xiao_uf2_flash.sh: the 1200-baud touch is roughly a coin flip on this build.
Today it worked twice, then wedged x4, then wedged x1 -- and a wedged board
is gone from USB *and* BLE, does not recover on its own (waited 400 s) and
needs a physical replug. Not a "too soon after boot" effect: x1 had been up
23 minutes. Double-tap RESET into UF2 is reliable and takes seconds, so this
makes that the easy path. It refuses to act when several UF2 drives are
present rather than guessing, since they are all labelled XIAO-SENSE.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 12:45:28 +02:00
tthandClaude Opus 5 29d620e1a6 feat(repeater): blink [n] — ask a board to identify itself
A bench of identical XIAOs cannot be told apart. The USB serial number
needs a data cable, and boards sharing power rails have none; the BLE MAC
is printed nowhere; and ADVERT_NAME is only as trustworthy as the last
flash, which is usually the thing being checked. Today two boards in the
same breadboard were both advertising "bench-board" -- one of them the
board with the burned DIO1, still happily running BLE.

`blink 10` flashes an LED ten times (default 6, clamped 1..30), and works
from serial, the BLE console and the mesh admin CLI, so it also reaches a
node that is already mounted somewhere.

Deliberately not the status LED. On XIAO that is LED_BLUE, which Bluefruit
drives as its connection indicator -- every BLE node blinks blue the same
way, which is why the LED was useless for identification in the first
place. Preference order LED_GREEN (XIAO, free) -> LED_WHITE (SenseCap, only
ever touched at boot and powerOff) -> LED_BUILTIN, which is last because on
SenseCap it is pin 12, the LoRa TX indicator. Variants may define a colour
they do not physically have by pointing it at PINS_COUNT (SenseCap does
that with LED_RED), so the chain range-checks rather than trusting #ifdef.

Driven from loop(), not inline: a blocking burst would stall the mesh for
up to ~7 s at the cap and disturb the very LoRa timing this fleet measures.
Always finishes dark. Goes through LED_STATE_ON, which is 0 on XIAO and 1
on SenseCap -- hard-coding HIGH would leave half the fleet unlit.

Verified on bench-board over the USB console: "blink 10" ->
"OK - blinking 10 times", and the build stamps v1.16.0-ttha12965f+.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 12:20:28 +02:00
tthandClaude Opus 5 5333a71927 fix(tools/ble_dfu): require the target address; feat: ble_cli.py; feat: silent-by-default repeater
ble_dfu find(): with want_dfu it accepted ANY device whose name contained "DFU"
and then took the first one the scan returned. With more than one board in
bootloader at the same time that reaches for someone else's hardware. It just
did: target CE:72:…:02, connected FE:11:…:C4. Caught only because the log was
being read by hand -- a few seconds later START_DFU would have overwritten a
different node. The address is now mandatory (MAC or MAC+1, covering both the
SCAP_DFU-on-MAC+1 and AdaDFU-on-same-MAC bootloaders), and foreign boards in
bootloader are listed as explicitly ignored.

ble_cli.py: the BLE console had no tool, so every ad-hoc script re-implemented
it and re-learned the same trap: a NUS write carries ATT_MTU-3 bytes and BlueZ
will not split it, so at the usual MTU 23 anything over 20 bytes fails with
"Failed to initiate write" -- which reads like a dropped link, not "command too
long". Commands up to 18 chars work, longer ones fail, deterministically.
Chunking is now in one place, with retries and the pairing/single-console
caveats documented.

simple_repeater: ADVERT_INTERVAL_DEFAULT / FLOOD_ADVERT_INTERVAL_DEFAULT /
DISABLE_FWD_DEFAULT, so a node can be built to ship silent. ENABLE_ADVERT_ON_BOOT
alone is not enough -- it only suppresses the boot advert, the periodic timer
still fires, so an `erase`d node is on the air within two minutes. Found the
hard way: a node flashed before this change and then erased spent ~44 s
transmitting on the live CZ frequency from a desk.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 21:46:23 +02:00
tthandClaude Opus 5 bfdaf32d30 feat(mesh): default to 2-byte path hashes (PATH_HASH_MODE_DEFAULT)
Upstream never initialises _prefs.path_hash_mode, so a fresh node came up at
mode 0 = 1 byte per hop. Nobody on the CZ mesh runs 1 B any more, which meant
every new install needed a manual `set path.hash.mode 1`. Default it to 1 at
compile time in both the repeater and the companion; the pref still overrides
it, so existing nodes are unaffected.

NOTE this is the PATH hash, not PATH_HASH_SIZE. It is used as
sendFlood(..., path_hash_mode + 1), i.e. the bytes each hop appends to the path
while flooding, and the size travels in the packet -- Packet.h:85 packs it into
the top two bits of path_len and Mesh.cpp:93 matches with getPathHashSize() --
so mixed-mode nodes still route for each other. PATH_HASH_SIZE (1) is a
different field, the destination and channel hash in Mesh.cpp:458/548, and
changing THAT would break the wire format against every other node in the mesh.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 19:12:15 +02:00
tthandClaude Fable 5 6e076a6e8d fix(mesh/tx): requeue failed transmits with backoff instead of dropping
A TX that fails to start (startTransmit error) or never completes
(send-complete IRQ lost) was released permanently — with an nRF52
SoftDevice servicing BLE connection events this silently ate ~40 % of
DIRECT-route forwards (measured A/B on mast-three: direct_rx +5 / direct_tx
+3 with an idle BLE connection, 5/5 with BLE off). Flood redundancy
masked the same loss for flood traffic.

Retry up to MESH_TX_RETRIES (3) with a short growing backoff; a
duplicate on air is harmless (hasSeen dedup). New tallies
tx_start_fail/tx_timeout in stats-packets + ERR_EVENT_TX_* flags make
this failure class visible at last.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 13:43:34 +02:00
tthandClaude Fable 5 c5fb0fb4ce feat(repeater/analyzer): pktfeed ring + pktlog cmd — raw frames for the community observer feed
Small sibling ring to rxlog (PKTFEED_SIZE=32, ~8.6 KB) that keeps the FULL
raw frame bytes: staged pre-parse in logRxRaw, committed post-parse in logRx
(radio garbage never enters). Paged `pktlog [cursor]` mirrors rxlog paging;
the bridge derives route/type/payload and the MeshCore SHA packet hash
(analyzer correlation key) from raw, so the radio hot path stays SHA-free.
No 'always emit >=1' here: a ~550 B record line would overflow the 150 B
mesh-CLI budget — there the reply degrades to a bare trailer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 20:50:25 +02:00
tthandClaude Fable 5 91f827cede feat(repeater/analyzer): big console pages + physics-sized tables (rxlog 512, heard 128)
The BLE bridge drain was throttled by three multiplied costs: 150 B pages
(~3 rxlog records), 20 B NUS notification chunks, and the bridge waiting for
line silence per page. This fixes the firmware half:

- handleCommand() takes an explicit reply_max (default 150). The local console
  (USB/BLE) passes ~1000 B -> ~20 rxlog records / ~7 nodes lines per round
  trip; the mesh admin CLI keeps 150 so its reply still fits one LoRa packet.
  Explicit parameter on purpose: a forged sender_timestamp==0 from the mesh
  path must never be able to grow the reply past its 166 B buffer.
- bleWriteAll() chunks by negotiated MTU (247 -> 244 B) instead of fixed 20 B.
- Tables sized from channel physics instead of last week's traffic:
  RXLOG_SIZE 512 = ~2 min of a saturated SF8/62.5k channel (~2-4 frames/s),
  MAX_HEARD_NODES 128 > distinct nodes heard per neighbour advert period
  (48 filled in <2 h and churned out real 0-hop neighbours).
- Page-sort scratch arrays moved off the loop-task stack into BSS.

RAM 17.7% -> 25.3% (59.6 KB / 235 KB). Flashed via BLE DFU 2026-07-15.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 11:53:48 +02:00
tthandClaude Opus 4.8 ef6628afed fix(repeater/analyzer): colon-delimit path hops so hash width is self-describing
The path field emitted raw hex, but the hop-hash width (1/2/3 B, top 2 bits of
path_len) wasn't visible in it -- the bridge couldn't tell "A31FC2" from three
1-byte hops vs one-and-a-half 2-byte hops. Emit hops colon-separated instead
("A3:1F:C2" vs "A31F:C204"): each token is one hop, its width is len/2. Field
order/count is unchanged (path stays the same column), so the bridge only
changes how it splits that one token. Shared helper analyzer_path_hex() used by
both nodes and rxlog. (`HEX` had to be a local name other than the Arduino
Print.h `HEX` macro.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 19:16:48 +02:00
tthandClaude Opus 4.8 dd2642dc0e feat(repeater/analyzer): multi-path join key + prefer direct 0-hop path
Two related improvements to how heard nodes are represented:

1. Multi-path. A node's advert reaches us via several paths at once, but the
   mesh dedups by payload hash (path not hashed) so onAdvertRecv sees only the
   first copy -> `nodes` kept one path. rxlog, however, is fed pre-dedup and
   logs every copy with its own path+SNR. Add the advert's FNV id (`pkt_hash`)
   to each `nodes` row as a JOIN KEY: the bridge groups rxlog by pkt_hash and
   joins to nodes to reconstruct every route a named node arrived by. New
   `nodes` field: N,...,<age>,<pkthash>,<path>,<name> (name now after 10th comma).

2. Prefer direct. onAdvertRecv often processes a relayed copy first (stronger),
   so the direct 0-hop link was being overwritten by a relayed path -- the
   direct neighbours only showed up via the old `neighbors` path. Track
   `direct_heard`; keep the direct (empty) path + its SNR for
   HEARD_DIRECT_TTL_SECS after last hearing the node 0-hop.

Shared FNV helper (analyzer_frame_id) now used by both captureRx and
putHeardNode so nodes.pkt_hash == the rxlog copies' pkt_hash exactly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 18:47:44 +02:00
tthandClaude Opus 4.8 55166d4773 perf(repeater): drop duplicate per-packet SHA-256 from rxlog capture
captureRx() ran calculatePacketHash() (SHA-256) on every received frame in
the logRx hot path. The mesh core already computes that SHA once per frame
in hasSeen() during routing, so the analyzer was doubling the crypto load
on the radio-shared main loop for no benefit.

Replace pkt_hash with a cheap FNV-1a over (type||payload): same purpose
(dedup / correlation across nodes running this FW), a fraction of the CPU.
RAM-only, no flash writes, still main-loop (not ISR) -- so this does not by
itself explain BLE link drops (those match the known SoftDevice/LoRa
coexistence instability the BLE watchdog already guards), but it removes
the one real RX-path cost the analyzer added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 01:05:16 +02:00
tthandClaude Opus 4.8 44aa778e97 feat(repeater): passive mesh analyzer -- nodes + rxlog over the console
Two RAM-only, opt-in tables fed from the normal RX path and pulled out
over the text console (serial / BLE) for a BLE bridge + map to consume.
Both are compiled out unless the build sets a non-zero size; enabled on
SenseCap_Solar_repeater_ble (-D MAX_HEARD_NODES=48 -D RXLOG_SIZE=96,
~6 KB RAM).

  nodes [offset]  -- registry of heard REPEATERS and ROOM SERVERS (chat
    clients are deliberately skipped: personal/mobile devices, privacy).
    Per node: pubkey prefix, name, type, lat/lon, last SNR/RSSI, seconds
    since heard, and the path the advert arrived by. Fed from onAdvertRecv
    (adverts are signature-verified upstream). -> map dots + topology
    edges + link quality.

  rxlog [cursor]  -- circular firehose of EVERY parsed frame heard, fed
    from logRx() (synchronous, so SNR/RSSI belong to that frame). Per
    record: monotonic seq (paging cursor), time, packet hash, header
    (route|type), SNR/RSSI, hop path. -> live traffic / analyzer view.

Both replies are paged to stay within the ~160 B console reply cap and
carry a trailer (next cursor + totals) so the bridge can drain and detect
if it fell behind the ring. Reachable over serial, the PIN-paired BLE
console and the admin mesh CLI, same as `neighbors`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 00:19:32 +02:00
tthandClaude Opus 4.8 cba8164693 feat: expose repeater text console over BLE + nRF52 SoftDevice fixes
Repeater can be queried over BLE Nordic-UART (advert/neighbours/stats) without USB. Fix SoftDevice-protected TEMP peripheral access (sd_temp_get) that crashed BLE repeater telemetry, add USB-connected detection to ArduinoSerialInterface, and adjust the nRF52 ldscript/extra FS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:21:11 +02:00
Scott Powell a4c1981e6a * default now 8, per the will of the peoples. 2026-06-06 21:00:58 +10:00
Scott Powell d66597c3e7 * new CLI config: flood.max.advert (default 16) 2026-06-06 13:09:24 +10:00
Scott Powell 3a707fad43 * simplified the new flood.max.unscoped pref 2026-06-02 14:15:33 +10:00
ripplebiz fb517b2164 Merge pull request #2661 from mrzarquon/mrz/flood_max_unscoped
Implement flood.max.unscoped to allow selective repeating of unscoped messages
2026-06-02 14:00:33 +10:00
Chris Barker a7bb4bef76 Feat: Adds flood.max.unscoped setting
Before this commit, there was no way to set a different max hop count
for unscoped messages.

Now with this change, by defaul it tracks the flood.max setting, until
a user provides a flood.max.unscoped value, which tax precidence for
packets if ROUTE_TYPE_FLOOD is true.
2026-06-01 21:30:17 +01:00
Scott Powell ac507c2b3e * Bug fix: adding neighbor when path_mode != 0 2026-06-01 23:08:39 +10:00
Rastislav Vysoky 3e0b9da426 Update repeater flood advert interval to 47 hours 2026-05-21 14:50:58 +02:00
Scott Powell 8903b907d1 * Refactor: removed duplicated radio_rng_seed(), radio_set_params(), radio_set_tx_power() 2026-05-01 14:47:07 +10:00
Scott Powell 2b33c0d19a * bug fix 2026-04-17 14:38:03 +10:00
Scott Powell 1e6eeb0d80 * Repeater, room server: rule change for sendFloodReply() 2026-04-16 13:22:39 +10:00
Scott Powell 03fca12415 * repeater: refactored 'region' CLI commands -> CommonCLI
* room server: added RegionMap, and new CommonCLI wiring, default_scope handling
* sensor: only minimal RegionMap wiring. Still needs work to handle default-scope
2026-04-15 13:32:49 +10:00
Scott Powell fb128a771d * repeater: default-scope support 2026-04-14 17:51:34 +10:00
João Brázio 569bdeb083 Merge branch 'dev' into 2026/remote-lna 2026-03-16 09:40:10 +00:00
João Brázio 4bd027c79b Merge remote-tracking branch 'upstream/dev' into 2026/remote-lna 2026-03-16 09:37:55 +00:00
Scott Powell 76a116b39a * Repeater and Room Server: flood advert timer now uses the path_hash_mode pref 2026-03-16 13:56:19 +11:00
ripplebiz 71e1e63dfd Merge pull request #1297 from ViezeVingertjes/feature/duty-cycle-token-bucket
Implement token bucket duty cycle enforcement
2026-03-08 23:54:32 +11:00
ripplebiz 1391fda85b Merge pull request #1877 from DanielNovak/fix-countbefore-sentinel-regression
Fix countBefore regression: replace sentinel with getOutboundTotal()
2026-03-07 18:48:02 +11:00
João Brázio ed78c50eee Add setRxBoostedGain method declaration and implementation for SX1262/SX1268 2026-03-05 18:48:40 +00:00
João Brázio 2e52efb209 Remove unused RX boosted gain mode functions and related preprocessor directives across multiple variants 2026-03-05 18:38:57 +00:00
João Brázio e8b758532c Rename sx126x_rx_boosted_gain to rx_boosted_gain 2026-03-05 18:14:47 +00:00
João Brázio a5dc732fb0 Merge remote-tracking branch 'upstream/dev' into 2026/remote-lna 2026-03-05 17:21:38 +00:00
Scott Powell afbd45b26e * LOOP_DETECT_MODERATE bug fix 2026-03-05 17:38:51 +11:00
Scott Powell f4d1bfea18 * repeater: new "get/set loop.detect {off | minimal | moderate | strict }" 2026-03-05 16:26:09 +11:00
Daniel Novak 3c4d10f55c Replace 0xFFFFFFFF sentinel with explicit getOutboundTotal()
Instead of overloading getOutboundCount() with a magic sentinel value,
add a dedicated getOutboundTotal() method to the PacketManager interface
that returns the total queue size without time filtering.

This eliminates the fragile convention that caused the regression and
makes the two operations — time-filtered count vs total count —
explicitly separate in the API.
2026-02-28 17:19:04 +01:00
João Brázio 75508ac10b Merge branch 'dev' into 2026/remote-lna 2026-02-27 10:32:14 +00:00
Scott Powell 9f1f1bcf47 * CommonCLI: added "get/set path.hash.mode " 2026-02-23 14:25:19 +11:00
Scott Powell 62320b64c5 * refactor of Contact/Client out_path_len (stored in files), from signed to unsigned byte (+2 squashed commits)
Squashed commits:
[f326e25] * misc
[fa5152e] * new 'path mode' parsing in Dispatcher
2026-02-21 19:35:51 +11:00
Liam Cottle 5747181336 Merge pull request #1718 from realtag-github/repeater-v1.13-implement-discover
discover sends a single repeater discovery request and populates the neighbor list; self is excluded
2026-02-17 23:53:28 +13:00
Scott Powell e0384e5dd8 * repeater: slight increase to default direct.txdelay 2026-02-17 20:10:13 +11:00
3DPGG 53e92916d9 Fix LilyGo_TLora_V2_1_1_6_terminal_chat build
This change addresses two issues. The first is that the
LilyGo_TLora_V2_1_1_6_terminal_chat build would try to compile
simple_repeater/MyMesh.cpp. All other examples of terminal chat
targets are instead building simple_secure_chat/main.cpp . This
change would align this build to the rest of the builds.

The second issue, found during the course of investigating the
first, stems from simple_repeater/MyMesh.cpp using the
MAX_NEIGHBOURS #define to control whether the neighbor list is kept.
Repeaters that keep this list must define this value, and if the
value is not defined, then all neighbor-related functionality is
compiled out. However, the code that replies to
REQ_TYPE_GET_NEIGHBOURS did not properly check for this #define,
and thus any target that compiles simple_repeater/MyMesh.cpp
without defining MAX_NEIGHBOURS would get an undefined variable
compilation error.

As a practical matter though, there are no targets that compile
simple_repeater/MyMesh.cpp AND do not define MAX_NEIGHBOURS,
except this build due to the first issue. As a result, the
second issue is addressed only as a matter of completeness. The
expected behavior with this change is that such a repeater would
send a valid reply indicating zero known neighbors.
2026-02-16 18:10:29 -08:00
realtag f3462587bc Allow repeater discovery even if repeater mode is disabled on the requesting repeater. 2026-02-17 01:39:04 +00:00
realtag 3cb907f6c8 Increased the timeout timer to 60 seconds, up from 30 seconds. 2026-02-17 01:22:17 +00:00
realtag bdae8823b5 discover.neighbors sends a tagged repeater discovery request and only accepts matching repeater responses 2026-02-17 01:04:14 +00:00