I’ve been playing with SDRs on the Raspberry Pi 4 for almost a month now and I am happy to say that the new Pi (at least the 2GB model) has enough oomph to run GQRX with a Great Scott Gadgets HackRF One (at 4MSPS max), and a NooElec NESDR SMArt. I was SO happy to say it, I spent several hours writing up a howto, just for everything to fall apart at the second last step.
So… here’s a short version. If I get enough questions about it, I’ll look at salvaging what I still have and writing it up in detail again.
To get GQRX working on the Raspberry Pi 4B (the 2GB is the only version I have), you will need the following:
- A Raspberry Pi 4B (I only tested with the 2GB version but I expect it will work fine with both the 1GB and 4GB versions)
- An 8GB Class 10 (or larger/faster) microSD card
- Internet connectivity through a wired Ethernet port
- An Ethernet cable
- An SDR (tested with the HackRF One and the NESDR SMArt)
- An antenna that fits your SDR
- A USB cable that fits your SDR (if necessary)
- Headphones or a set of speakers with a 3.5mm plug
- A heatsink and/or fan for the Pi (it requires so little cooling that you can just point a desk fan in its general direction and it should be okay)
So, here’s how to do it:
- Image the microSD card with the official Raspbian version with desktop but without the extra software. Get it from here.
- Connect it to an Ethernet port and power it up, then find it on your network and do the usual password/configuration/update steps.
- Set the resolution to 800×600.
- Force the audio output to the headphone jack.
- Enable VNC.
- Install GQRX from the respository (sudo apt install gqrx-sdr).
- Connect to the Pi via VNC and turn the system volume down.
- Connect your SDR (with antenna)
- Run GQRX. If you’re having trouble or for information on settings, etc, check here for information.
- In the “FFT” tab, change the
- Turn up the system volume and/or software or hardware amplifiers in GQRX and your SDR until you can comfortably hear a signal.
And that’s about it.
I found, though, that I wanted to make the Pi a little more portable, and when using the Ethernet jack there seems to be a bit more noise in the GQRX display. Here’s what I did:
- Install RaspAP, information and installation instructions are here.
- Set up the Pi to be a wireless access point on a separate network from your Ethernet port.
- Once the AP is running, disconnect the Pi from the Ethernet port and, using your computer, phone, or tablet, look for the SSID of the AP you set up and connect to it.
- Once connected, run a VNC client (I use VNC Viewer by RealVNC but others should work as well).
- I lowered the output power of the Pi’s wifi transmitter because I wanted to save as much power as possible, lower the amount of electrical noise the Pi generated, and keep the AP’s range as small as possible so as few people as possible can see it. To do that, add the following line to /etc/rc.local just before the “exit 0” line:
iwconfig wlan0 txpower 5
Change the value for txpower to whatever suits your needs (lower = lower transmitter power). - If you find you can’t connect to the AP or you want to change or update the Pi, you can always plug it back into the Ethernet port and connect to it that way.
Here’s what you’ll end up with (except with sound – my PC’s microphone isn’t working):
You can also ignore that last block of instructions and just hook the Pi up to an internal or HDMI-attached display. Some people find that using displays with resolutions of 800×600 or less cramps the GQRX display and makes navigation difficult. If you’re running VNC, you can set the resolution to whatever you want – just keep in mind that the Pi will start to sweat and lag if the display is too large.
If the Pi seems to be having trouble keeping up, try the following:
- Make sure your Pi is adequately cooled and powered. Run
vcgencmd get_throttled
and if it shows any number other than 0x0, you have a temperature/power problem. - As mentioned above, lower the display resolution.
- Remove the Raspbian desktop picture and replace it with a single colour.
- In GQRX, one of the biggest CPU hogs is the main display. Go into the “FFT Settings” tab and lower the FFT Size and Rate. I use 8192 and 10fps on my Pi and that seems to work reasonably well.
- Once you find the frequency you want to listen to, minimize GQRX. That should speed things up noticeably.
- Lower GQRX’s sample rate by going into the “Configure I/O Devices” window (the little green PCI card icon) and lower the number. The HackRF in particular needs to be set lower than its 10MSPS default. 3-4MSPS for the HackRF and 2-3MSPS for the NESDR SMArt seems to do the trick.
- Don’t run any extra services or applications on your Pi.
- If you’re recording audio and it’s lagging or chirping, don’t record to the SD card – mount external USB storage (stick, drive, whatever) and use that instead.
The Pi – even the 4B – has its limitations. If you’re careful, though, you can pretty easily turn it into a small, portable, and powerful little SDR machine.
Tried this, got a whole list of 404 not found [IP: 93.93.128.93.80] codes.
Hi Bill,
Did you update your sources with
sudo apt update
first?Once in a while I’ve also run into problems where – for some reason – the software repository my Pi is trying to talk to has suddenly disappeared or stops responding midway through an update. It doesn’t happen often but I guess I do updates often enough that I catch some places when they shut down for maintenance or there’s an outage somewhere.
Hopefully if you do another update and try it again it’ll work.
Thanks for the comment!