Recognise trunking control channels, and refuse to sit on them
A trunked system keeps one frequency transmitting a data stream around the clock so its radios know where each conversation has been put. There is no speech on it and it never stops, which makes it the strongest and most useless signal in the band: the scanner parked on 856.561 MHz for the full record limit, saved four minutes of buzzing, and found it again on the next sweep. Five signatures, matched against a constant-envelope stream that never pauses: 3600 baud two-level (Motorola SMARTNET/SmartZone), 9600 (EDACS), 1200 (MPT-1327), 4800 four-level (P25 or DMR Tier III), 2400 (NXDN). The first two are believed at once -- nothing else sends at those rates without pausing. The rest share their shape with a digital voice call on the same system, so they wait for the carrier to run unbroken past --control-seconds, longer than a conversation goes without a breath. Being in a trunked allocation raises confidence but is never required; trunking is licensed on business pairs all over the spectrum. One is named on screen, abandoned within a second or so, and its capture deleted. --keep-control records them for a decoder; --lockout-control writes them into the lock-out list. Three things had to be fixed to get there. The simulator's "pseudo-random" symbols were a counter: multiplying the symbol index by an odd constant and taking it modulo the level count returns the low bits, so two-level FSK came out 0,1,0,1. Every FSK test in the suite was measuring a tone. Its FSK is now shaped the way GFSK and C4FM shape a stream, too, square-edged keying being a signal no licensed transmitter would radiate. The symbol-rate estimator locked onto harmonics -- 3600 baud read as 18000 -- because a transition impulse train is a comb of equal lines; it now walks down to the fundamental. The squared envelope is no longer a candidate: it is not a transition signal, and its DC lobe made every random OOK signal measure ninety baud. The search starts at 200 Hz rather than 40, below which it was reading drift, which is how a bare carrier was awarded a symbol rate. And a clean two-level signal counted zero discriminator levels, because its modes land in the first and last histogram bin, where find_peaks cannot see them. Separately: locking out a frequency wrote to the settings file even under --no-config, which has no settings file by definition. It now writes only where it read from, and --simulate never writes at all -- an invented frequency would sit in a real config for ever, skipping whatever genuine signal happened to land near it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
parent
ba6c925351
commit
4a272eb1d5
14 changed files with 984 additions and 53 deletions
|
|
@ -325,6 +325,13 @@ def cmd_scan(args) -> int:
|
|||
"hardware.[/grey62]")
|
||||
return 1
|
||||
|
||||
if args.simulate and cfg.save_lockouts:
|
||||
# The demo band is invented. A lock-out taken from it would sit in
|
||||
# the real settings file for ever, skipping whatever genuine signal
|
||||
# happened to land near a made-up frequency. Locking out still works
|
||||
# for the run in hand; it is only the writing back that is refused.
|
||||
cfg.save_lockouts = False
|
||||
|
||||
scanner = Scanner(cfg, device=device, callbacks=ScannerCallbacks())
|
||||
try:
|
||||
scanner.prepare()
|
||||
|
|
@ -435,6 +442,11 @@ def _print_summary(scanner: Scanner) -> None:
|
|||
if worker.dropped:
|
||||
bits.append(f"{worker.dropped} skipped, the recogniser fell behind")
|
||||
console.print(f"[grey62] {', '.join(bits)}[/grey62]")
|
||||
if st.control_channels:
|
||||
console.print(f"[yellow] {len(st.control_channels)} trunking control "
|
||||
f"channel(s) skipped:[/yellow]")
|
||||
for hz, name in sorted(st.control_channels.items()):
|
||||
console.print(f"[grey62] {fmt_hz(hz):>14} {name}[/grey62]")
|
||||
if st.rejected_by_category:
|
||||
drops = ", ".join(f"{n} {cat}"
|
||||
for cat, n in sorted(st.rejected_by_category.items(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue