RTL-SDR and SDR#

(SDR# v1.0.0.1165)

For around £15 (used with free software) this amazing receiver provides the best value for money that I can imagine.

Ok so it's not exactly breaking news - the possibility of using these cheap Digital TV dongles for Software Defined Radio was noticed back in 2010, and SDRSharp has been rapidly gaining fans since early 2012. I seem to have waited for things to mature before finally giving in and having a try. At this cheap-as-chips price, why not?

So what's it all about then?

Digital TV dongles : Cheap.
They contain a tuner chip, and another chip the Realtek RTL2832U decodes COFDM TV signals and sends the audio samples over USB2.
Then it was noticed that there was a way of directly sampling the tuner over its full range, bypassing the TV stuff, passing raw IQ samples directly over USB. This allows Software Defined Radio programs to use the dongle as a wide range general coverage V/UHF receiver.

OK, more detail please?

Recent dongles contain the Rafael Micro R820t tuner chip, which covers 24 MHz to 1.7 GHz with no gaps - quite a range! All of that is available for reception in all modes, thanks to IQ sampling and SDR technology.

The tuner chip is a Direct Conversion Receiver (zero I.F.) - using synchronous detection via a local oscillator running at/near the signal to be received. The analogue output of such a receiver produces a highly accurate and linear copy of the original modulation, and with the signals now down at 'baseband' it is possible to employ filters far more effectively than higher up at an Intermediate Frequency. SDR Digital Signal Processing can provide quite astounding selectivity.

In these dongles, the chips such as the R820t digitally sample the baseband output. This is where it could get a little confusing if you haven't come to terms with IQ sampling :)

IQ Sampling?!

Imagine a simple analogue Direct Conv. Rx - tuned correctly to simple signals like CW and SSB the audio is correct already. It's a simple frequency translation from 14210-14213 kHz straight down to 0-3 kHz for example. You would only need a simple Analogue-to-Digital Converter to deal with that. The signal is two dimensional like any other audio (just a varying amplitude as time goes by).

But consider an FM signal. The required audio signal is tucked away in the movements of the carrier. All you have after Direct Conversion is a strange sounding load of noise - the FM still needs to be demodulated back to audio. Just one set of readings giving two-dimensional sampling (time being our second dimension here) isn't going to cut it, you can think of the FM signal as 3D.

Consider 3D vision. We need two different views of the same scene (spaced apart by the distance between your eyes) in order to recover the extra depth information. This IQ sampling is kinda similar. We need two views of the original signal to be able to retrieve all of it.

In fact this dates back to 1933 and Harry Nyqist - well known for discovering the rule that your Sample Rate has to be twice the highest frequency being sampled, and then all the information you need is present. He also found that by sampling in Quadrature (an In-phase sample and a Quadrature sample taken at 90 degrees - hence the I and Q of 'IQ') you can derive the amplitude and phase at any angle, later on, from the samples. Phase is our extra dimension here, if you will.

Just as our 3 physical dimensions are all at 90 degrees to each other, this Quadrature malarkey has a 90 degrees phase involved too. You may also have heard of Complex Numbers, so beloved of engineers and Advanced Maths guys. Think of impedance in the radio world, and their two part values being a combination of resistive R and reactive X added in, shifted along 90 degrees by multiplication with that j fellow the square root of -1. You have the real numbers and the 'imaginary' part which is 90 degrees out of phase. I still shudder at the thought, I can't say I fully understand these '3D' numbers, but I've come to peace with my ignorance and can sort of get along with it.

Two part numbers. Complex. One part 90 degrees away from the other. I and Q sample streams allow the SDR software to pull any information it likes out from the two sets of samples. Phase, amplitude, it's all available by some simple maths working upon both sets of samples combined - so FM and other modulation types can be fully demodulated.

Any the wiser? Even slightly? I hope so :)

And then what?

The tuner chip samples at around 3MHz, and the USB+more chip resamples again. You run SDR# (free!) and these IQ samples are mashed around with clever maths and as if by magic you can see a whole slice of spectrum at once on the display (like a 'panadaptor' scope) with a 'waterfall' of readings sliding down the screen underneath to give another view on things.

So is it good?

You bet! OK, it's not perfect in every possible way, but what is?
The samples are 8 bits resolution, and that limits the dynamic range. But as most of the signals we pick up tend to be within a limited range above the noise floor, it's not a huge problem. You could live with a fairly poor microphone to listen to bats at night, so long as most of the sound is quite faint. It's only when a bat flies right past the mic that it overloads. If the mic is sensitive enough the rest of the time to hear at the very limits of what it's possible to hear, you won't mind.

These dongles are as sensitive as most of us will ever need. There's a 50dB adjustable pre-amp at play, and if you've never used a pre-amp with a radio before, it's a total eye-opener just how much there is down there in the noise. Signals that usually don't make it through your coax and get lost in your RX's Noise Figure now stand out and can be heard clearly. So long as there's nothing really strong nearby, you're golden.

I've been scanning for years with a variety of aerials and receivers, and the performance of this cheap dongle has blown me away! Perhaps a state of the art amateur receiver will have an even lower noise figure for real DX, but this is enough for most of us. At the very least, you have to admit that when it's working well it serves as a very fine introduction to VHF and UHF. Your location and the aerial remain vitally important, but if everything is in place for listening to what you want to hear, this little marvel will do the job out of all proportion to its cost!

Sensitive enough then. Selective? Accurate?

It's stable enough, and absolute accuracy can be adjusted in SDR# in whole number Parts Per Million. You may not be able to get it spot on to Lab Standards, but it's close enough for most of us. Find an accurate signal somewhere in the bands, adjust to suit, and everything else falls into place with it.

Selective? Ooooh yes! The beauty of SDR is the way a little bit of DSP can work wonders, because it's all happening down low in frequency at baseband where computing power can really have its way with it.

OK OK, I want a go! How do I join in?

Even my dusty old XP laptop is enough to play with it, and that's got an embarrassing processor clocked well under 2GHz :)
I also have a dual core 2.3GHz PC, where it flies, even with extra plugins and decoder (more later).

Assuming you have a Windows PC/Laptop as good or better than that, you're Good To Go.

If you only trust Amazon for online shopping, they will cater for your needs. Just make sure it's got the RTL2832U+R820T chips and happy reviews. If the dongle comes with an MCX socket, you will want an antenna adaptor to plug in something better than the supplied quarterwave magmount (12cm long designed for TV wavelengths around 50cm/600MHz). The aerial whip screws into the base, so you can hook up a wire like a screw terminal to extend its length, or you could cut the thin coax and hook up an inline connector of your choice. Really you do want to hook up an aerial well away from the computer and all its smog of interference.
With Amazon an adaptor will probably be an extra. As an alternative, the CosyCave offering comes complete with all you need.

Installing

Plenty of guides out there. Plug it in, don't use the supplied mini CD for the TV drivers. Cancel out of the install dialog. Download SDR# - it's a simple install. You will find it comes with its own 'zadig' drivers, and run the appropriate one (there's one for Windows XP). Then you can run SDR#; it will talk to the zadig driver and that will talk to the USB connected dongle.


2m dead as usual

First steps

SDR# needs to stop and start with the Play/Stop button at the top left. You need to have "RTL-SDR / USB" in the selection box next to it. The Configure button alongside can be used when playing or stopped to adjust the PPM accuracy and Gain, but other options can only be changed when Stopped. RTL AGC and Tuner AGC aren't needed.

Sample Rate is apparently 2.4M at its best, that's what I use. Any higher and you may get glitches where you lose signal for a split second. I find that lower rates not only give you less bandwidth on the display, but images seem to be more in evidence. At one rate I found I simply couldn't believe most of what I was seeing! At 2.4MSPS it all seems to correspond with the bands I know so well, and any images that do crop up are seem to be a nice round 1.6 or 2.4 MHz away from where they really are - the maths is easy with the same decimal places after the first one.

In the FFT Display options, use the Range slider to move the noise floor down, making better use of the space available on screen.

If there's a spike in the center of the display that annoys you, tick the option box "Correct IQ" to get rid.

Play with the software, tuning around. Explore the options, click on things, click-and-drag on things, use the scroll wheel between the mouse buttons, you'll soon get the hang of tuning around. Change the [Configure] RF Gain and see the noise floor and interference/images rise and fall. Use just as much gain as you need, no more. Hover the cursor over a digit on the VFO readout, and use the mouse wheel to shift the number up and down. Even if you're tuning in 25kHz steps, you can still fine tune with the smaller decimal places. Use the Zoom fader to show the received signal more clearly - notice the lighter grey section showing the bandwidth? You can drag the edges to change the b/width. Good isn't it?

Things to try

The easiest way to start is to explore WFM between 88 and 108 MHz.
Notice that Stereo is available! And look, it even shows RDS details too! Reduce the bandwidth to weed out weak signals next to strong ones. Probably better than your car radio, isn't it?

Next, NFM. Amateurs, PMR, Marine VHF etc.
Now you have Filter Order to play with. This affects the sound and selectivity. 11000 and 60 seems to work well enough on the 12.5kHz spaced channels. 'Filter Order' is how much DSP is applied, the larger the number the greater the effect.

Next, AM. Airband.
Filter settings 7000 and 50 sound OK to me, and allow 8.33 channels to be heard nicely without hearing the adjacent ones. If the background noise (unsquelched) is too loud, with AM there's a whole new set of options 'AGC'. With the threshold set to -25dB it's nice and quiet when no-one's talking, and I get by without the squelch. A quick recording in Audacity reveals that wide ranges of signal strength all come through at a comfortingly similar volume level. I use a volume setting on the 5th of the 6 notches, which generally works well for all modes and decoding. You can use Audacity temporary recordings to see how the levels look.

My only gripe is that there's no signal meter, the fast scanning plugin uses -dB values to detect signals, and the Squelch uses a whole other numerical scale of its own!

You now know enough to explore the whole useful VHF/UHF spectrum. Find odd signals, zoom in, analyse, spot things you'd never know were there with simple scanners! Tune to 1090 and see the blips from aircraft, or similarly short pulses from ships either side of 162.0 MHz.

Ironic that one of the things that doesn't seem to be possible, is watching digital TV :)
You could actually plug the dongle into different USB sockets - Windows remembers USB device setups per socket, so install the supplied drivers for use on one USB socket and use it with SDR# on the other!

There's more - plug ins

The "Frequency Manager + Scanner Tools" plugin may be worth a play. You can store as many frequencies as you like, specify named groups and add each frequency to any group (each channel can be in many groups if you wish). A nice and versatile scanning system; in essence a Group defines a Scan List into which you can place any of the already stored frequencies. Instead of the banks or systems/groups of hardware scanners, this is a good way to set up a scan by picking the channels to include by whether they're in that group or not. You may end up with groups that are similar, but you'll never need to duplicate actual frequency channels.

You can even export data to CSV files and import (using SDRSFreqMgrTools.exe). So if you want to add a load of channels in one easy go, you could write a script (or modify mine here) to generate the CSV and import the lot in one go. You can Select a number of channels in the manager and add them all to a group in one go.


------------- SdrImport.vbs ----------------------
' Open text file for write (overwrite if already exists)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("D:\import.csv", 2, True)

For f = 453000000 to 454000000 step 12500
 strMessage = strMessage & cstr(f) & "," & cstr(454100000) _
   & ",|" & FormatNumber(f/1000000,4) & "|,|NFM|,|Unidentified|,||,|Unidentified|,0,0," _
   & "|Blackman-Harris|,11000,30,0,40,600,||,|2013-09-30T00:00:00|,0,0" & vbCrLf

next

' Write our giant string & close the file
objTextFile.WriteLine( replace(StrMessage,"|","""") )
objTextFile.Close
------------- end of .vbs file ----------------------------------
Script file to generate a CSV file to import 12.5kHz spaced channels at 453 MHz
(all using 454.1 as the center frequency so the tuner doesn't have to retune).
NOTE : Importing currently overwrites all records already stored - so do an export first to save what you have, and merge the resulting export.csv into the one you're going to import.

This plugin also allows Limit Searching, from one frequency to another.

However, in use I find the searching hard to set up (the minimum dB level) and even when it is reliably chugging away at last, it keeps stopping on 'signals' that aren't there. I hear a clunk, but it wasn't any actual signal. Maybe it's using too much CPU and the clunk is a loss of signal from the dongle?

Scanning is a little more successful, but I'm still left feeling that it isn't ideal for this - a real scanner is still the best way to do this task. SDR# is great for manual tuning only (aided magnificently by the bandscope and the short-term memory of the waterfall).

If you want to play with this plugin, make sure you place it (e.g. unzip SDRSharpPlugins v1.31.zip) in a plugin folder with its own docs folder below that : (path)\sdrsharp\plugin\docs
The setup prog PluginsSetup.exe can fail if you don't get the folders right.

Even more - Data Decoding

A good start is the free program 'PDW', begining with POCSAG pager decoding. Just select NFM with the right bandwidth, get the volume level acceptable (very tolerant), and you should easily see the bitrate appear in the title bar when it is receiving, and data should come through when the pager is actually sending some (rather than blank bursts to keep the TX warm!).

PDW comes as a zip file (e.g. pdw3.12-full.zip) - find a suitable folder somewhere to put it, unzip (free 7zip is available) and create a desktop shortcut (or pin it, or add to the Start Menu - whatever you prefer).

If you'd rather listen to music and not hear the paging, you'll have to route the audio around with a 'virtual cable'. Install the free VB Audio Cable (reboot probably required). With SDR# stopped, select 'VB Audio Point' in the Audio Output selector. Now you won't hear what's going on, but the audio can be picked up by PDW or other decoders by changing the Windows Audio Recording device to the same 'VB Audio Point'. It's like a patch lead routing the sound around without it bothering you.

Installation is via a downloaded zip file (e.g. VBCABLEDriver_Pack42b.zip), so unzip it somewhere suitable, run VBCABLE_Setup.exe and note there is also a VBCABLE_ControlPanel.exe to show you the settings and allow changes (which need reboots with each change).

ACARS seems to be more of a challenge for SDR# and PDW. The best I get is the occasional decode with 80% accurate text - plenty of red errors. I hear loads of ACARS bursts but only a few show up. Bandwidth on the scope seems to be 15kHz or more (despite the few websites I've found saying to use 6k - and I can't find any official word on the real bandwidth!), and the lower the filter order the better; like 10. Then the audio levels seem to be quite important for PDW - so the AGC is whole extra level of fuss. I've given up!

And more - DMR Decoding!

Before you experiment with 'VB Audio Point', you can get useful data from DMR signals with DMRDecode. It won't recover any audio, but you will see the 'colour code' and the numbers of the group and calling units. You can get good clues about the users from that (is it a shared repeater or one company? Operation times of day, weekends worked or not? All helps to identify possible users). Save to file for a while and then stop that logging - at the end of the log file you will get a summary of which groups came up and their channel (2 slots) use.

DMRDecode comes as a .jar file (e.g. dmrdecode_b68.jar). This runs as a double-clickable executable if you have the latest version of Java runtime installed (e.g. jre-7u40-windows-i586.exe). To launch it, I have a desktop shortcut to the .jar file.

Ready to try hearing DMR?
With your virtual cable installed, you can play with DSD. Running in an old-school Command Window (e.g. dsd151.exe .... if you need to invert the data, run as : dsd151 -xr ), this actually produces understandable audio from DMR - provided they aren't using any privacy encoding ('basic' would only need 256 attempts to crack if you could, whereas 'enhanced' could take some time!).
For example, if DMRDecode comes up with 'Privacy Enabled' in a line like "Service Options : Non-emergency/Privacy Enabled/No priority" then you're out of luck - if you hear anything it will be just garbled odd noises. But, find an open DMR user and it's good - if the signal is reasonably strong, and the levels are reasonable. And 48k audio sample rate is apparently vital too; make sure SDR# is providing it, and VB-Audio is passing it correctly.
You may need to make sure there's a 48000 value in the "SDRSharp.exe.Config" file (text; edit in Notepad), in the line setting 'minOutputSampleRate' in the XML :
<add key="minOutputSampleRate" value="48000" />

DSD is installed as a simple .exe file, but requires cygwin1.dll in the same folder - and this requires a lengthy installation of CygWin to get the DLL!

TETRA?!

If you can get your head around the concepts of GNURadio, you could open up a whole world of possibilities. I haven't, yet. Looks like an interesting challenge, but a bit too much right now!

All this for 15 quid!

Pretty good value, isn't it?

Now, anyone with any interest in radio can have a play for peanuts. Just feed your dongle with a good signal from a dipole in the loft (or better) and be astonished at what you can hear! This opens up the world of radio to everyone. It makes a mockery of countries where scanners are frowned upon, or where certain cellphone frequency ranges are outlawed from scanners, LOL! If only I'd had all this back in the 80s :)

Handy too, if you're away from home with a laptop. No WiFi? Oh well, you've got a scanner to play with!



If this review has helped you, it would be nice to hear from you. Any further info or questions are welcome! Please leave a message on the board at http://www.voy.com/176326/ - thanks.

First written Oct 2013. When I last typed here it was 1 Oct 2013.


To return to RF-man's home menu page...