Reads a MeshCore repeater's console over BLE or USB and publishes what it hears: the `pktlog` raw-frame feed in the meshcoretomqtt format (community analyzer with a JWT signed by the node's key, audience = broker hostname, or an own broker without auth) and optionally stats, `nodes`, `rxlog` to a local MQTT broker. Needs the observer build of meshcore-tth. Tested on a XIAO with the observer build over USB and over BLE: feed in the meshcoretomqtt format, packet hashes matching those of other observers. Unit tests for the parsers, the packet transform, the Ed25519 signature (checked against `cryptography`), the JWT and paho-mqtt 1.x/2.x; README (Czech), AGENTS.md, CI, Renovate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
0da25dd15b
10 files changed
+1868
No files matched your search
@@ -0,0 +1,25 @@
|
||||
# Instructions for an AI agent setting this up
|
||||
|
||||
meshcore-repeater-observer reads a MeshCore repeater's console and publishes
|
||||
what the repeater hears. README.md is the reference; these are the rules.
|
||||
|
||||
1. **Read only, with two exceptions the user must approve:** the observer
|
||||
itself sets the node's clock (`time <epoch>`) and, for the community feed,
|
||||
reads its private key (`get prv.key`) into memory. Never send other CLI
|
||||
commands to the repeater (`set …`, `reboot`, `erase`, `advert`) — it is
|
||||
part of a community network.
|
||||
2. The repeater needs the observer build of meshcore-tth. Ask which board and
|
||||
firmware it runs; do not flash anything yourself.
|
||||
3. Prefer USB (`/dev/serial/by-id/…`, never `/dev/ttyACM0`). BLE: the console
|
||||
is off after flashing; the user turns it on (`ble on`) after setting their
|
||||
own PIN. Pairing is interactive (`bluetoothctl pair`) — the user does it.
|
||||
Never `bluetoothctl remove` a paired repeater.
|
||||
4. Community feed only for a node on the Czech preset (869.432 / 62.5 / SF7 /
|
||||
CR5), with `MC_OBS_IATA` set; leave `MC_OBS_AUDIENCE` at its default.
|
||||
5. Passwords and PINs go to the env file (mode 600), never into commands you
|
||||
print, commits or logs. The private key never leaves the process.
|
||||
6. Done = the log shows `observer: připojen k …` and packets are counted;
|
||||
on the community analyzer the node appears under observers within minutes.
|
||||
|
||||
Developing: `python3 -m pytest`, `ruff check`, `ruff format --check`,
|
||||
`mypy meshcore_repeater_observer.py`. `--help` must work without bleak/paho.
|
||||
Reference in new issue
Block a user