Substation command line
Every command substation answers to in this release, as its own help describes it.
substation [-h] [--config CONFIG] [--band BAND] [--device-type DEVICE_TYPE] [--device-index DEVICE_INDEX] [--list-bands] [--init] [--iq-file IQ_FILE] [--center-freq CENTER_FREQ] [--start-time START_TIME] [--log-level {DEBUG,INFO,WARNING,ERROR}]
An SDR band scanner that detects, demodulates, and records radio transmissions.
Examples:
substation --init # Write a starter config.yaml here
substation --band amateur_2m # Scan the 2m amateur band with RTL-SDR
substation --band marine_vhf_calling --device-type hackrf # Scan marine VHF with HackRF
substation --list-bands # List all available bands
substation --band pmr --iq-file rec.wav --center-freq 446059313 # File playback
Exit status:
0 The scan ended: an IQ recording played to its end, or Ctrl+C stopped
it. --init and --list-bands exit 0 when they succeed.
1 A scan stopped because of an error, such as a receiver that fails or
is unplugged, so a service manager can restart it. Also when Substation
cannot start: --band is missing or names no band, an option it needs is
missing or malformed, the configuration or the IQ recording cannot be
read, or --init finds a config.yaml already there.
2 The command line was not understood: an unknown option, or a value of
the wrong kind.
Options
--config / -c(text): Your configuration file, merged over the shipped defaults (default: config.yaml in the current directory, if there is one)--band / -b(text): The band to scan, by the name --list-bands shows. Required unless --init or --list-bands is given.--device-type / -t(text, default'rtlsdr'): The receiver: rtlsdr, hackrf, airspy for an Airspy R2, airspyhf for an Airspy HF+ Discovery, or soapy:<driver> for any other SoapySDR device (default: rtlsdr). Other spellings work too, in any letter case: rtl and rtl-sdr, hackrf-one and hackrfone, airspy-r2 and airspyr2, and airspy-hf and airspyhf+.--device-index / -i(integer, default0): Which receiver of that type to use, counting from 0, when more than one is plugged in (default: 0)--list-bands(flag): List the available bands, with each band's reception class and whether it records, and exit. A band too wide for its receiver to capture at its configured rate is marked as one that cannot be scanned: narrow it, or split it into several bands, in your own configuration.--init(flag): Create a starter config.yaml (a copy of the documented defaults) in the current directory and exit. Refuses to overwrite an existing file.--iq-file(text): Play back an IQ recording in place of a receiver: a WAV file whose two audio channels hold I and Q as 16-bit PCM, at any number of IQ samples per second, which is read from the file. RF64 and WAVE_FORMAT_EXTENSIBLE files work, and so do files over 4 GB whose header sizes have overflowed. The file is read as fast as it can be processed, not in real time, and each recording takes its time from --start-time. A band wider than the file can hold is refused.--center-freq(float): The frequency, in Hz, the receiver was tuned to when it made the IQ recording. Required with --iq-file. It need not be the band's centre.--start-time(text): When the IQ recording began, as "YYYY-MM-DD HH:MM:SS": the time and filename of each recording count from it (default: 2000-01-01 00:00:00)--log-level(upper, default'INFO', one ofDEBUG,INFO,WARNING,ERROR): How much to log: DEBUG, INFO, WARNING, or ERROR (default: INFO). DEBUG adds what each device reports about itself at startup, such as its gain elements, and, when a scan fails, where in Substation it failed.
Other programs
substation-antenna- Calculate antenna lengths for a Substation band or a frequency: a half-wave dipole, a quarter-wave vertical, a 5/8-wave vertical, and a full-wave loop.