Public Access
Tab in the LoRa Scanner sweeps 863-870 MHz in 100 kHz steps (the strongest of three RSSI readings at each, at 125 kHz), shown as bars with peak hold over a waterfall, the Sniffer's frequency marked (Q98). The Sweep pauses the Sniffer and keeps its packets; Tab resumes it (Q99). Status Bar: SW. The floor, top and peaks are host-tested; `lora sweep on|off|dump` prints them on the console. At the desk: about 607 ms a pass, a flat floor at -100 to -102 dBm (15 dB above the chip's own) and a steady carrier at 863.2 MHz. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
28 lines
836 B
C++
28 lines
836 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
namespace roro::lora {
|
|
|
|
// What a Sweep pass says about the band (M3, Q98): one RSSI reading (dBm) per step.
|
|
struct SweepPeak {
|
|
uint32_t hz;
|
|
int dbm;
|
|
};
|
|
struct SweepStats {
|
|
int floor = 0; // the median: the band's noise floor, whatever a few signals do
|
|
int top = 0; // the strongest reading
|
|
std::vector<SweepPeak> peaks; // at most 3, strongest first, each a local maximum >= 10 dB above the floor
|
|
};
|
|
|
|
SweepStats summarize(const int8_t* dbm, size_t steps, uint32_t fromHz, uint32_t stepHz);
|
|
|
|
// The waterfall's colours: a reading between `low` and `high` dBm as 0..255, then RGB565 along
|
|
// black, blue, cyan, green, yellow, red.
|
|
uint8_t heatLevel(int dbm, int low, int high);
|
|
uint16_t heatColor(uint8_t level);
|
|
|
|
} // namespace roro::lora
|