Wireless Attacksgnuradioosmosdrsdrrtl-sdrhackrfbladerfspectrumsignal generator

gr-osmosdr

GNU Radio blocks from the OsmoSDR project providing a common software API for various SDR hardware. Supports devices like RTL-SDR, HackRF, bladeRF, and USRP for spectrum analysis and signal generation.

Description

gr-osmosdr is part of the Osmocom project for open source mobile communications, offering GNU Radio blocks that support a wide range of SDR hardware including FUNcube Dongle, RTL2832U DVB-T dongles, HackRF, bladeRF, Ettus USRP, Airspy, and SoapySDR. It enables applications to interface with different radio hardware through a unified API, independent of the underlying device.

Example applications include osmocom_fft for spectrum browsing, osmocom_siggen for signal generation, and osmocom_spectrum_sense. The package provides C++ headers, documentation, Python3 wrappers, and a shared library for integration into custom GNU Radio applications.

This tool is essential for SDR-based wireless analysis, allowing users to perform tasks like spectrum monitoring, signal visualization, and transmission across supported hardware platforms.

How It Works

gr-osmosdr provides GNU Radio source and sink blocks that abstract hardware-specific drivers into a common API. Device specification uses comma-separated argument=value pairs (e.g., rtl=0 for RTL-SDR device index 0). Supported sources include OsmoSDR, RTL-SDR (with xtal freq, direct sampling), RTL-TCP, UHD (USRP with subdev spec), bladeRF, HackRF, and file input. Buffers, sample rates, gains, and frequencies are configured via args. Applications like osmocom_fft use these blocks for FFT-based spectrum display with options for waterfall, averaging, and oscilloscope views.

Installation

bash
sudo apt install gr-osmosdr

Flags

-h, --helpshow this help message and exit
-a ARGS, --args=ARGSDevice args, [default=]
-A ANTENNA, --antenna=ANTENNASelect RX antenna where appropriate
-s SAMP_RATE, --samp-rate=SAMP_RATESet sample rate (bandwidth), minimum by default
-f FREQ, --center-freq=FREQSet frequency to FREQ
-c FREQ_CORR, --freq-corr=FREQ_CORRSet frequency correction (ppm)
-g GAIN, --gain=GAINSet gain in dB (default is midpoint)
-W, --waterfallEnable waterfall display
-S, --oscilloscopeEnable oscilloscope display
--avg-alpha=AVG_ALPHASet fftsink averaging factor, default=[0.1]
--averagingEnable fftsink averaging, default=[False]
--ref-scale=REF_SCALESet dBFS=0dB input value, default=[1.0]
--fft-size=FFT_SIZESet number of FFT bins [default=1024]
--fft-rate=FFT_RATESet FFT update rate, [default=30]
-v, --verboseUse verbose console output [default=False]

Examples

Spectrum browser using RTL-SDR device 0 at 100MHz center freq, 2.4Msps, 15dB gain, verbose output
osmocom_fft -a rtl=0 -v -f 100e6 -s 2.4e6 -g 15
Spectrum browser using HackRF device, verbose output
osmocom_fft -a hackrf -v
Spectrum browser using UHD/USRP device, verbose output
osmocom_fft -a uhd -v
Spectrum browser using RTL-TCP server at localhost:1234
osmocom_fft -a rtl_tcp=localhost:1234
Spectrum browser using IQ file source with specified freq and sample rate
osmocom_fft -a file=/path/to/file.cfile,freq=100e6,rate=2e6
Spectrum browser using bladeRF device 0 with waterfall display
osmocom_fft -a bladerf=0 -W
Signal generator using RTL-SDR device 0 (nogui mode)
osmocom_siggen_nogui -a rtl=0
Updated 2026-04-16kali.org ↗