Sunday, September 8, 2013

GNU Radio, RTL-SDR, and Mac OS X

I first used GNU Radio over a year ago while running Ubuntu Linux on my old Dell E1505 Inspiron laptop. I paired it with the ezcap TV301U DVB-T dongle and the RTL-SDR software, however the performance was lackluster on the older computer. I eventually ditched the Dell and moved on to a MacBook Pro. Since the OS X operating system is ultimately Unix-based, I thought that there had to be a way to get GNU Radio and RTL-SDR working on a Mac.

MacPorts to the rescue. I first tried to install GNU Radio with Homebrew, but the results were very disappointing. While I like Homebrew's setup better than MacPorts, the maintenance of its packages was very poor with regards to GNU Radio and its many, many dependencies. I quickly ditched Homebrew and installed MacPorts. While I can't say that it installed "out of the box", it was a much smoother process than Homebrew and it actually worked.

With everything up and running, I thought I would design a VHF Airband receiver in GNU Radio. Using the osmocom Source at 2.048 M/s, I sent the samples to a WX GUI Waterfall Sink, WX GUI FFT Sink, and a Low Pass Filter. With 25 kHz spacing typical of the Airband, the low pass filter was set to a cut off frequency of 10 kHz with a 2.5 kHz transition width. The low pass filter also decimates by a factor of 64, for a new sample rate of 32 k/s, and sends the samples to an AGC block and thence to the AM Demod with a passband of 6 kHz. Lastly, the demodulated signal is sent to an Audio Sink for our listening pleasure. For the GUI, I added a WX GUI Text Box for frequency control and a WX GUI Chooser for RF gain.

With the DVB-T dongle connected and the discone antenna set up outside on an 8 foot painter's pole with a 50 foot length of RG-58/U (not the greatest choice for VHF), I fired up the software radio and tuned to 134.750 MHz, the frequency of the local airport's ASOS, about 5 miles away. Success!

You'll notice that the FFT and waterfall do not move together. This is purely a result of recording the screen with QuickTime while at the same time dealing with the high load of GNU Radio and RTL-SDR. When QuickTime is not recording, the FFT and waterfall move smoothly.

Now that GNU Radio works flawlessly on OS X, it's time to start saving my money for an Ettus Research USRP B200. Until then, let's start experimenting!


  1. After installing the rtl-sdr blocks, how did you make gnuradio find them? I am stuck on this step. All the linux step by step instructions have a ldconfig to configure the libraries but that does not exist on mac.

  2. Dan, my apologies for the late reply. I am currently deployed and it's difficult for me to access my site. I installed GNU Radio and the RTL-SDR blocks using Macports. Everything was taken are of by the use of that method. Let me know if you need help there and I can point you in the right direction.

  3. Thanks for the reply. I finally got it to work by finding a mac port that had everything including the blocks in it so that i didn't need to do any config editing to glue it together.