Added information for debugging mesh connects#45
Conversation
Bundled additions on top of the relay_node tracking work in PR KMX415#45: - tests/test_relay_node_header.py: locks the Meshtastic header byte 15 read into Packet.relay_node. Covers the static parser in isolation (extracts nonzero byte, treats zero as direct, full-byte-range round-trip, no bleed from byte 14) and the full decode() path (Packet.relay_node populated, defaults to 0, included in to_dict() for the WebSocket payload). - tests/test_database_migration.py: adds TestRelayNodeMigration with four cases for the packets.relay_node ALTER TABLE migration: fresh-install schema already includes the column, pre-PR-45 databases get it added on next connect(), the migration is idempotent across restarts (no duplicate column, no data loss), and rows that predated the column read back with relay_node=0 by default. Module docstring updated to cover both migrations. - frontend/css/dashboard.css: .relay-hop now uses var(--accent-amber) instead of var(--accent-yellow, #f0c040). The dashboard does not define an --accent-yellow token, so the hex fallback would have fired everywhere; --accent-amber (#f59e0b) is the canonical token already used by the position packet type, mid-band RSSI, and other amber accents on the page. - src/transmit/tx_service.py: renamed NODEINFO_HOP_LIMIT to DEFAULT_HOP_LIMIT and used it in both fallback expressions, so the text-message fallback no longer relies on a bare literal 3 while the NodeInfo fallback uses a named constant. The constant has no importers outside this file. Behavior unchanged (still 3). All 280 tests pass. ruff clean. No edge-runtime behavior changes.
|
Really useful change. Pushed a few additions to your branch:
Take a look when you have a minute. Happy to revert any of it if you'd rather take it in a different direction. Want to leave room for you to keep iterating on the relay debugging idea you mentioned. Multi-Meshpoint correlation is on our roadmap too, so this lays useful groundwork. |
|
Did you mean to close this? |
|
Nope. I need to learn Git |
|
All good, shit happens. |
|
FYI — your two commits from this branch (the Sorry about the close — totally understand the force-push mishap. The work is good and it's shipping. Will hardware-validate on the test RAK before bumping |
Bundled additions on top of the relay_node tracking work in PR KMX415#45: - tests/test_relay_node_header.py: locks the Meshtastic header byte 15 read into Packet.relay_node. Covers the static parser in isolation (extracts nonzero byte, treats zero as direct, full-byte-range round-trip, no bleed from byte 14) and the full decode() path (Packet.relay_node populated, defaults to 0, included in to_dict() for the WebSocket payload). - tests/test_database_migration.py: adds TestRelayNodeMigration with four cases for the packets.relay_node ALTER TABLE migration: fresh-install schema already includes the column, pre-PR-45 databases get it added on next connect(), the migration is idempotent across restarts (no duplicate column, no data loss), and rows that predated the column read back with relay_node=0 by default. Module docstring updated to cover both migrations. - frontend/css/dashboard.css: .relay-hop now uses var(--accent-amber) instead of var(--accent-yellow, #f0c040). The dashboard does not define an --accent-yellow token, so the hex fallback would have fired everywhere; --accent-amber (#f59e0b) is the canonical token already used by the position packet type, mid-band RSSI, and other amber accents on the page. - src/transmit/tx_service.py: renamed NODEINFO_HOP_LIMIT to DEFAULT_HOP_LIMIT and used it in both fallback expressions, so the text-message fallback no longer relies on a bare literal 3 while the NodeInfo fallback uses a named constant. The constant has no importers outside this file. Behavior unchanged (still 3). All 280 tests pass. ruff clean. No edge-runtime behavior changes.
Summary
This was a first step towards exploring how to use the packet list on the dashboard to debug networking issues. In my case, it helped me find that the ERP from my rooftop node was crap. Exposed the ID byte from the retransmitting node. Added the capability to draw a line between nodes when focus shifted to its line in the packet list.
Why
Relayed packets arrive with no visibility into which node retransmitted them. Without that, diagnosing hop-chain issues — weak relay nodes, misconfigured ERP, unexpected relay paths — requires external tools. Surfacing the relay node inline in the packet list makes it possible to spot these issues directly from the dashboard.
Ultimately, I'd like to see the capability to analyze the meshpoint logged data, maybe from multiple meshpoints, to find networking issues (can't get there from here kind of things). I want to find out what other traceroute information I can log. For now, it was sufficient to see the packet source (me) and who retransmitted it.
Pushing this just to get the discussion going and something to build from.
Type
Testing
How tested?
Used it to figure out my hardware issue keeping Meshpoint packets from reaching the local net (was my rooftop node).
Hardware:
Impact
Adds relay_node (header byte 15) to the packet model, database, and WebSocket feed. Existing rows default to 0. No changes to decode logic, relay policy, or TX path.
AI-assisted?
Claude Code — root-caused the relay behavior, identified the header byte, and implemented the full stack change (decoder → model → DB migration → frontend display + map interaction).