Files
roro9stack/lib/lora/src/packet_view.h
T
twislaandClaude Opus 5.5 2fce79aebd M3 step 4: the LoRa Scanner App, Sniffer and Captures
The Sniffer lists packets newest first (time, RSSI, SNR, and for
Meshtastic the sender, receiver and hops), with the clear header and a
hex dump on Enter (Q96); `p` picks an EU868 preset, kept in Settings
(Q95). `c` starts a Capture: pcap with LoRaTap in /captures/lora, its own
Clean-up category, recorded by a small Service so it carries on with the
App closed (Q97, Q100). The Status Bar shows L while listening, bright on
each packet, and CAP while capturing (Q101). StorageService gains raw
appends for binary files. Debug Builds get `lora inject` to test all of
this with no transmitter in range: a Capture made on the device reads
back in TShark field for field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
2026-10-05 20:14:58 +02:00

30 lines
963 B
C++

#pragma once
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>
namespace roro::lora {
// What the LoRa Scanner shows of one packet (M3, Q96).
struct PacketSummary {
const uint8_t* data;
size_t len;
float rssi, snr;
bool crcOk;
bool meshtastic; // received on Meshtastic settings (sync word 0x2B): read its clear header
};
// One list row, at most about 36 characters: "21:45:07 -97 6.2 5678>all 1/3". Nodes by their default
// short name (the last 4 hex digits); headerLines() has the full numbers.
std::string row(const PacketSummary& p, const std::string& time);
// Eight bytes a line, with the printable ones: "0000 ff ff ff ff 78 56 34 12 ....xV4.".
std::vector<std::string> hexDump(const uint8_t* data, size_t len);
// The Meshtastic header, one field a line; empty when the packet is too short to have one.
std::vector<std::string> headerLines(const uint8_t* data, size_t len);
} // namespace roro::lora