Running WSPR on a Raspberry Pi 2

After receiving a Raspberry Pi 2 from Element 14 Australia, the first thing I attempted was to compile and run WSPR 3.9 with a Signalink USB Soundcard (IC-7000 with a dipole converted from a broken G5RV). I followed the instructions of G4FRE ( except for an updated URL for the SVN repository (and using revision 2840 of the WSPR code). I will try to compile and run WSPR 4 later.

The Pi 2 consumes about 35% CPU while decoding spots (see attached screenshot of WSPR 3.8 for a sample of received spots) and takes anywhere between 10 and 15 seconds for a decode. I am pretty happy with the results of running WSPR for about an hour this evening. Pi 2 is running the latest Raspbian available as an image from the official website. uname -a shows the following -

Linux raspberrypi 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux

For anyone attempting to compile WSPR, here are the steps I followed (except for one difference in the SVN repository location and code version, rest of the steps from G4FRE's blog post)

Run an update

sudo apt-get update

Install pre-requisites

sudo apt-get install build-essential subversion python2.7-dev python-numpy python-imaging-tk python-pmw libportaudio2 portaudio19-dev libsamplerate0-dev gfortran cl-fftw3 python-dev hamlib-utils

Grab revision 2840 of the WSPR source code

svn co svn:// -r2840

Configure WSPR

$ cd wspr
$./configure --with-portaudio-include-dir=/usr/include --with-portaudio-lib-dir=/usr/lib/arm-linux-gnueabihf

Force Hardware floating point processor to be used
Edit the Makefile with your favorite editor and ensure Line 5 reads as FFLAGS = -g -O2 -fno-range-check -ffixed-line-length-none -Wall -Wno-character-truncation -Wno-conversion -Wtabs -fPIC -mfloat-abi=hard and Line 9 reads as CFLAGS = -Wall -O0 -g -Wall -O0 -g -mfloat-abi=hard

Compile WSPR

$ sudo make

After compilation finishes (it took about 6 minutes on the Pi 2), you can run WSPR GUI with $ ./wspr

I connected the Signalink USB card to the Pi 2 after turning on my transceiver. aplay -l and arecord -l reported the Signalink in the list of playback and recording devices.

I am yet to try transmitting with the Pi 2, that is the next step. It is incredible to think about a $35 credit card sized capable of doing so much!

Update: Soon after I finished writing this post, I got the Pi 2 to key the transceiver and run a few WSPR cycles, first on 14Mhz and then on 10MHz.

Image icon WSPR 3.9 running on Raspberry Pi 2169.34 KB
Image icon Decoded spots 299.26 KB
Image icon The little workhorse632.29 KB