A trace to a companion turns at its last relay
A companion, a room server, or a sensor does not relay a trace with the firmware defaults (allowPacketForward in Mesh.cpp: client repeat is off, and allowed only on 433.000, 869.495, and 918.000 MHz; disable_fwd is on). A walk that turned at one of them never came home: the history held 36 companion traces and no reply from a real one. The route to such a node is the same. Only the walk changes: it turns at the last relay of the route, and the node is not in the spec. The route out of a walk that comes home is still the full route to the node, so the Device route row can offer it for DMs and admin. - relays_traces() in models states the rule. render_forced_spec takes relays=False, and forced_outbound reads the route back from a walk. - services/trace_plan holds the route choice that the trace screen made inline (radio route, outbound paths, best observed, last trace, direct), so the CLI uses the same one. - The trace screen names the relay where the walk turns, in a line under the route. With no relay to turn at, Trace is dim. A neighbour that does not relay gets "no relays" offered on the Device route row, with the packets heard directly as its proof. - The trace session turns a caller's spec (node page, Message paths) at the last relay, so the callers do not need the rule. A sender that is not a contact gets its type from its stored adverts. - The composer and Explore paths turn the walk at the last hop. - `meshterm trace -t NAME` with no --path walks the menu's route and says on stderr where it turns. With no known relay, it is a usage error. - The connection turns a device-routed trace at the last learned relay. The simulator now stops a walk at a node that does not relay, as the mesh does, and the tests that walked through Alice walk repeaters. The picker keeps one list with no mark, sorted as before (JP's choice). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fe8a70d516
commit
d3166170ff
18 files changed
+1118
-229
No files matched your search
+41
-21
@@ -156,8 +156,9 @@ samples:
|
||||
matching width, they match.
|
||||
- **A `trace` that the device routes invents its hop names.** If you give
|
||||
`trace --target NAME` with no `--path`, the simulator router returns placeholder hops.
|
||||
A forced path (`--path "a1,d4"`) resolves correctly. The samples use the forced form.
|
||||
Use the forced form also to build a golden file.
|
||||
A forced path (`--path "a1,b2,a1"`) resolves correctly. The samples use the forced
|
||||
form. Use the forced form also to build a golden file. As on the real mesh, a forced
|
||||
path through a simulated companion or room server never comes home.
|
||||
|
||||
> **`--mock` records into its own history, not yours, but it still writes the caches.**
|
||||
> The simulator is a fake radio. It is not a fake MeshTerm. MeshTerm stores what the
|
||||
@@ -230,8 +231,8 @@ would be a behaviour that nobody can find.
|
||||
different. These are two lines from the facts block of a trace:
|
||||
|
||||
```
|
||||
path a1,d4
|
||||
route MockCompanion (00) → Yagi-Repeater (a1) → Alice (d4) → MockCompanion (00)
|
||||
path a1,b2
|
||||
route MockCompanion (00) → Yagi-Repeater (a1) → Local-Repeater (b2) → MockCompanion (00)
|
||||
```
|
||||
|
||||
A **path** is a spec. It is the list of hops that you write and force. It is the one line
|
||||
@@ -1547,19 +1548,20 @@ Walk the path to a target one time and report what came back.
|
||||
without a target is [`trace-path`](#meshterm-trace-path).
|
||||
|
||||
```console
|
||||
$ meshterm trace --target Alice --path "a1,d4"
|
||||
target Alice
|
||||
path a1,d4
|
||||
$ meshterm trace --target Local-Repeater --path "a1,b2,a1"
|
||||
target Local-Repeater
|
||||
path a1,b2,a1
|
||||
success yes
|
||||
hops 3
|
||||
hops 4
|
||||
min_snr_db +2.0
|
||||
rtt_ms 123
|
||||
route MockCompanion (00) → Yagi-Repeater (a1) → Alice (d4) → MockCompanion (00)
|
||||
rtt_ms 458
|
||||
route MockCompanion (00) → Yagi-Repeater (a1) → Local-Repeater (b2) → Yagi-Repeater (a1) → MockCompanion (00)
|
||||
|
||||
HOP FROM TO SNR_DB
|
||||
0 00 a1 +6.0
|
||||
1 a1 d4 +2.0
|
||||
2 d4 00 +6.0
|
||||
1 a1 b2 +2.0
|
||||
2 b2 a1 +2.4
|
||||
3 a1 00 +6.0
|
||||
```
|
||||
|
||||
The output has two blocks. The first block shows what the walk did. It has the drawn
|
||||
@@ -1572,6 +1574,24 @@ and the hash joins the two blocks.
|
||||
A trace that never came home is **not** a failure of the command. The radio transmitted,
|
||||
and the walk ran. The command reports `success no` and returns `5`.
|
||||
|
||||
A companion, a room server, or a sensor does not relay a trace, so a walk that turns at
|
||||
one of them never comes home. When the target is one of these and you omit `--path`,
|
||||
MeshTerm chooses the route as the menu does. Then the walk turns at the last repeater of
|
||||
that route. A line on stderr names that repeater, and `path` shows the walk:
|
||||
|
||||
```console
|
||||
$ meshterm trace --target Alice
|
||||
Alice can't relay a trace, so the trace turns at Yagi-Repeater (device route)
|
||||
target Alice
|
||||
path a1
|
||||
success yes
|
||||
...
|
||||
```
|
||||
|
||||
The route out of that walk is also the route that the radio can use to send to the
|
||||
target. If MeshTerm knows no repeater on the way to the target, nothing is transmitted,
|
||||
and the command returns `2`.
|
||||
|
||||
#### `meshterm trace-path`
|
||||
|
||||
The other half of tracing. It has no target. You compose a path by hand, out and back, in
|
||||
@@ -1582,19 +1602,19 @@ any way that you choose. The path only has to end where this node can hear it.
|
||||
| `--path SPEC` | **Required.** The whole walk, comma-separated. |
|
||||
|
||||
```console
|
||||
$ meshterm trace-path --path "a1,d4,a1"
|
||||
$ meshterm trace-path --path "a1,b2,a1"
|
||||
target -
|
||||
path a1,d4,a1
|
||||
path a1,b2,a1
|
||||
success yes
|
||||
hops 4
|
||||
min_snr_db +2.0
|
||||
rtt_ms 458
|
||||
route MockCompanion (00) → Yagi-Repeater (a1) → Alice (d4) → Yagi-Repeater (a1) → MockCompanion (00)
|
||||
route MockCompanion (00) → Yagi-Repeater (a1) → Local-Repeater (b2) → Yagi-Repeater (a1) → MockCompanion (00)
|
||||
|
||||
HOP FROM TO SNR_DB
|
||||
0 00 a1 +6.0
|
||||
1 a1 d4 +2.0
|
||||
2 d4 a1 +2.4
|
||||
1 a1 b2 +2.0
|
||||
2 b2 a1 +2.4
|
||||
3 a1 00 +6.0
|
||||
```
|
||||
|
||||
@@ -1618,8 +1638,8 @@ table of hops is under `edges`.
|
||||
| `edges` | array | The `edge` shape, one for each hop, in the order of the walk. `[]` when nothing came home. |
|
||||
|
||||
```console
|
||||
$ meshterm trace-path --path "a1,d4" --json | jq -r '.edges | min_by(.snr_db) | "\(.from.hash) -> \(.to.hash) \(.snr_db) dB"'
|
||||
a1 -> d4 2.0 dB
|
||||
$ meshterm trace-path --path "a1,b2" --json | jq -r '.edges | min_by(.snr_db) | "\(.from.hash) -> \(.to.hash) \(.snr_db) dB"'
|
||||
a1 -> b2 2.0 dB
|
||||
```
|
||||
|
||||
#### `meshterm outbound`
|
||||
@@ -2331,14 +2351,14 @@ fi
|
||||
are about:
|
||||
|
||||
```bash
|
||||
meshterm trace-path --path "a1,d4" --json \
|
||||
meshterm trace-path --path "a1,b2" --json \
|
||||
| jq -r '.edges | min_by(.snr_db) | "\(.from.hash) -> \(.to.hash) \(.snr_db) dB"'
|
||||
```
|
||||
|
||||
**A route as one line**, with our node, as the plain face draws it:
|
||||
|
||||
```bash
|
||||
meshterm trace-path --path "a1,d4,a1" --json \
|
||||
meshterm trace-path --path "a1,b2,a1" --json \
|
||||
| jq -r '.route | map(.name // .hash) | join(" -> ")'
|
||||
```
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ This page lists each interactive screen with its scripted equivalent, where one
|
||||
| --- | --- | --- |
|
||||
| **🌍 Map** | The nodes that have a position, plotted on a real OpenStreetMap street map. The map is drawn as Unicode braille (streets, rivers, and place names). You can pan and zoom. Repeaters are highlighted and drawn on top. When you are offline, the map shows a blank grid. | none (a map is a picture, but `meshterm contacts` lists the same nodes) |
|
||||
| **🌐 Mesh walk** | The observed shape of the mesh, which you walk one node at a time. It is a graph of evidence from trace walks, firmware routes, overheard relay chains, and the neighbour tables of repeaters. It has braille edges that are coloured by SNR, and quality bars. Press Enter to walk to a node. Press ⌫ to go back. Type to find any node. The map shows where the nodes are. The walk shows how the nodes connect. | none |
|
||||
| **🎯 Trace target** | A live trace screen. Select a target, and each trace streams in, hop by hop. The screen shows the running median and the reliability of each hop. You can compose a route through specific repeaters, or force one. A trace transmits **exactly once**, because repeaters can blacklist nodes that send bursts. To get more samples, run the trace again. A trace that came home proves its route out and back. Thus, when the radio uses another route to the target, the Device route row turns green and offers the traced route for direct messages and admin. A route that Explore paths measured with a probe counts too: when you adopt it, the row offers it at once, with no second transmission. | `meshterm trace --target …` |
|
||||
| **🎯 Trace target** | A live trace screen. Select a target, and each trace streams in, hop by hop. The screen shows the running median and the reliability of each hop. You can compose a route through specific repeaters, or force one. A trace transmits **exactly once**, because repeaters can blacklist nodes that send bursts. To get more samples, run the trace again. A trace that came home proves its route out and back. Thus, when the radio uses another route to the target, the Device route row turns green and offers the traced route for direct messages and admin. A route that Explore paths measured with a probe counts too: when you adopt it, the row offers it at once, with no second transmission. A companion, a room server, or a sensor does not relay a trace, so a trace to it turns at the last repeater on its route. A line under the route names that repeater. The route that comes home is still the full route to the node, so the row can offer it. A neighbour with no repeater between you has nothing to trace, and the row offers no relays. | `meshterm trace --target …` |
|
||||
| **👣 Trace path** | The other half of tracing. You compose the whole circuit by hand, out and back, by the way that you choose. Then you walk it. The path composer suggests each next hop from the links that MeshTerm observed, strongest first. If you have the admin password of a repeater, the composer can also get the neighbour table of that repeater over the mesh. | `meshterm trace-path --path …` |
|
||||
| **🧭 Outbound paths** | The ways out of your node that you trust, in your order. A radio link is not the same in the two directions: a repeater that your node hears well can hear your node badly, and most of what MeshTerm knows comes from what your node hears. Thus you name the way out, one or more hops long. Each site where you take the computer (Home, Work) has its own list, and one site is active. A companion that never moves can keep its own list. The trace features then start their suggested routes on your paths. Each path shows how well its first hop hears you (`out`) and how well you hear it (`in`). Measure sends one trace out along a path and back. When your radio hears the way out of another site, the menu asks if you want to use that site. | `meshterm outbound …` |
|
||||
| **🧭 Device route** | The route that your radio holds for each contact, on the Routes tab of the node page. The radio keeps one route for each contact and replaces it with each new one that it learns, good or bad. A route that stopped to work loses each message on it, with no error. Here you see the route and how the radio got it. You can set it (your suggested route comes first), forget it so that the next message floods, or keep it: MeshTerm then writes it back each time that the radio replaces it. A kept route belongs to the site where you are. When you change site, MeshTerm saves the routes that the radio learned at the old site, and writes them back when you return. Discover routes sends one request and shows the route in each direction. When a direct message or an admin login gets no answer on a route, its retry can go by flood. | `meshterm route …` |
|
||||
|
||||
Reference in new issue
Block a user