HACKRF_SWEEP(1)

πŸ“¦
version 2026.01.3 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– HACKRF_SWEEP πŸ’–

okay bestie, so this is a page from the User Commands manual, and it's all about hackrf_sweep β€” the little icon that controls the frequency sweep of your HackRF. yes, the sweeping. the girlies love a good sweep. let's get into it 🧹✨


🌸 DESCRIPTION 🌸

so hackrf_sweep is used like this, and I'm putting it in a code block so nothing gets lost, because every single one of these matters:

[-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

[-P estimate|measure|patient|exhaustive] # FFTW plan type,
default is 'measure'

[-1] # one shot mode

[-N num_sweeps] # Number of sweeps to perform

[-B] # binary output

[-I] # binary inverse FFT output

[-n] # keep the same timestamp within a sweep

-r filename # output file

let me break those down one by one, because a girl does not gatekeep 🫢

  • -h β€” this help. it's giving "help me help you". ask and you shall receive πŸ’…
  • -d serial_number β€” Serial number of desired HackRF. got multiple HackRFs? pick your fave by serial, no cap πŸŽ€
  • -a amp_enable β€” RX RF amplifier, 1=Enable, 0=Disable. on or off, binary queen πŸ‘‘
  • -f freq_min:freq_max β€” minimum and maximum frequencies in MHz. the range, the whole vibe, your sweep's lil window 🌈
  • -p antenna_enable β€” Antenna port power, 1=Enable, 0=Disable. feeding power to the antenna port, periodt ⚑
  • -l gain_db β€” RX LNA (IF) gain, 0-40dB, 8dB steps. gain goes up in chunky lil eight-dB steps πŸ”₯
  • -g gain_db β€” RX VGA (baseband) gain, 0-62dB, 2dB steps. this one's finer, two-dB steps, so precise bestie πŸ’œ
  • -w bin_width β€” FFT bin width (frequency resolution) in Hz. how finely you're slicing the spectrum, literally the resolution of the whole thing πŸ¦‹
  • -P estimate|measure|patient|exhaustive β€” FFTW plan type, and the default is measure. four flavours, one plan, choose your fighter ✨
  • -1 β€” one shot mode. one and done, main character energy, no repeats πŸ’€
  • -N num_sweeps β€” Number of sweeps to perform. tell it how many laps to run πŸƒβ€β™€οΈ
  • -B β€” binary output. not for the faint of heart, it's giving raw bytes πŸ–€
  • -I β€” binary inverse FFT output. same energy, but inverse, iykyk πŸ”„
  • -n β€” keep the same timestamp within a sweep. one sweep, one timestamp, consistency slay ⏰
  • -r filename β€” output file. write it down, save it, secure the bag πŸ’Ύ

πŸ“Š Output fields:

when it spits out data, the fields go like this, in this exact order:

date, time, hz_low, hz_high, hz_bin_width, num_samples, dB, dB, . . .

so: date, then time, then hz_low, hz_high, hz_bin_width, num_samples, and then a whole parade of dB values trailing off into the sunset like dB, dB, . . . β€” yes, as many as it takes 🌸


πŸ¦‹ SEE ALSO πŸ¦‹

The primary source of documentation is the wiki on github:

https://github.com/mossmann/hackrf/wiki

bestie, that's the real one β€” go read the wiki, it's the primary source, I'm just here for the vibes πŸ’–

and that's the whole page, mwah πŸ’‹

signing off: hackrf_sweep, July 2021, and yeah it's HACKRF_SWEEP(1) all the way down. go sweep something iconic, you got this πŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from