From charlesreid1

This covers my first foray into signal decoding with SDR and gnuradio.

Recording the Signal

I basically wanted to record a signal from an Amateur Radio WebSDR station, and figure out how to import it into gnuradio for signal analysis. Recording the signal was easy - the web interface actually has a recording capability. So it's as simple as clicking a button.

But these WebSDR recordings were single-channel - and I didn't know if I could use them in gnuradio.

Getting a Two-Channel SDR Wav File

Then I found an observatory that provides SDR data that's two channels, and a higher sample rate:

Getting Info about the Wav File

You can use the mediainfo utility to get some info on the wav file:

mediainfo HDSDR_20140505_180828Z_437209kHz_RF.wav 
Complete name                            : HDSDR_20140505_180828Z_437209kHz_RF.wav
Format                                   : Wave
File size                                : 311 MiB
Duration                                 : 3mn 28s
Overall bit rate mode                    : Constant
Overall bit rate                         : 12.5 Mbps

Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 3mn 28s
Bit rate mode                            : Constant
Bit rate                                 : 12.5 Mbps
Channel(s)                               : 2 channels
Sampling rate                            : 391 KHz
Bit depth                                : 16 bits
Stream size                              : 311 MiB (100%)

Now we'll be able to use gnuradio to feed these two channels of sound data into a radio spectrum visualizer.

Note that we could also get that information by opening the Wav file in Audacity:


The Gnuradio Flowchart

The Wav File in Gnuradio

You can use the wav file as a source of sound data by using a "Wav File Source" block. Double click on the block, and pick your wav file to associate it with the block.

Float to Complex

You'll want to feed data from your Wav File Source block into a Float to Complex box. This is because the two channels of the Wav file correspond to the I and Q channels of the radio data. When you're hooking an SDR up to your computer, you're converting radio signals to IQ data; in this case, we're using the recorded Wav file as a stand-in for a real-time radio signal from an SDR.


You'll want to throttle the data coming out of the wav file. By default, Gnuradio doesn't limit the speed at which you can extract data from a wav file - so if you wanted to analyze it all at once, in an instant, you could. The throttle makes sure the data is "played back" at the same sample rate that it was gathered at - so that we see the "real time" signal being played back.

Waterfall Sink

We want to pipe the result of all of this into a Waterfall widget, so that we can look at the spectrum visually.

The Result

Here's the resulting Gnuradio flowchart:


and the resulting output - with a very weak signal:


In the next part, Gnuradio/Frequencies of Interest, we'll take a look at that frequency of interest, and apply a filter to it so we can pick out the signal.


SDR Wav Files: