diff --git a/CHANGELOG.md b/CHANGELOG.md index 94f43b4..f1be2b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,14 @@ one caveat SemVer makes for a leading zero: while the major version is still `0` 'openhop-core[hardware]'`); a board wired differently from the AIO v1 states its pins in a profile's `spi` table. The bridge is still there for a node that stays on the mesh while MeshTerm is closed. ([#21](https://github.com/jpmartineau/MeshTerm/issues/21)) +- **A repeater's regions, read and edited.** A repeater's node page shows the regions it + relays floods for and whether it relays unscoped floods too, and **Ask which regions it + carries** asks it once (it answers only a neighbour, or over a known route). Repeater + admin gains a **Regions** page: the repeater's region tree, with flood allowed or denied + per region and for unscoped floods, home and default scope, adding and removing regions, + and saving — edits take effect at once and a reboot undoes whatever was not saved. A tree + too big for one reply is said to be cut, and the rest is recovered from the repeater's + own lists. On the command line, `meshterm regions NODE` asks the same question. ### Fixed diff --git a/docs/cli.md b/docs/cli.md index 710f284..3e56c70 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1395,6 +1395,43 @@ node sent multiple lines. It is **not** parsed: MeshTerm does not know the remot CLI grammar, and a document that pretended to would be inventing structure. `reply` is `null` on the exit-`5` no-answer path. +#### `meshterm regions` + +Ask a repeater which regions it relays floods for (firmware 1.12 or newer). + +``` +meshterm regions NODE +``` + +| Argument / option | What it does | +| --- | --- | +| `NODE` | The repeater's contact name. | + +```console +$ meshterm regions Yagi-Repeater +node Yagi-Repeater +unscoped yes +regions lakeside, lakeside-north, harbour +``` + +One anonymous request — no login — and one transmission. A repeater answers it only when it +arrives direct: from a neighbour, or over a route the companion has learned. It also +rate-limits the question, so nothing here retries it. `unscoped` says whether it relays plain +floods too; `regions` lists the regions it relays *scoped* floods for. The answer is +remembered, so the node page and the packet views know it afterwards. + +A repeater that answered and named nothing at all relays no floods, and returns `5`. One that +never answered is a device error (`4`). A name no contact matches, and a contact known to be +something other than a repeater, are usage errors (`2`): nothing was sent. + +**`--json`:** + +```json +{"node":{"name":"Yagi-Repeater","key":"a1b2c3d400000000000000000000000000000000000000000000000000000000","hash":"a1b2c3d4","type":"repeater","self":false},"unscoped":true,"regions":["lakeside","lakeside-north","harbour"]} +``` + +`regions` never holds the wildcard `*` — that is `unscoped`, since it names no region. + --- ### MeshTerm itself