mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-28 22:53:08 +00:00
Add saved node and region discovery response switches
This commit is contained in:
1 parent
1ab4091a05
commit
4fd3358a45
15 files changed
+705
-5
No files matched your search
@@ -150,6 +150,7 @@ should use command `0x42`. See [Companion radio binary protocol](companion_proto
|
||||
| Neighbors | [`neighbors`](cli_commands.md#list-nearby-neighbors) | Role with a neighbor table | Yes | Yes | Yes |
|
||||
| Neighbors | [`neighbor.remove [pubkey_prefix]`](cli_commands.md#remove-a-neighbor) | Role with a mutable neighbor table; omit prefix to clear all | Yes | Yes | Yes |
|
||||
| Neighbors | [`discover.neighbors`](cli_commands.md#discover-zero-hop-neighbors) | Repeater; some MQTT room servers | Yes | Yes | Yes |
|
||||
| Neighbors | [`get/set discovery.node.responses`; `get/set discovery.region.responses`](cli_commands.md#enable-or-disable-discovery-responses) | Repeater only; newer source, not published 1.18.0.1 binaries; saved, default on, no reboot | Yes | Yes | Yes |
|
||||
| Neighbors | [`discover.scopes`](cli_commands.md#discover-neighbor-scopes-mqtt-observer-neighbors-feature) | MQTT observer with compiled neighbor support | No | No | No |
|
||||
| Statistics | [`clear stats`](cli_commands.md#clear-stats) | All full-parser text CLI roles | Yes | Yes | Yes |
|
||||
| Statistics | [`stats-core`](cli_commands.md#stats-core) | Local connection | Local | Local | Local |
|
||||
@@ -325,6 +326,7 @@ should use command `0x42`. See [Companion radio binary protocol](companion_proto
|
||||
| Neighbors | [`neighbors`](cli_commands.md#list-nearby-neighbors) | Role with a neighbor table | Yes | Yes | Yes | Yes | Yes |
|
||||
| Neighbors | [`neighbor.remove [pubkey_prefix]`](cli_commands.md#remove-a-neighbor) | Role with a mutable neighbor table; omit prefix to clear all | Yes | Yes | Yes | Yes | Yes |
|
||||
| Neighbors | [`discover.neighbors`](cli_commands.md#discover-zero-hop-neighbors) | Repeater; some MQTT room servers | Yes | Yes | Yes | Yes | Yes |
|
||||
| Neighbors | [`get/set discovery.node.responses`; `get/set discovery.region.responses`](cli_commands.md#enable-or-disable-discovery-responses) | Repeater only; newer source, not published 1.18.0.1 binaries; saved, default on, no reboot | Yes | Yes | Yes | Yes | Yes |
|
||||
| Neighbors | [`discover.scopes`](cli_commands.md#discover-neighbor-scopes-mqtt-observer-neighbors-feature) | MQTT observer with compiled neighbor support | No | No | No | Feature | No |
|
||||
| Statistics | [`clear stats`](cli_commands.md#clear-stats) | Full parser | Yes | Yes | Yes | Yes | Yes |
|
||||
| Statistics | [`stats-core`](cli_commands.md#stats-core) | Local connection | Local | Local | Local | Local | Local |
|
||||
|
||||
@@ -636,6 +636,44 @@ require MQTT or PSRAM.
|
||||
|
||||
---
|
||||
|
||||
### Enable or disable discovery responses
|
||||
|
||||
**Availability:** Repeater firmware in newer source builds. These switches are
|
||||
not included in the existing published **1.18.0.1** binaries. They do not require
|
||||
MQTT or PSRAM and are not Companion, Room Server, or Sensor settings.
|
||||
|
||||
```text
|
||||
get discovery.node.responses
|
||||
set discovery.node.responses on
|
||||
set discovery.node.responses off
|
||||
get discovery.region.responses
|
||||
set discovery.region.responses on
|
||||
set discovery.region.responses off
|
||||
```
|
||||
|
||||
| Setting | Default | What `off` does |
|
||||
| --- | --- | --- |
|
||||
| `discovery.node.responses` | `on` | Stops replies to normal zero-hop node-discovery requests. |
|
||||
| `discovery.region.responses` | `on` | Stops replies to anonymous region/scope queries, even while adverts remain enabled. |
|
||||
|
||||
The two choices are independent. They apply immediately after a successful
|
||||
save and survive reboot; no reboot is needed. Fresh installations and upgrades
|
||||
without saved choices keep both on, preserving the previous behavior. Use a
|
||||
local console or authenticated administrator CLI to change them.
|
||||
|
||||
Enabling node responses still honors the existing hidden-node rule: when both
|
||||
`advert.interval` and `flood.advert.interval` are `0`, the repeater does not
|
||||
answer normal discovery requests. Enabling a response switch also retains the
|
||||
normal request-validation and rate limits.
|
||||
|
||||
These switches do not stop the node's own adverts, outgoing
|
||||
`discover.neighbors` or `discover.scopes` commands, or automatic
|
||||
[MQTT neighbor discovery](#view-or-change-periodic-neighbors-publishing-mqtt-observer-neighbors-feature).
|
||||
They do not restrict an authorized administrator's `region` CLI commands.
|
||||
Use `set mqtt.neighbors off` to stop the periodic outgoing MQTT discovery pass.
|
||||
|
||||
---
|
||||
|
||||
### Discover neighbor scopes (MQTT observer, neighbors feature)
|
||||
|
||||
Refreshes the zero-hop neighbor table, then queries each neighbor for its region
|
||||
@@ -649,6 +687,10 @@ scopes and publishes the assembled table to the MQTT `neighbors` topic once.
|
||||
Elsewhere it replies `Err - neighbors not enabled in this build`. If a
|
||||
`discover.neighbors` refresh is already in flight, the scope pass is queued behind it.
|
||||
|
||||
This is an outgoing query. A repeater's separate
|
||||
[discovery response switches](#enable-or-disable-discovery-responses) control
|
||||
whether that repeater answers other nodes' requests.
|
||||
|
||||
---
|
||||
|
||||
## Statistics
|
||||
@@ -6399,6 +6441,12 @@ default-off updates keep the existing record size.
|
||||
> While enabled, `get mqtt.status` gains a trailing `nbr: <next>/<last>` field
|
||||
> (time to next publish, and how the last publish went).
|
||||
|
||||
This setting controls this node's outgoing periodic discovery and MQTT
|
||||
publication. It does not control replies to requests from other nodes. Newer
|
||||
repeater source builds have separate
|
||||
[node and region response switches](#enable-or-disable-discovery-responses),
|
||||
both defaulting to on; those switches are not in the published 1.18.0.1 images.
|
||||
|
||||
---
|
||||
|
||||
#### View or change the neighbors publish interval (MQTT observer, neighbors feature)
|
||||
|
||||
Reference in new issue
Block a user