I know decoding isn’t technically the correct term here which would be demodulation but I am primarily a software person and SDR is all about software. I have come to have a bit of a chip towards radio people because I think they really just don’t understand software at all. They are analog beasts for the most part. In a perfect world software people would throw a monster antenna on the roof and connect it to an equally giant ADC and just process it using a giant hadoop cluster. (Please no emails from radio people about how that could never work). Granted that would be overkill to get a local FM radio station on your laptop in practice but development isn’t about practice, it is about creating the shorting possible iteration cycle to keep things moving in the direction you want them. SDR is a big step there, in that you don’t need to build boards everytime you want to do something new but there is still too much hardware dependence and it sure seems like gnu radio was made for radio people and not for software people. /rant
So you have your usb tuner setup, gnu radio installed, now to do something actually interesting. Lets tune in to a local FM station and listen on your computer with all the processing happening in software.
You can open the gnuradio workflow I made for this here: http://pastebin.com/download.php?i=WwMEhRZx . Choose file open and load it into Gnu Radio Companion (GRC). It should look something like this:
So what is going on here?
This is a graphical map of the processing steps grnu radio is doing with the input signal. On the left hand side there are two important blocks. They are variable blocks, you can define a value and a placeholder name. That when as you setup additional blocks you can reference the placeholder and if you want to change something like frequency you can just change it once in the variable block instead of having to change it all over the place. The other one is sample rate, this is how many samples of the stream are done per second.
The hardware will have an upper limit and some local system performance will also effect the result. I picked a safe value that worked well for me on my slightly older laptop. There are also some more complex decisions you would need to make about sample rate if you are working with more complex types of signals.
Double click the frequency and change that to a known good quality radio station frequency for your area. Note that it is in hertz to 91,500,000 is 91.5 on your car radio.
Next over in the workflow we have the rtl source, this is the raw data stream coming from the usb tuner hardware. It references the sample rate and frequency variable blocks we just reviewed.
Throttle is the next item, I don’t think this is strictly necessary with the rtl source but I saw it in frequent examples and I don’t know if there is any aspect of the rtl source that is inconsistent.
After throttle is a tee to two different blocks. One is WX GUI FFT which is a line graph visualization of the spectrum being captured. It isn’t necessary to hear the radio but you should be able to see a clear peak in activity at your specific frequency where the radio station you are tuning to should be.
The other side of the tee is the Low Pass Filter block. There is tons of extraneous noise flying all over the place, this is a software filter the blocks out frequencies beyond the bounds of the range specified. You can try adjusting the parameters here to try and improve the quality of the audio you get and eliminate fuzz or other interference.
The low pass goes into the WBFM Receive. This is where the magic happens that decodes the input stream into the actual audio that was encoded into the stream and bits suitable for sending to your soundcard.
Finally there is the Audio Sink, this is the output that connects the stream to your audio card.
With all that setup you can run the workflow. Now you can press F5 to “compile” your workflow, you should see “Generating …” in the bottom status window. Then press F6 to run your workflow, after some churning you should see the line graph window popup and you should start to hear either static or hopefully your radio station coming out your speakers. Success!
Click the GNU Radio Companion window in the background and hit F7 to kill the workflow. I am not having any luck getting a response from any of the controls in the popup, they seem static or read only. Once stopped you can alter the frequency in the variable block and jump to another station.
Enough fun for now, see what you can pickup, use the visualization to see what is out there on any frequency, and play with the low band filter or other filters to improve audio output quality. Good luck!