Say hello to the world of building your own SDR with a GNURadio FM Receiver. You can get this up and running in half an hour, as shown in my video.
When you start to learn a new programming language, one of the first things you do is write a “Hello World” program. This is a short piece of code that demonstrates ability to process some data. In this case, simply defining a text string and printing it to the output device.
Learning GNURadio is similar to learning a programming language and development environment. So, the typical “Hello World” project is creating a GNURadio FM Receiver using the RTL-SDR. This is where I will start my exploration of this new tool.
The flow diagram for this project is shown in the above picture. If you download and expand this graphic, you will see all the blocks and configurations needed to demodulate your local FM stations and display their signals. I have posted a GNURadio FM Receiver video tutorial which describes everything in detail, step-by-step. Or, you can download and run the GNURadio file below.
What I Learned Building the GNURadio FM Receiver
If you are familiar with software defined radio and DSP, you know that this design is very basic, almost trivial. On the other hand, if you are a newcomer, it’s a great demonstration of how data flows through an SDR and what you can do with it.
My learning is more focused on the tool itself. First, I found that even though Windows is not officially supported, GNURadio Companion downloads, installs and runs in Windows 10 very easily. Everything sets up quite nicely if you use the binary installer. Just make sure that you have also installed the RTL-SDR driver, as well.
Second, GNURadio seems solid. No flaky crashes or strange behaviors. Quite a bit of error checking is done for you, such as making sure blocks are properly connected and data types are matched properly. The GUI components are quite mature and, although not fancy, work as promised. The automated code generated compiles quickly and runs without putting much load on my first generation i7 CPU at 12%.
Finally, documentation is very rudimentary. It is geared more towards developers and hackers, rather than new users. Some of the blocks have documentation which helps a bit. If all of this is brand new to you, rely on a cookbook approach at first. Find someone else’s design, play with it, and modify it, learning as you go. Fortunately, there is tons of GNURadio information on the Internet.
Mr Fallows, thank you so much for the GNURadio FM Receiver video. I’m quite new to HDR and it has helped immensely to have each step explained in as much detail as possible. I built the receiver manually, rather than use the link to grc code, in order to use my new knowledge to fix my mistakes. I’m using a HackRF so I used the osmocom source instead and it works wonderfully! I’m moving on to your “GNURadio Amplitude Modulation Receiver” article right now after I take a break.
Thanks for feedback, Chris. Good on you. Would love to hear more about your HackRF when you have time and the things you are doing with it! Cheers, John
Hello John.
I’m working in a project about FM receiver on GNU Radio. I’m novel with SDR world and I think I need help to understand how every block works and its documentation.
Although I watch your video in Youtube, do you have another document with more specific information about this project?
On the other hand, I tried to make this FM receiver on Ubuntu 16.04 and it sounds like a robotic voice with noise. I tried to change the down_rate for fixing the problem but It keeps the robotic voice, what would you recommend me?
Thanks.
I will contact you directly and see if I can help.
Hello John,
I have the same case, I am really knew to sdr and this whole domain (I am mainly a programmer) and I have gnuradio installed on ubuntu 18.04 and the fm receiver sounds like a robotic voice (strange sound).
Thanks.
Hello John,
I downloaded your .grc file and opened it in in gnuradio, then executed the flow graph.
Yet i only get strange noises.
Note: I changed the frequency variable + I have gqrx downloaded and it works fine, but gnuradio fm receiver isn’t working.
Thanks in advance and for the tutorial (Y)
Not sure. Check the sample rates and conversions. All I am using is a plain RTL-SDR source. Maybe someone else has an idea?
After few searches, the problem was from the vm, I then tested it on the main os and it worked fine 🙂 Thanks man (Y)
I’m having a similar problem here. I am running GNURadio on a RaspberryPi 4. I thought this little Pi had enough processing power to run GNU Radio, but perhaps not. I first tried deleting the FFT widgets. When that didn’t work, I replaced the WX slider widgets with QT range widgets, but that didn’t do anything either.
gqrx and CubicSDR run fine on this RPi4, but of course, they’re compiled programs. Maybe the RPi 4 just doesn’t have enough ooomph to run the python in real time. Any thoughts?
Hi Dan,
My RPi4 sound device (HDMI 0) requires the audio sink block to have 2 inputs connected. Otherwise, the error is “audio_alsa_sink set_channels failed.”
GNUradio runs fine.
Read through the console output for error messages. Start off with the fewest components, like a source and a gui only, and see if it runs.
Good luck, eight months later,
Sto
Dear John, Thanks a lot for your valuable code. Your GRC Blocks works fine and i am able to receive local FM Radio Stations clearly. Now i tried to receive the signals from my HT Beofeng UV5R at the frequency 136.025Mhz, i am able to receive but the audio output is very very low and it is distorted. Can anyone please tell what i have to change in-order to receive the frequency 136Mhz to 174 Mhz. Thanks in advance…
Sorry, no idea other than check whether you are in narrow vs wideband mode.
WOW! I wondered if it would work without tweaking, since I am running Ubuntu, and you had it running in Windows. It did when I downloaded your code and entered a few stations. I have been using SDR for a few months using Gqrx to mostly listen to VHF frequencies. I installed GNU radio companion and wanted to try and figure out how to use it. Getting good quality out of it on this first try is very encouraging. Thanks for the video and the website to download the file. I was a little concerned at first watching the video as I didn’t know where to find the block that you used for the SDR RTL source.
Glad you got going okay, David. There are tons of things you can do with GNURadio and RTL stick, so have a lot of fun! Cheers, John
Any thoughts on this fm transmitter flow-graph?
https://www.dropbox.com/s/ikeqp4zsinkj6ud/TRXnbfm145Lime.grc?dl=0
It takes a signal source then goes thru a band-pass filter, then thru the WBFM Modulator, then thru a Low-Pass Filter before getting transmitted. What are these filter blocks doing? Why do you need both? I’m trying to send a fixed frequency wave (between 2khz-10khz), but the filter(s) are doing something, because by adjusting the filter parameters, I get *something* at the receiver, but just not the tone. I imagine the band-pass filter should allow for the frequency range of my sine wave (1hz-20khz), while the low pass filter after the fm modulator should be wide enough, yet can’t get it to work!
(The grc file comes from here: https://discourse.myriadrf.org/t/working-nbfm-transceiver-on-gnu-radio/1222 )