SDR Devices

You are here:
< All Topics

Don’t mask or disable the systemd service.

Edit /etc/netplan/01-netcfg.yaml and add optional: true to any devices that may not always be available.

sudo netplan apply


hackrf_sweep -f 80:150 -l 32 -g 32 -w 100000 > sweep-005.csv

plotsweep sweep-004.csv sweep-004.png –power-min -60 –power-max -15.0 –colormap magma

allen@notebook:~$ hackrf_sweep -help
[-h] # this help
[-d serial_number] # Serial number of desired HackRF
[-a amp_enable] # RX RF amplifier 1=Enable, 0=Disable
[-f freq_min:freq_max] # minimum and maximum frequencies in MHz
[-p antenna_enable] # Antenna port power, 1=Enable, 0=Disable
[-l gain_db] # RX LNA (IF) gain, 0-40dB, 8dB steps
[-g gain_db] # RX VGA (baseband) gain, 0-62dB, 2dB steps
[-w bin_width] # FFT bin width (frequency resolution) in Hz, 2445-5000000
[-1] # one shot mode
[-N num_sweeps] # Number of sweeps to perform
[-B] # binary output
[-I] # binary inverse FFT output
-r filename # output file

Output fields:
date, time, hz_low, hz_high, hz_bin_width, num_samples, dB, dB, . . .


rtl_power, a simple FFT logger for RTL2832 based DVB-T receivers

Use: rtl_power -f freq_range [-options] [filename]
-f lower:upper:bin_size [Hz]
(bin size is a maximum, smaller more convenient bins
will be used. valid range 1Hz – 2.8MHz)
[-i integration_interval (default: 10 seconds)]
(buggy if a full sweep takes longer than the interval)
[-1 enables single-shot mode (default: off)]
[-e exit_timer (default: off/0)]
[-d device_index (default: 0)]
[-g tuner_gain (default: automatic)]
[-p ppm_error (default: 0)]
[-T enable bias-T on GPIO PIN 0 (works for v3 dongles)]
filename (a ‘-‘ dumps samples to stdout)
(omitting the filename also uses stdout)

Experimental options:
[-w window (default: rectangle)]
(hamming, blackman, blackman-harris, hann-poisson, bartlett, youssef)
[-c crop_percent (default: 0%, recommended: 20%-50%)]
(discards data at the edges, 100% discards everything)
(has no effect for bins larger than 1MHz)
[-F fir_size (default: disabled)]
(enables low-leakage downsample filter,
fir_size can be 0 or 9. 0 has bad roll off,
try with ‘-c 50%’)
[-P enables peak hold (default: off)]
[-D enable direct sampling (default: off)]
[-O enable offset tuning (default: off)]

CSV FFT output columns:
date, time, Hz low, Hz high, Hz step, samples, dbm, dbm, …

rtl_power -f 88M:108M:125k fm_stations.csv
(creates 160 bins across the FM band,
individual stations should be visible)
rtl_power -f 100M:1G:1M -i 5m -1 survey.csv
(a five minute low res scan of nearly everything)
rtl_power -f … -i 15m -1 log.csv
(integrate for 15 minutes and exit afterwards)
rtl_power -f … -e 1h | gzip > log.csv.gz
(collect data for one hour and compress it on the fly)

Convert CSV to a waterfall graphic with:

Previous RTL2838 device (Realtek RTL2838UHIDIR)
Next Serial Access
Table of Contents