Warning: Declaration of Suffusion_MM_Walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = NULL, $id = 0) in /home/choste/public_html/press/wp-content/themes/suffusion/library/suffusion-walkers.php on line 17
Jul 292015

Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/choste/public_html/press/wp-content/plugins/papercite/papercite.php on line 205

Buadline is an interesting DSP tool for signal inspection and analysis.  Unfortunately, the OSX image is a little old (looks like the current release; 1.08; is from 2010), but works just fine.  Well, sort of.  It turns out, the baudline application is not linked to X11 libs where I have them installed.  I use macports, and I have XQuartz since Apple decided to stop officially support the X window server.  Here is what happened when I installed baudline and attempted to run it:

$ /Applications/baudline.app/Contents/Resources/baudline
dyld: Library not loaded: /usr/X11/lib/libXp.6.dylib
  Referenced from: /Applications/baudline.app/Contents/Resources/baudline
  Reason: image not found
Trace/BPT trap: 5
Sterlings-MacBook-Air:project2 sterling$ otool -L /Applications/baudline.app/Contents/Resources/baudline
    /usr/X11/lib/libXp.6.dylib (compatibility version 9.0.0, current version 9.0.0)
    /usr/X11/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0)
    /usr/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
    /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 32.0.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.18.0)

Not so great, but I found this blog post that shows how you can relink binaries in OSX: How To Relink OSX Binaries

I felt like there should be a nice, automatic script that could just fix this, but I ended up just relinking each dylib in turn, like this:

$ install_name_tool -change /usr/X11/lib/libXp.6.dylib /opt/X11/lib/libXp.6.dylib /Applications/baudline.app/Contents/Resources/baudline

That was the magic sauce that made it work.

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
-DGR_PYTHON_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages ..

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.