Monday, December 1, 2014

Quick FM Radio Receiver with RTL-SDR Dongle, Gqrx, and Kali Linux

This tutorial is an introduction to the RTL-SDR dongle and some hints using it with Gqrx software.  I was able to buy one recently off of Amazon for ~$8-12.  For the amount of functionality you get with this dongle, that is a huge return on investment.  I highly recommend getting one (I may get a few more for different purposes) and get receiving.  Getting up and running is unbelievable simple and fast compared to other ways of connecting computers and radios.

For this tutorial, you need:
--RTL-SDR RTL2832U DVB-T Dongle (these things have a million names, some call them R820T. Mine has frequency range 24MHz-1766MHz) and of course its antenna
--Kali Linux (1.0.6 64-bit) LiveCD running on computer with 4GB RAM with Gqrx software
--Headphones or speakers to listen

1)  Boot up Kali Linux. Attach and setup antenna before plugging into USB port to prevent damaging USB port.  Insert RTL-SDR dongle into a USB port.  Kali should already have drivers needed for it.

2) Open up Gqrx by going to clicking on Applications tab up top, then -> Kali Linux -> Wireless Attacks -> Software Defined Radio -> gqrx.  We aren't doing any attacks here, you can use Gqrx on other Linux distros too if Kali isn't your cup of tea, Kali just happens to be a favorite of mine (I like Debian) to pentest/probe my own computers and network.

3) So Gqrx should auto-detect your dongle, Device should be "Generic RTL2832U SN" then it will be a big number.  Device string "rtl=0".  Sample rate "1500000".  LNB LO "0 MHz".  Audio Output "Default".  Sample rate "48kHz".

All these are default settings, and they work completely fine.  Don't change them unless you know what you're doing; the goal here is to get up and running as quick as possible.

4) Now you can start receiving, no GNU Radio receiver blocks to be made, this is sufficient to receive A LOT.  Click on the little power button below 'File', it should start somewhere around 144MHz (the 2 meter band for Ham radio).

5) Changing the frequency was a little tricky at first, you hover the mouse pointer over frequency number then type in what frequency you want, it then goes to next digit.  So if you're on 143.899.302 MHz and want clean 144.000.000MHz, put your mouse over the 3, type '4', then press 0 until the end.  You can use the mouse to click the frequency and lower it, but I didn't really like that feature.

You can use the mouse to grab the scanner to move it across the bandwidth on the screen (can't scroll across without changing frequency at top, at least haven't figured that out yet).  You can enable "full screen" mode at top near the save button.  On Audio tab on bottom right, main thing is to change the gain (basically volume) or record samples.  You can change the demodulation mode on the right too (main ones are AM, Narrow FM, and Wide FM; USB/LSB is more for HF frequencies which need a special up-converter to receive and same with CW modes).  You can leave the Filter setting at Normal and AGC on Fast, they both "work good"; of course tinker if you desire.  The Squelch and Noise Blanker settings I didn't mess with either as we're doing simple receiving here.

On the FFT settings, you have to be careful, I had the program crash when I was playing around with them.  You can change the color of the waterfall display and fill in the colors.  You can increase averaging so to pinpoint signals even better.  But most importantly, you can increase the Frames per Second (FPS) and the FFT size up to a max of 16384 FFT points being calculated.

##### WARNING #####

You can make the application crash if you crank these settings too high, so it's highly dependent on your system CPU and the RAM.

6) That's mostly it, all the hard work has been done for you, and this is very fun and easy!  Here's a listing of all the signals I was able to receive so far:

--Scattering of AM reception around 25MHz (near lower limit of RTL-SDR), need better antenna for them.
--My car key fob on 313.795MHz with AM, was able to see the quick burst of the protocol.  Will probably have a tutorial on capturing these signals in the future.
--Another van key fob on 307.9MHz with AM, had a weird waveform.
--NOAA weather station for my locality on 162.541MHz on Narrow FM.
--Unidentified signal on 454.3MHz using AM, UHF business band and Family Radio Service "walkie talkies"
--Unidentified signal on 480MHz using AM, TV channels
--Unidentified signal on 869.5MHz using AM, Public safety or commerical 2-way
--Pagers on 931.29MHz using AM, very pronounced signal and can be decoded, haven't done that *yet*
--Unidentified signal on 940.218MHz using AM, commerical 2-way radio
--Unidentified signal on 960MHz using AM, mixed studio-transmitter links

So there is PLENTY to do, just overwhelming amounts of things you can do with this receiver.  Have fun!

Useful Links:
https://wiki.installgentoo.com/index.php?title=Software-defined_radio
www.rtl-sdr.com
www.sigidwiki.com/wiki/Signal_Identification_Guide
gqrx.dk
http://distrowatch.com/?newsid=08246

No comments: