Gqrx is a wonderful program for SDRs on Linux. If you have it installed already and have bookmarks of frequencies you have tagged as something like Aircraft, EMS, Marine, etc., you can turn Gqrx into a scanner with gqrx-scan (Khaytsus / gqrx-scan · GitLab).
BUT... how do you set it up to where all you have to do is double-click on a file saved on your Desktop, have Gqrx open and start running automatically, and then start scanning automatically? With a bash script! The following is one I use for Aircraft saved on my Desktop as Aircraft.sh:
You can modify the last line where it says "Aircraft" for other tagged frequencies and save a new copy on your Desktop to have multiple scanning options such as EMS.sh and Marine.sh and Police.sh and so on.
You need to make sure each .sh bash script file you save to your Desktop is executable (I use Step 2 linked here).
You need to do a few things in Gqrx before you can use .sh bash scripts to scan frequencies with:
You will need to make sure netcat is installed, and gqrx-scan requires some Perl add-ons to work. I use Fedora KDE 36 so I had to do this in Terminal (Konsole):
You will have to modify the above for your Linux distro if you are not using Fedora.
Lastly, let me explain what the last line of code does in the .sh bash script:
./gqrx-scan
Starts gqrx-scan.
--delaylevel=-50
This is the squelch level. You may need to lower it to -60, -70, or even lower to hear really weak signals.
--delaytime 10
How many seconds to stay on an active frequency after the transmission ends in case there is more traffic. This is used in conjunction with --wait.
--pause 0.25
Scan speed in seconds.
--tags "Aircraft"
Tags in your Gqrx Bookmarks file to scan for. You can even do multiple tags such as "Aircraft|Marine".
--type gqrxfile
Use the frequencies saved in your Gqrx Bookmarks file to scan with.
--wait
Wait on an active frequency until there is no more activity after --delaytime runs out of time to continue scanning.
That is all! Now all you have to do is double-click on any of your .sh bash script files you created on your Desktop to scan with. You do not have to open Gqrx first and then run a .sh bash script to scan. If Gqrx opens and starts scanning without starting the SDR due to an error message, close Gqrx and run the .sh bash script you want to use again.
Enjoy!
BUT... how do you set it up to where all you have to do is double-click on a file saved on your Desktop, have Gqrx open and start running automatically, and then start scanning automatically? With a bash script! The following is one I use for Aircraft saved on my Desktop as Aircraft.sh:
Code:
#!/bin/bash
# Open Gqrx.
gqrx &
sleep 5
# Start SDR.
echo "U DSP 1" | nc localhost 7356
sleep 5
# Start scanning frequencies with gqrx-scan (https://gitlab.com/khaytsus/gqrx-scan).
cd /home/$USER/gqrx-scan-master/
./gqrx-scan --delaylevel=-50 --delaytime 10 --pause 0.25 --tags "Aircraft" --type gqrxfile --wait
You can modify the last line where it says "Aircraft" for other tagged frequencies and save a new copy on your Desktop to have multiple scanning options such as EMS.sh and Marine.sh and Police.sh and so on.
You need to make sure each .sh bash script file you save to your Desktop is executable (I use Step 2 linked here).
You need to do a few things in Gqrx before you can use .sh bash scripts to scan frequencies with:
- Open Gqrx as you normally would to use it. Go ahead and start it.
- Be sure to enable "Remote control via TCP" by clicking the icon on the toolbar with the two computers on it.
- If everything looks good, save your configuration.
- Close the Gqrx window.
You will need to make sure netcat is installed, and gqrx-scan requires some Perl add-ons to work. I use Fedora KDE 36 so I had to do this in Terminal (Konsole):
Code:
sudo dnf update
sudo dnf install netcat perl-Getopt-Long perl-Net-Telnet perl-sigtrap perl-Term-ANSIColor perl-Time-HiRes
You will have to modify the above for your Linux distro if you are not using Fedora.
Lastly, let me explain what the last line of code does in the .sh bash script:
./gqrx-scan
Starts gqrx-scan.
--delaylevel=-50
This is the squelch level. You may need to lower it to -60, -70, or even lower to hear really weak signals.
--delaytime 10
How many seconds to stay on an active frequency after the transmission ends in case there is more traffic. This is used in conjunction with --wait.
--pause 0.25
Scan speed in seconds.
--tags "Aircraft"
Tags in your Gqrx Bookmarks file to scan for. You can even do multiple tags such as "Aircraft|Marine".
--type gqrxfile
Use the frequencies saved in your Gqrx Bookmarks file to scan with.
--wait
Wait on an active frequency until there is no more activity after --delaytime runs out of time to continue scanning.
That is all! Now all you have to do is double-click on any of your .sh bash script files you created on your Desktop to scan with. You do not have to open Gqrx first and then run a .sh bash script to scan. If Gqrx opens and starts scanning without starting the SDR due to an error message, close Gqrx and run the .sh bash script you want to use again.
Enjoy!