Category: setup

Setting up RTL-SDR on Raspberry Pi 3

This post presents the RTL-SDR setup on Raspberry Pi 3 with Raspbian

RTL-SDR on Raspberry Pi 3

Setting up the environment

Open the terminal, then:

pi@raspberrypi:~ $ sudo apt-get install gnuradio % take some time to install all packages

pi@raspberrypi:~ $ gnuradio-companion % if it opens the gnuradio-companion, everything is ok

Installing RTL-SDR and gr-osmosdr packages

pi@raspberrypi:~ $ sudo apt-get install rtl-sdr gr-osmosdr

After successfully installing the packages, plug the RTL-SDR to the Raspberry Pi 3 USB Port, then list the USB devices connected to the Raspberry Pi 3:

pi@raspberrypi:~ $ lsusb

Look for Realtek device (RTL), in my case “Realtek Semiconductor Corp. RTL2838 DVB-T”:

lsusb on Raspberry Pi 3

Now it is time to check if RTL-SDR is working:

rtl_test on Raspberry Pi 3

In my case it is working by the first time on Raspberry Pi 3, but there is a known issue (on Ubuntu) related to driver conflict (it uses the Digital TV Driver – dvb_usb_rtl28xxu), if this is your case, do the following:

pi@raspberrypi:~ $ sudo rmmod dvb_usb_rtl28xxu % to make this fix permanent, you have to move driver dvb_usb_rtl28xxu to blacklist

and, try again:

pi@raspberrypi:~ $ rtl_test

Testing time 🙂

Install the GQRX, through apt-get:

pi@raspberrypi:~ $ sudo apt-get install gqrx-sdr

Then run GQRX:

pi@raspberrypi:~ $ gqrx

If not asked to select I/O Device, go to “File” > “I/O Devices” then select Realtek RTL-SDR, now you can click “Power” button then you can hear noise and see FFT live graph (up) and waterfall live graph (bottom).

Pay attention:

Due to processing limitations from Raspberry Pi, to avoid crashes, you have to reduce the sample rate for GQRX, to do it go to: “File” > “I/O Devices” > “Sample Rate” or edit /home/pi/.config/gqrx/default.conf

RTL-SDR known to works up to 2.4 Msps on Raspberry Pi 3 and up to 1.44 Msps on Raspberry Pi 2.

In most cases you can reduce the CPU load further by reducing the window size, sample rate, FFT rate and FFT size (try 2048 at 10-15 Hz). If you are only interested in the FFT, set Mode to “Demod Off”. This will greatly reduce the CPU load.

GQRX on Raspberry Pi 3

Another option due to GQRX limitation on Raspberry Pi, you could try QTCSDR on GitHub that also allows TX through GPIO 18 (rpitx), but now just to check RX function:

  • git clone https://github.com/ha7ilm/qtcsdr
  • cd qtcsdr
  • ./rpi-install.sh
  • ./rpi-test.sh

If rpi-test.sh succeeds, then type qtcsdr on command line.

pi@raspberrypi:~ $ qtcsdr

qtcsdr on Raspberry Pi 3

Congratulations, your RTL-SDR is working on Raspberry Pi 3! Now you can use available SDR tools on Raspberry Pi 3.

Tags : , , ,