This tool uses a HackRF device to scan a range of frequencies and stops when it detects a signal above a specified dBm threshold. The frequency range and threshold are configurable.
- A HackRF device connected to your computer
- Python 3.7+
- HackRF utilities (
hackrf_sweepcommand) installed - Required Python packages (see requirements.txt)
- Clone or download this repository
- Install the required dependencies:
pip install -r requirements.txtEdit config.yaml to set your desired:
- Frequency range (start and end frequencies in Hz)
- Signal strength threshold in dBm
- Scan settings (bin size, gain, sample rate)
Default configuration:
start_frequency: 100000000 # 100 MHz
end_frequency: 1000000000 # 1 GHz
dbm_threshold: -30 # in dBm
bin_size: 100000 # 100 kHz steps
gain: 20 # Receiver gain
sample_rate: 2000000 # 2 MHz sample rateRun the scanner with:
source venv/bin/activate && sudo python hackrf_scanner.pyAdditional options:
python hackrf_scanner.py --config custom_config.yaml # Use a different config file
python hackrf_scanner.py --plot # Create a plot of detected signalThe tool uses the hackrf_sweep command line utility to scan the specified frequency range. It parses the output to extract frequency and power information. When a signal with power above the threshold is detected, the scanner stops and reports the frequency and signal strength.
When a signal is detected above the threshold, the script will output:
