Skip to content

EvanKrall/homebrew-hackrf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

published

HackRF OSX Install

This will walk you through getting HackRF to work on OSX. It is really just an adaptation of the awesome collection of Homebrew recipes from Titanous for getting GNU Radio running on OSX.

Installation

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

    brew doctor
  • Add this line to your profile (ie ~/.profile or ~/.bash_profile or ~/.zshenv) and reload your profile (source ~/.profile or exec $SHELL)

    export PATH=/usr/local/sbin:/usr/local/bin:$PATH
  • 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
  • Install wxmac 2.9 with python bindings

    brew install wxmac --python
  • Install gnuradio

    brew tap robotastic/homebrew-hackrf
    brew install gnuradio --with-qt
  • Install HackRF Libraries

    brew install hackrf
  • Create the ~/.gnuradio/config.conf config file for custom block support and add this into it

    [grc]
    local_blocks_path=/usr/local/share/gnuradio/grc/blocks
  • 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

    To run:

    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.

Congratulations!!

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

##Troubleshooting

  • Matplotlib

    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"

    From Stackoverflow via @savant42

  • 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.

    This Gist is from the Homebrew FAQ

    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

About

GNU Radio Formulae for Homebrew

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%