- Download and install X11/XQuartz first. If
you don't know what X11 is, then read about it, so you understand what you are installing.
- Install MacPorts next. Installation involves
selecting your version of OS X on the MacPorts site and downloading the appropriate PKG file. This file
contains the installer scripts and compressed installation files
that are used to install MacPorts onto your hard drive.
Remember, MacPorts is your friend here.
MacPorts is a package manager. If you don't know what a package manager is, then
check out this link to get up to speed:
Terminal 101: Using MacPorts and Homebrew
- After successfully installing MacPorts, open a Terminal and type:
echo $PATH
After typing this command, I see the result:
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin
Verify that /opt/local/bin:/opt/local/sbin is in your PATH (like that above).
If you don't see /opt/local/bin:/opt/local/sbin in your PATH,
then you will have to add it manually.
Why? Because MacPorts is going to save executables in the /opt/local directory by default.
When you run a command
from the Terminal (i.e. the shell),
the shell looks for the executable file using the directories listed in your PATH variable
as a map.
For convenience, adding directories to this environment variable means you do not have
to be in the directory of the executable itself, each time you run it from the Terminal. Here is
a good link on the subject: What it is and How to Modify the Shell Path in OSX 10.10 Yosemite using Terminal.
If you need to add to the path, then follow the previous link's instructions for "Adding in a Permanent Location" with the command
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
- You will interact with MacPorts using the Terminal. You should be able to open
up a new Terminal and type:
port version
If you get a "command not found" error then your path is not set correctly. In MacPorts,
the word "port" refers to "portfile", which is a distribution of software that can
be compiled and installed using MacPorts. To see a list of available ports, type
the following at the Terminal:
port list
Let's check out a list of ports which contain the term "SDR" by typing the following
at the Terminal:
port search sdr
We are going to download and install four of these ports: gnuradio, gqrx,
gr-osmosdr, rtl-sdr
- Ok, let's finally install GNU Radio itself by opening the Terminal and typing the following:
sudo port install gnuradio
Look up "sudo Unix" if you don't know what the sudo command does. The installation
may take an hour or two to complete. Do not close the terminal until the installation
is finished.
Check to see if gnuradio installed correctly by typing the following in the Terminal:
gnuradio-config-info --version
This should display the version of GNU Radio.
- Let's add RTL-SDR support. Type the following in the Terminal:
sudo port install rtl-sdr
You also want the OsmoSDR RTL-SDR source block for GNU Radio Companion.
To download and install this, type the following in the Terminal:
sudo port install gr-osmosdr
For easy audio, also install a program called Sound eXchange by typing the following
in the Terminal:
sudo port install sox
- Finally, I recommend you install GQRX, which is a useful software defined radio receiver from
http://gqrx.dk. Type the following in the Terminal:
sudo port install gqrx
Take a test drive!
Congratulations! You are done (hopefully). It's time to verify that everything is
downloaded and installed correctly.
- At the command Terminal type:
gnuradio-companion
This should launch the GNR Radio Companion GUI. In the GUI, click on the little
magnifying glass icon to search for a block by name. Type "rtl", and you should
see the RTL-SDR Source available. If you see it, pat yourself on the back.
- The RTL-SDR program contains many utilities.
If you have a NooElec Brand RTL-SDR or some other DVB-T dongles based on the Realtek RTL2832U,
then
plug it into your Mac's USB port and type the following at the Terminal:
rtl_test -t
This should indicate that a device is found, followed by some other information. If you get
an error message after this, or something mentioning "abort", don't worry about it.
The key part to this test is that a device is found.
I suggest you also test out the rtl_fm utility by visiting Kyle Keen's site (he is the guy that wrote the utility)
and follow the directions on his site.
-
Finally, check out your shiney new GQRX SDR receiver by typing
the following in the Terminal:
gqrx