Jul 092015
 

I’ve been getting more and more interested in GNU Radio after learning about SDR (Software Defined Radio).  Since it is easy and cheap to get an SDR receiver ($20), the investment cost is low and the value high for investigating interesting radio signals.  I started by using gqrx, which allows one to do the most common listening, AM, FM, USB, CW, and so on.  It is a pretty neat app that depends on GNU Radio under the hood to do its magic.

Because gqrx doesn’t do much with packet radio, I decided I would try to either download a packet modem, or write one.  There are many available, so writing one only makes sense now if you are trying to do something new or clever aside from pure academic reasons.  I found the OOT (Out of Tree) module called gr-bruninga, which is a 1200 baud afsk packet decoder, but when I tried to compile and install it, I could not use it.

Turns out, GNU Radio uses cmake for the build process, which is good because it is super configurable and does a pretty good job of auto-configuring correctly.  Additionally, GNU Radio has a good tutorial for how to write an OOT module, but their cmake scripts do not correctly detect the intricacies of how python and GNU Radio is installed by MacPorts.

Good News, this email archive provided the exact answer necessary, and all that needs to be done is pass in the parameters for cmake setup:

mkdir build
cd build
CC=/usr/bin/gcc CXX=/usr/bin/g++ cmake -DPYTHON_EXECUTABLE=/opt/local/bin/python2.7
-DPYTHON_EXECUTABLE=/opt/local/bin/python2.7
-DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Headers
-DPYTHON_LIBRARY=/opt/local/Library/Frameworks/Python.framework/Python
-DSPHINX_EXECUTABLE=/opt/local/bin/rst2html-2.7.py
-DCMAKE_INSTALL_PREFIX=/opt/local
-DGR_PYTHON_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages ..
make

At which point a ‘make install’ will put all the files in the correct places for you.  Don’t worry if you mess it up, GNU Radio was kind enough to create a boilerplate ‘make uninstall’ target, so you can run that instead of the ‘sudo xargs rm < install_manifest.txt’ hack.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>