rtl-sdr build notes for OSX
- based on notes from https://gist.github.com/jheasly/9477732
- using macports http://www.macports.org/
- see http://sdr.osmocom.org/trac/wiki/rtl-sdr
sudo port install cmake
sudo port install libusb
sudo port install pkgconfig
sudo port install sox # for easy audio
git clone git://git.osmocom.org/rtl-sdr.git
export LIBRARY_PATH=/opt/local/lib
cd rtl-sdr/
mkdir build
cd build/
cmake ../
make
sudo make install
By default this will install into /usr/local
. If you don't have /usr/local/bin
in your PATH
environment variable:
export PATH=$PATH:/usr/local/bin
If you don't want /usr/local
used, then you can specify the alternativae based path prior to running the cmake
command by setting the CMAKE_INSTALL_PREFIX
environment variable. Be sure the build
folder is empty prior to running the cmake
command.
Now we will test, but first ensure your RTL-SDR device is connected:
rtl_test -t
On my Mac (2019 16" MacBook Pro, running macOS 10.15.3, aka Catalina) this gave me:
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Terratec T Stick PLUS
Found Elonics E4000 tuner
Supported gain values (14): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0
Sampling at 2048000 S/s.
Benchmarking E4000 PLL...
[E4K] PLL not locked for 52000000 Hz!
^CSignal caught, exiting!
[E4K] PLL not locked for 2211000000 Hz!
[E4K] PLL not locked for 1106000000 Hz!
[E4K] PLL not locked for 1247000000 Hz!
E4K range: 53 to 2210 MHz
E4K L-band gap: 1106 to 1247 MHz