HackRF OSX Install
These steps have been tested on Mountain Lion 10.8.4 with Xcode 4.6.3. It is probably a good idea to make sure all OSX updates have been applied and Xcode is up to date. Also, probably good to install the Xcode command line apps as explained over atStackoverflow.
Install Homebrew if you haven't already
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
or if you already have it installed, update and upgrade everything:
brew update brew upgrade
After that is done run the following to make sure you have no issues with your setup, cleanup anything it catches
Add this line to your profile (ie
~/.zshenv) and reload your profile (
Install the python package prerequisites
brew install python gcc swig
Install the prerequisite python packages
pip install numpy==1.5.1 Cheetah lxml pip install https://github.com/scipy/scipy/archive/v0.12.0.tar.gz export PKG_CONFIG_PATH="/usr/X11/lib/pkgconfig" pip install https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.2.1/matplotlib-1.2.1.tar.gz
wxmac2.9 with python bindings
brew install wxmac --python
brew tap robotastic/homebrew-hackrf brew install gnuradio --with-qt
Install HackRF Libraries
brew install hackrf
~/.gnuradio/config.confconfig file for custom block support and add this into it
Install HackRF & RTL-SDR related blocks
brew install rtlsdr gr-osmosdr gr-baz --HEAD
If you want a graphic interface to play with your HackRF, GQRX is great To install it:
brew install --HEAD gqrx
And then configure it to use the HackRF. Probably best to start the sample rate at 1000000 until you know how much your system can handle.
Everything should now be working. It is time to give it a try! Below are some of the programs you can try
gnuradio-companion osmocom_fft -a hackrf
If you get the following type of errors installing matplotlib:
error: expected identifier or '(' before '^' token
Try the following:
export CC=clang export CXX=clang++ export LDFLAGS="-L/usr/X11/lib" export CFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2"
Uninstall Homebrew If you think you have some cruftiness with Homebrew, this Gist will completely uninstall Homebrew and any libraries it may have installed. Of course if you are using Homebrew for other things you could make a mess of your life.
Then finish the clean-up with these steps
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup rm -rf /Library/Caches/Homebrew rm -rf /usr/local/lib/python2.7/site-packages