Main controls - voxo22/hackrf-spectrum-analyzer GitHub Wiki

Frequency selector

The Frequency selector consists of a pair of fields Frequency start [MHz] and Frequency stop [MHz]. They show the current start and end of the frequency range. The + and - buttons above and below each digit allow you to set the units, tens, hundreds and thousands sequentially. The minimum lower frequency (start) is 0 MHz and the maximum upper frequency (stop) is 7250 MHz. The minimum range of the frequency spectrum is 1 MHz.

Arrow buttons (<-- -->)

Arrow buttons allow you to conveniently pan through the spectrum. Each key press moves the frequency range backward - forward to set the new previous or next frequency range. 10% overlap preserves partial frequency ranges at the boundaries, so that you do not miss these frequencies. The function of these arrow buttons corresponds to the function of keyboard arrow keys, when spectrum chart is mouse focused.

Ranges field

The Ranges text field allows manual entry of one or more sweep ranges in MHz. Enter a single range as start-stop, for example 920-960.

Multiple ranges can be entered as comma-separated intervals, for example 920-960,1805-1880,2620-2690. In this mode the analyzer uses a compressed spectrum display: unused frequency gaps are skipped, the sweep is faster, and the X axis shows the selected ranges stitched together.

When Frequency Shift is active, the Ranges field uses the shifted display frequency, the same as the frequency selectors and chart labels. HackRF tuning remains internally converted to the correct unshifted hardware frequency.

Frequency presets

Frequency presets is a fully customizable menu of preset frequency ranges with descriptions. The content is loaded from the presets.csv file in the root directory, where the spectrum analyzer executable .jar file is also located. The presets.csv file has the following format (e.g.):

Preset Name; Freq Min; Freq Max; RBW; Freq Shift; Amplitude Offset
AM radio w/ SpyVerter;0;26;10;-120;7
CB radio;26;28;3;0;5
FM radio;88;108;20;0;3
DAB+;174;240;50;0;2
ISM 433;431;435;3;0;12
DVB-T;470;694;200;0;-5
ISM 868;863;870;3;0;12
DECT;1880;1900;10;0;5
Wi-Fi 2.4 / Bluetooth;2400;2483;100;0;-1
SAT TV LNB low;10700;11700;1000;9750;-10

You can set your own preset by simply adding new line between or after other ones. Semicolon is the field delimiter. Specify custom preset name, frequency start, frequency end, resolution bandwidth (see options), frequency shift in case of use up-/down-converter (see options) and amplitude offset (in dBm) to maintain idle amplitude line at desired level, e.g. -100 dBm. If you want to have a compressed spectrum with multiple ranges in preset, use -1 as start frequency and ranges of frequencies separated with comma as stop frequency parameter., e.g. LTE downlink;-1;791-821,1805-1880,2620-2690;50;0;0

Next to presets menu is add preset "+" button. You can create a new preset with custom name just from current sweep settings.

PAUSE/PLAY button

The PAUSE/PLAY button stops/starts the live spectrum scan or replay playback. After pressing Pause, the screen remains frozen with the data from the last scan or replay frame.

TRIGGER button

The TRIGGER button opens the trigger window for detecting signal events. A trigger can monitor a selected frequency range and detect events from realtime spectrum level, detected peaks or total power. Trigger events can be logged and, in replay mode, searched in the currently opened replay file.

See also: Trigger window.

REPLAY button

The REPLAY button opens a recorded HSR, I/Q WAV, raw PCM, or CU8 file for replay and/or completely stops the running replay.

HSR replay restores spectrum and waterfall data captured by the analyzer. HSR files do not contain I/Q samples, so they cannot be used for zoom, demodulation or time-domain I/Q signal analysis.

I/Q WAV, PCM and CU8 replay can be used from any source, not only HackRF recordings. Their filenames must contain the center frequency as the first standalone number. A standalone number starts the name or follows a space, underscore, or hyphen; digits attached to text identifiers, such as g001, are ignored. A number without a suffix is MHz; M, k, MHz, kHz, and Hz are accepted suffixes. Examples: IQ_868.3_test.wav, g001_TCH_868.9M_14_250k.cu8, and radio-433920kHz.wav.

PCM and CU8 filenames must additionally end with the sample rate immediately before the extension. A plain value is Ms/s; suffix k means ks/s. Examples: IQ_868.3_2.4.pcm and capture-868950kHz-1000k.cu8. Raw samples are 8-bit unless 16b occurs in the filename. WAV sample rate and bit depth are read from its mandatory header.

During replay the frequency panel shows the recorded display range, recording date/time and progress. You can click the green replay progress bar to jump to another position in the file, or use PAUSE and STOP on the toolbar.

VIDEO recording button

The VIDEO button starts/stops recording the spectrum analyzer screen to a video file. Since the image data can be very large, it uses compression either to MPEG4 (H.264) format or to GIF animated format. The format, screen resolution, number of frames per second and a specific area of the screen can be adjusted on the Waterfall/REC tab. You can record only spectrum area, or spectrum with waterfall, or the full screen, incl. control panel.

Note: during recording, the screen will be resized or restyled to achieve the optimal conditions. This is normal. After recording, you can resize the screen back to your needs.

The video file is saved into the root dir. Name of the file has the following format:

# <video area> <start_freq>-<stop_freq> MHz <date> <time>.<gif/mp4>

Note: the GIF format is more suitable for small, a few-second recordings, for publishing e.g. on websites. The GIF format preserves the original color of the image, usually automatically plays endlessly and you can publish it as a regular image. However, the file has large size after a few seconds and the spectrum analyzer saves it sequentially to the buffer. Therefore, do not use GIF for several-minute or hour-long recordings, the buffer may overflow and the system may crash.

Warning: even after turning off the recording to GIF, it may take a while before the file is accessible (the buffer must be completely flushed to the file).

STATS logging button

The STATS logging button starts/stops logging PEAK trace summary parameters to a CSV file. You can adjust record interval on the Waterfall/REC tab (once per minute, once per second, once per fraction of second).

The file has following content (e.g. once per second):

Timestamp, Total Spectrum Power [dBm], Power Flux Density [µW/m²], Max Amplitude [dBm], Frequency [MHz]
2025-04-20 11:19:16,-60.1,12.0,-68.3,951.80
2025-04-20 11:19:17,-59.6,14.0,-66.2,951.80
2025-04-20 11:19:18,-59.9,13.0,-67.8,951.80
2025-04-20 11:19:19,-60.0,13.0,-68.2,951.75

Note: Power Flux Density value is based on PEAK trace calculations and Power Calibration (see SWEEP tab). Max Amplitude represents the value for the entire displayed spectrum and refers to the next Frequency parameter. All these data is also displayed continuously on the information panel.

The CSV file is saved into the root dir. Name of the file has the following format:

# STATS <start_freq>-<stop_freq> MHz <date> <time>.csv

The CSV file can then be easily imported into a spreadsheet or other commercial web-based statistical analyzer/plotter.

Note: As all the information is obtained from the PEAK trace, turning off the PEAK trace in control panel also disables STATS recording feature and STATS button disappears.

DATA recording button

The DATA button starts/stops current spectrum data recording into native "HSR" file. HSR can be replayed later with the REPLAY button as it was captured live, including spectrum, waterfall and date/time information.

Note: native HSR format does not contain I/Q samples, so it cannot be used for zooming, time-domain analysis or demodulation. For that purpose, use I/Q recording button in the time-domain I/Q analyzer window.

The HSR file is saved into the root dir. Name of the file has the following format:

# DATA <start_freq>-<stop_freq> MHz <date> <time>.hsr

⚠️ **GitHub.com Fallback** ⚠️