Skip to content

Added information for debugging mesh connects#45

Closed
kendelmccarley wants to merge 0 commit into
KMX415:mainfrom
kendelmccarley:main
Closed

Added information for debugging mesh connects#45
kendelmccarley wants to merge 0 commit into
KMX415:mainfrom
kendelmccarley:main

Conversation

@kendelmccarley
Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • Feature
  • Docs
  • Refactor
  • UI
  • Installer
  • Region support
  • Hardware change

Testing

How tested?

Used it to figure out my hardware issue keeping Meshpoint packets from reaching the local net (was my rooftop node).

Hardware:

  • Pi: Raspberry Pi 4
  • Concentrator: RAK2287
  • Node/radio: MediumFast slot 18
  • Region: US
  • OS: Raspberry Pi OS (kernel 6.12.75+rpt-rpi-v8)

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).

KMX415 added a commit to kendelmccarley/meshpoint_mod that referenced this pull request May 4, 2026
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.
@KMX415
Copy link
Copy Markdown
Owner

KMX415 commented May 4, 2026

Really useful change. Pushed a few additions to your branch:

  • Two test files locking in the header byte 15 read + DB migration idempotency, similar to what we did on PR Add frequency slot lookup to Radio Config and channel delete to Channels #38.
  • Swapped the new relay-hop CSS to --accent-amber (we don't have a yellow token; that fallback hex would have surfaced on every Meshpoint).
  • Standardized the hop_limit fallback so both call sites use the same constant.

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.

@KMX415
Copy link
Copy Markdown
Owner

KMX415 commented May 4, 2026

Did you mean to close this?

@kendelmccarley
Copy link
Copy Markdown
Contributor Author

Nope. I need to learn Git

@KMX415
Copy link
Copy Markdown
Owner

KMX415 commented May 4, 2026

All good, shit happens.

@KMX415
Copy link
Copy Markdown
Owner

KMX415 commented May 5, 2026

FYI — your two commits from this branch (the relay_node tracking + the hop_limit fix) have been cherry-picked into a release-prep branch and reopened as #46, bundled with one CRC fix that benefits from going out at the same time. Authored-by attribution + your Co-Authored-By: Claude Sonnet 4.6 trailers are preserved on both commits, and your GitHub profile links correctly in the contributors graph.

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 __version__.

KMX415 added a commit that referenced this pull request May 5, 2026
Bundles PR #45 (relay_node tracking, originally from kendelmccarley) with the CRC_BAD packet-drop fix. Closes #34. Hardware-validated on RAK V2 .141 before the version bump landed.
iceice400 pushed a commit to iceice400/meshpoint that referenced this pull request May 6, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants