Skip to content

feat(capture): log undecodable RF frames to stray_frames table#80

Open
iceice400 wants to merge 1 commit into
KMX415:mainfrom
iceice400:feat/stray-frame-logger
Open

feat(capture): log undecodable RF frames to stray_frames table#80
iceice400 wants to merge 1 commit into
KMX415:mainfrom
iceice400:feat/stray-frame-logger

Conversation

@iceice400
Copy link
Copy Markdown
Contributor

Summary

  • Log undecodable LoRa frames (both Meshtastic and MeshCore decode fail) to a new stray_frames SQLite table — RF metadata only, no relay or re-encode
  • GET /api/stray_frames with time/RSSI filters and ?format=csv export
  • Dashboard Unknown RF sidebar tab with filters and CSV download
  • Background prune via stray_frames.max_retained / retention_hours in the existing cleanup loop

Why

Operators need visibility into on-band traffic that is not Meshtastic or MeshCore without changing the receive/relay pipeline. Stray logging is insert-only on decode failure and does not transmit.

Type

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

Testing

  • python -m unittest tests.test_stray_frame_repository -v (6 tests, pass)
  • Tested on hardware
  • Dashboard tested on device

Test plan

  1. Inject or capture a non-Meshtastic LoRa burst on the tuned channel; confirm a row appears in Unknown RF
  2. Apply min-RSSI filter; confirm table updates
  3. Export CSV downloads filtered rows
  4. Set stray_frames.enabled: false; confirm no new rows after restart
  5. Confirm normal Meshtastic/MeshCore packets still decode and relay unchanged

Relay / TX impact

Does not change TX or relay behaviour. Stray path runs only when PacketRouter.decode() returns None; meshcore_usb adapt failures are excluded.

Config

stray_frames:
  enabled: true
  max_retained: 10000
  retention_hours: 168

Documented in docs/CONFIGURATION.md.

AI-assisted?

Implemented with AI assistance; unit tests run locally.

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.

1 participant