Git Product home page Git Product logo

homebrew-gnuradio's Introduction

homebrew-gnuradio

This is a collection of Homebrew recipes that makes it easier to get GNU Radio, GQRX, HackRF, RTL-SDR and BladeRF running on OS X.

Installation

These steps have been tested on Mac OS X Yosemite 10.10 with Apple Command Line Tools 6.2.

  • Install Homebrew if you haven't already

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    or if you already have it installed, update and upgrade everything:

    brew update
    brew upgrade
  • After that run the following commands to make sure you have no issues with your setup, cleanup all warnings

    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 command line tools for XCode

    xcode-select --install
  • Install the prerequisite python packages

    pip install numpy 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 with python bindings

    brew install wxpython
  • Add homebrew tap

    brew tap storvik/homebrew-gnuradio
  • [optional] install UHD driver (--HEAD can be added to install from github

    brew install ettus-uhd

Note: Has to be done before installing gnuradio.

  • Install gnuradio

    brew install gnuradio --with-qt
  • [optional] install hackrf libraries, so gr-osmosdr detects it during build

    brew install hackrf --HEAD
  • [optional] install bladerf libraries, so gr-osmosdr detects it during build

    brew install bladerf
  • [optional] install rtlsdr libraries, so gr-osmosdr detects it during build

    brew install rtlsdr --HEAD
  • Install blocks that are needed to connect real hardware (rtl-sdr, hackrf, bladerf) to gnuradio

    brew install gr-osmosdr gr-baz --HEAD
  • Create the ~/.gnuradio/config.conf config file for custom block support:

    mkdir ~/.gnuradio
    vim ~/.gnuradio/config.conf

    Add these lines into file otherwise gnuradio is unable to locate blocks from gr-osmosdr and gr-baz:

    [grc]
    local_blocks_path=/usr/local/share/gnuradio/grc/blocks

    gnuradio-companion shows lot of duplication warnings after that - this is normal. Everything is installed correctly if osmocom Source and RTL-SDR Source blocks are available inside GNU Radio Companion.

  • Install Gqrx for scanning frequencies and viewing waterfall

    brew install gqrx --HEAD
    brew linkapps

Gqrx is installed under Applications and can be started as usual Mac application.

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

##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

  • gnuradio-companion

    Probably gr-baz.rb is built against System's Python if gnuradio-companion crashes with the following error:

    Warning: Block with key "xmlrpc_server" already exists.
    Ignoring: /usr/local/Cellar/gnuradio/3.7.5.1/share/gnuradio/grc/blocks/xmlrpc_server.xml
    Fatal Python error: PyThreadState_Get: no current thread
    Abort trap: 6

    I had this error, now it is fixed with this commit.

  • 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

homebrew-gnuradio's People

Contributors

titanous avatar edy555 avatar andresv avatar tehmaze avatar mjmdavis avatar wcummings avatar jcftang avatar ksnieck avatar mborgerson avatar robotastic avatar barabanus avatar masto avatar

Watchers

Petter S. Storvik avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.