Commit Graph
3020 Commits
Author SHA1 Message Date
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 7c071d1515 fix(companion): bound the build-date copy; fit the version stamp in the frame
Two halves of the same problem: the stamped version reached the device but
not the client.

RESP_CODE_DEVICE_INFO carries the build date in 12 bytes and the version in
20, NUL included -- 11 and 19 usable characters. The version field is
written with strzcpy() and truncates safely; the build date was a bare
strcpy() into a memset region, so a longer string simply ran past the end
into the manufacturer-name field. It never showed because strzcpy()
overwrote that field on the very next line. Benign today, and driven by a
compile-time constant rather than anything remote, but it is an unbounded
copy into a fixed frame slot and the only reason it was invisible is luck
about the write order. Now strzcpy(..., 12) like every other string there.

The stamp then had to fit. "v1.16.0-tth-0dbaba04" is 20 chars, so the node
reported "v1.16.0-tth-0dbaba0" -- readable, but a character short of the SHA
it was built from. "04 Aug 2026 11:28" is 17, so the time was cut clean off.
Now a 7-char SHA with a "-tth" marker (19 with the dirty '+', 18 without)
and a yymmdd hhmm date (11). The budget never sacrifices the base version or
the dirty marker -- a lost '+' would make an uncommitted build look
reproducible -- and warns instead of truncating silently if it ever cannot
fit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 11:43:53 +02:00
tthandClaude Opus 5 0dbaba046c build(version): derive the base version from the upstream tag, not a literal
build_version.py replaced one hardcoded version with another: it stamped
"v1.16.0-tth-<sha>" with v1.16.0 written into the script. The SHA made the
build identifiable, but the base would have kept claiming v1.16.0 for as
long as nobody remembered to edit this file -- the same stale-by-
construction string the script exists to eliminate.

Now taken from the newest upstream release tag HEAD descends from
(`git describe`, upstream tags them per-example as companion-v1.16.0 /
repeater-v1.16.0, so match any *v[0-9]* and strip the prefix). Our own
release tags carry '+tth.<timestamp>' and are excluded so they cannot
shadow the upstream base.

Also documents the wiring in the header, because the failure mode is
silence: an env that forgets the script builds fine and ships a node that
lies about its own version.

Verified stamping on all nine envs we flash -- T1000E_cmp_cz, the four
XIAO test nodes plus oldble, and the three SenseCap repeaters.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 11:28:24 +02:00
tthandClaude Opus 5 4759954c58 build: move build_version.py to tools/, so any env can stamp its version
The script has nothing SenseCap-specific in it -- it reads the git SHA and
the clock -- but it sat under variants/sensecap_solar/ and only that
variant referenced it. Everything else silently shipped the hardcoded
literals from examples/*/MyMesh.h ("v1.16.0", "6 Jun 2026"), identical in
every build.

That cost real time tonight. After a 14-minute BLE DFU onto the T1000-E
tracker, every field the node reports back -- ver, fw_build, model,
max_contacts -- was byte-for-byte what it had said before the flash, so
`ver` could not distinguish the new image from the old one. The only
evidence the image had actually landed was the bootloader's own IMAGE ok /
VALIDATE ok. That is sound evidence, but it lives in a log that scrolls
away, not on the device you can query a month later.

Verified after the move: SenseCap_Solar_repeater_ble, SenseCap_ples_rpt and
T1000E_cmp_cz all stamp v1.16.0-tth-<sha> and a build timestamp.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 10:59:48 +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
tth 8c3d7b076d Merge remote-tracking branch 'origin/main' into feat/ble-diag-and-2b-path-hash 2026-08-03 20:07:53 +02:00
tthandClaude Opus 5 ee7eab747a chore: gitignore tools/__pycache__, editor-added comment in extensions.json
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 19:12:21 +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 Opus 5 85be4a76a6 feat(repeater/ble): runtime conn TX power (blepwr) + negotiated params (bleconn)
Two diagnostic levers for the BLE/LoRa coexistence work, plus a correction to
what the existing tx power call actually does.

Bluefruit.setTxPower(8) is ADVERTISING power only. Bluefruit stores the value
and BLEAdvertising::start() hands it to sd_ble_gap_tx_power_set() with
BLE_GAP_TX_POWER_ROLE_ADV; nothing in the library ever sets the CONN role, so an
established link runs at the SoftDevice default of 0 dBm. The +8 buys discovery
range and nothing else. Confirmed on hardware: `blepwr` reports
"conn tx: 0 dBm, adv tx: 8 dBm".

- RPT_BLE_CONN_TX_POWER (default 0 = unchanged behaviour), applied per
  connection on every 'secured' since the handle is new each time.
- `blepwr [dBm]` sets it at runtime over serial, the BLE console or the mesh
  admin CLI. Runtime rather than a build flag because a dose-response sweep
  needs many points and reflashing the XIAO costs a physical UF2 dance.
- Auto-revert after 5 min (`blepwr <p> hold` opts out). Without it the command
  locks you out of the console you would need to undo it: the value is
  re-applied on every 'secured', at -20 dBm the node's replies stop arriving and
  at -40 dBm a connection cannot be established at all. Hit this on the bench;
  recovery was over USB, and on the mast the only way back would be `reboot`
  over the mesh admin CLI.
- `bleconn` reports the connection parameters actually in force. bleOnSecured()
  only REQUESTS 15-30/60-80 ms and the central may refuse, so without reading
  them back "the pre-fix interval showed no loss either" cannot be told apart
  from "the pre-fix interval was never in force". Latched once a second from
  loop() so it can be read over USB after the central is gone -- reading it over
  the BLE console while connected would collide on the shared command[160].

Measured with these: at a verified 22.50 ms interval, sweeping the connection
tx power from 0 to -20 dBm (RSSI -67..-87 at the central, covering the whole
-75..-90 window the mast sits in) produced zero lost DIRECT forwards, with
tx_timeout and tx_start_fail at zero in every cell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 19:12:04 +02:00
Liam Cottle fec0521099 Merge pull request #3047 from dg1tal/codex/docs-3044-group-privacy
Clarify hashtag privacy and group sender identity
2026-07-28 15:41:48 +12:00
DG1TAL ae3517f480 Clarify hashtag privacy and group sender identity 2026-07-27 20:07:08 +02:00
tthandClaude Fable 5 c4f3941897 perf(repeater/ble): non-blocking console TX pump — main loop never stalls on BLE
bleWriteAll used to spin-retry with delay(3) when the SoftDevice
notification queue was full, stalling loop() up to ~0.9 s per call
while a client streamed the console (rxlog/pktlog drains). That is
long enough to disturb LoRa RX/TX timing on the relay path.

Replace with a 4 KB ring buffer: bleWriteAll only enqueues, and
bleTxPump() (each loop pass) hands the SoftDevice as much as it will
take right now — zero waiting. Overflow truncates the newest bytes;
a torn page loses its 'E,' trailer so the bridge re-requests the
same cursor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 21:24:20 +02:00
tthandClaude Fable 5 b7af3924b0 fix(repeater/ble): widen conn interval 15-30 -> 60-80 ms; pktfeed ring 32 -> 64
Fewer SoftDevice connection events = fewer LoRa TX collisions (the
measured driver of the direct-forward loss); the Dispatcher TX retry
covers the residue. Bigger pktfeed ring buys margin for the bridge's
new connect->drain->disconnect duty cycle (~3-4 min between drains).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 13:43:34 +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
Liam Cottle 4fd6f50a16 Merge pull request #1865 from MeshEnvy/fix/python-json-parse-error
fix: JSON parsing regression in build.sh
2026-07-19 22:58:21 +12: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 Fable 5 ce907bbe4a feat(repeater/analyzer): grow rxlog ring 96 -> 256 records
Daytime advert bursts (an advert plus its copies from surrounding repeaters
arrive within seconds) overflowed the 96-slot ring between BLE bridge drains --
~250 dropped records/h in meshcore_rxlog_dropped_total, zero at night. 256
records at ~32 B each costs +5 KB RAM (17.7% total on nRF52840). Paired with
bridge-side tuning (drain page cap 20 -> 60, poll 5 s -> 2 s in home-scripts).

Flashed to mast-three.example via BLE DFU 2026-07-14.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 18:30:24 +02:00
ripplebiz a187f63fc5 Merge pull request #2943 from meshcore-dev/revert-2915-main
Revert "Add StreamSensor allocation for GroupData"
2026-07-13 19:31:05 +10:00
ripplebiz 95f3869475 Revert "Add StreamSensor allocation for GroupData" 2026-07-13 19:30:11 +10:00
ripplebiz 668d5a554a Merge pull request #2915 from hpux735/main
Add StreamSensor allocation for GroupData
2026-07-13 18:42:54 +10: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 d882f6c4bd fix(repeater/ble): slave latency 4 -> 0 to hold sync on the marginal link
btmon shows the disconnects are HCI reason 0x3E (Connection Failed to be
Established / lost sync), not supervision timeout -- so widening the timeout
didn't help. The mast link is weak (RSSI -75..-90) and the node is busy with
LoRa; with slave latency 4 the peripheral may skip connection events, so the
central loses sync and reports 0x3E. Respond on every event (latency 0) to
maximise sync on a weak/busy link.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 02:29:18 +02:00
tthandClaude Opus 4.8 ccf4802132 fix(repeater/ble): raise BLE supervision timeout 6s -> 16s
6 s cut the reconnect churn from every 15-30 s to every ~60 s but didn't
eliminate it: under the bridge's real polling load the node shows a
periodic multi-second stall (advert TX airtime / SoftDevice-LoRa
coexistence) that occasionally exceeds 6 s. Widen the supervision timeout
to 16 s so those stalls are tolerated; a genuine freeze is still caught by
the 20 s hardware watchdog (16 s < 20 s).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 02:00:33 +02:00
tthandClaude Opus 4.8 5fbb3e0a6c fix(repeater/ble): widen connection supervision timeout to stop link churn
The BLE console link dropped every ~15-30 s and the bridge kept
reconnecting. Root cause: Bluefruit's default supervision timeout is only
2 s, and this repeater relays heavy LoRa flood traffic, so main-loop /
radio coexistence stalls past 2 s and the central tears down the link.

Mirror the companion's proven approach (explicit sd_ble_gap_conn_param_update
on 'secured', since some centrals ignore the advertised PPCP) but widen the
supervision timeout to 6 s (a repeater is far busier than a client), with a
15-30 ms interval and slave latency 4. PPCP is also set before advertising.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 01:15:29 +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 5c092498ff feat(core): capture per-packet RSSI at RX (Packet::_rssi)
SNR was already stored on the Packet at parse time, but RSSI was only
transiently available via Radio::getLastRSSI() -- valid synchronously in
checkRecv(), but stale by the time a score-delayed flood packet reaches
its handler (onAdvertRecv etc.). Store RSSI alongside _snr so downstream
code (e.g. the mesh analyzer) gets the correct last-hop RSSI regardless
of when it reads it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 00:19:20 +02:00
tthandClaude Opus 4.8 952b677a01 fix(sensor read): full node telemetry + per-channel decode
sensor read only called querySensors(), so it missed the node's own battery voltage and built-in MCU temperature (added separately in the mesh-telemetry path) — hence only one temperature showed. Now mirror that assembly (addVoltage + querySensors + MCU addTemperature). Decode keys every field by its LPP channel (temperature.1 = MCU, temperature.2 = ambient, etc.) so same-type values no longer collide, and skip unknown LPP types by their known size instead of break-ing (which silently dropped everything after e.g. INA226 power).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 20:09:35 +02:00
tthandClaude Opus 4.8 ae80337a8f config: git-ignored BLE PIN secret + SenseCap SHT41/INA226 + nRF52 framework symlink
Add [secrets] ble_pin mechanism: envs use ${secrets.ble_pin}, the committed default is a non-secret placeholder, and the real PIN lives only in the git-ignored platformio.local.ini. Move INA226 to 0x40 (frees 0x44 for SHT41), skip flaky GPS detection on SenseCap, and use a local framework symlink for the nRF52 short-SHA fork.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:21:11 +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
tthandClaude Opus 4.8 40c166fa7f feat: dual BLE/USB serial interface + dock-quiet BLE
Backport of PR #1779 (BLE companion usable over USB while BLE disconnected), plus: track the active transport (secure-transport gating), and stop BLE advertising while a USB host is connected (docked) so the node stays quiet on 2.4 GHz; resume advertising when undocked. An active BLE link is never force-disconnected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:21:11 +02:00
tthandClaude Opus 4.8 a5fd4b7488 harden: gate key-export/PIN over unauthenticated USB companion
Add virtual BaseSerialInterface::isConnectionSecure() (default true). On the dual interface it is true only for MITM-paired BLE. Gate CMD_EXPORT_PRIVATE_KEY and CMD_SET_DEVICE_PIN, and hide the BLE PIN in CMD_DEVICE_QUERY, when the frame arrived over unauthenticated USB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:21:11 +02:00
tthandClaude Opus 4.8 acf1b627a2 CLI: bound command copies + add 'sensor read' telemetry command
Replace three unbounded strcpy() into the fixed tmp[] buffer with StrHelper::strncpy(sizeof). Add 'sensor read' which decodes the live CayenneLPP telemetry (temperature/humidity/voltage/current/pressure/gps) to text, so a console/bridge can pull sensor values that 'sensor list' (settings only) never exposed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:21:11 +02:00
tthandClaude Opus 4.8 ab2eb70714 harden: bounds-check radio TRACE/PATH packet parsing
onRecvPacket() used two received length fields without validating them against the actual received/decrypted length (TRACE payload_len underflow + OOB read; PATH path_len OOB stack read + extra_len underflow). Both now validated before use.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:21:11 +02:00
Will Dillon b457f22a0a Update number_allocations.md
Adds a small allocation for groupdata packets for the Meshcore firmware for the StreamSensor product.  It was previously a LoRaWAN platform, and we've moved to Meshcore.
2026-07-09 11:43:20 -07:00
Liam Cottle 7b56667054 Merge pull request #2903 from liamcottle/ci/build-matrix
Refactor builds via GitHub Actions to be super fast
2026-07-07 14:31:28 +12:00
liamcottle fd5d0453aa implement matrix builds for faster firmware releases 2026-07-07 13:23:18 +12:00
liamcottle 15e509f074 update qr code docs 2026-07-06 02:04:56 +12:00
Liam Cottle c283a6e183 Merge pull request #2753 from formtapez/cli-docs
Added some missing CLI commands
2026-06-13 00:17:36 +12:00
formtapez 5ae8c26772 fix formatting 2026-06-12 12:14:46 +02:00
formtapez b21b12ec7f added some missing CLI commands 2026-06-12 12:11:12 +02:00
Liam Cottle 787e0bc49d Merge pull request #2748 from liamcottle/github/stale-bot
Configure GitHub Stale Bot
2026-06-12 03:24:26 +12:00
liamcottle f0899dc2b0 use single quotes for repo name 2026-06-12 03:20:44 +12:00
liamcottle a7e9248587 add github workflow to close stale issues 2026-06-12 03:18:10 +12:00
Liam Cottle 7e284ab709 Merge pull request #2691 from NoodlesNZ/security-policy
Add Github Security policy
2026-06-11 19:25:53 +12:00
Scott Powell f7f8a331cd Merge branch 'dev'
# Conflicts:
#	docs/faq.md
companion-v1.16.0 repeater-v1.16.0 room-server-v1.16.0
2026-06-06 21:12:43 +10:00
Scott Powell f4d0485dd6 * version 1.16.0 2026-06-06 21:09:38 +10:00