Loading repository data…
Loading repository data…
lmlsna / repository
A Python script that uses an RTL-SDR USB dongle to scan 802.11ah (WiFi HaLow) channels in the sub-GHz spectrum and determine which channel has the least noise/interference.
A Python script that uses an RTL-SDR USB dongle to scan 802.11ah (WiFi HaLow) channels in the sub-GHz spectrum and determine which channel has the least noise/interference.
Install RTL-SDR drivers
On Ubuntu/Debian:
sudo apt-get update
sudo apt-get install rtl-sdr librtlsdr-dev
On macOS:
brew install librtlsdr
Install Python dependencies
pip install -r requirements.txt
Configure RTL-SDR access (Linux only)
Create udev rules to allow non-root access:
sudo bash -c 'cat > /etc/udev/rules.d/20-rtlsdr.rules << EOF
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE="0666"
EOF'
sudo udevadm control --reload-rules
sudo udevadm trigger
Test RTL-SDR connection
rtl_test
Scan all channels with 2 MHz bandwidth:
python halow_scanner.py
Scan with 4 MHz bandwidth:
python halow_scanner.py -b 4
Scan all available bandwidths:
python halow_scanner.py --all-bandwidths
Less verbose output:
python halow_scanner.py -b 2 -q
Custom sample rate (2.4 MHz):
python halow_scanner.py -s 2.4
-h, --help Show help message
-b, --bandwidth Channel bandwidth in MHz: 1, 2, 4, or 8 (default: 2)
-r, --region Regulatory region: US (default: US)
-s, --sample-rate SDR sample rate in MHz (default: 2.4)
-q, --quiet Less verbose output
--all-bandwidths Scan all available bandwidths
============================================================
Scanning 802.11ah HaLow Channels (US region)
Bandwidth: 2 MHz
============================================================
Scanning channel 1 @ 906 MHz (BW: 2 MHz)...
Noise floor: -45.23 dB
Avg power: -42.15 dB
Scanning channel 2 @ 908 MHz (BW: 2 MHz)...
Noise floor: -48.67 dB
Avg power: -44.32 dB
[...]
============================================================
SCAN RESULTS (Sorted by cleanest channel)
============================================================
Rank Ch Freq(MHz) BW(MHz) Noise(dB) AvgPwr(dB)
------------------------------------------------------------
★1 6 916.0 2.0 -51.23 -47.45
2 5 914.0 2.0 -49.87 -46.12
3 2 908.0 2.0 -48.67 -44.32
[...]
============================================================
★ CLEANEST CHANNEL: Channel 6 @ 916.0 MHz (Noise: -51.23 dB)
============================================================
| Channel | Center Freq (MHz) | Available Bandwidths |
|---|---|---|
| 1 | 906 | 1, 2 MHz |
| 2 | 908 | 1, 2 MHz |
| 3 | 910 | 1, 2 MHz |
| 4 | 912 | 1, 2, 4 MHz |
| 5 | 914 | 1, 2, 4 MHz |
| 6 | 916 | 1, 2, 4 MHz |
| 7 | 918 | 1, 2, 4 MHz |
| 8 | 920 | 1, 2, 4 MHz |
| 9 | 922 | 1, 2, 4 MHz |
| 10 | 924 | 1, 2, 4, 8 MHz |
⚠️ RTL-SDR Sub-GHz Limitations
⚠️ Regulatory Compliance
⚠️ Antenna Considerations
Error: "Failed to initialize RTL-SDR"
lsusb | grep RTLrtl_testNo devices found
Poor sensitivity / High noise floor
MIT License - Feel free to use and modify
Contributions are welcome! Please feel free to submit pull requests or open issues.