WSPR on a Raspberry PI

I am trying to work through the magical process of getting WSPR installed on a current Raspberry PI OS image. Clearly this is a complex process as I have burned up an entire weekend and not been completely successful. I have found a couple of approaches that get close... but this is not horse-shoes or hand grenades so that is not close enough.

Image: 2014-12-24-wheezy-raspbian.zip
WSPR branch release: 4903
References: 
         http://blogzs1jen.dyndns.org:83/category/raspberry-pi-tx/
         https://groups.yahoo.com/neo/groups/WSJTgroup/conversations/messages/13134
         http://blogzs1jen.dyndns.org:83/category/raspberry-pi-tx/

After some testing I came up a semi-refined process. I used that base OS image, configured the basic setting for the RPi & Wifi with no extra packages and then created an image of that config that I could deploy & redeploy on multiple 16gb SD cards to refine my process. I also documented EVERY step as I went so that I had some detailed notes. (My engineer / architect background from my day job might have popped out as I tackled this process)

A couple of key themes came up as I tried different approaches that I saw documented on the internet.

  • The Python PIL package has an issue and it is not clear if PILLOW is the fix or not
  • The F2PY path and version can be an issue especially with F2PY3.2
  • There seems to be some complications between Python 2.7, 3.2, and 3.4
  • There is an issue with python-imaging-tk depending on the install order & versions
  • There is an issue with python3-dev depending on the install order & versions
  • There is an issue with jackd2 related to needing to see the speed of the CPU in a text string

My current steps:

  1. sudo -i  (so that you don't have to run sudo for every command)
  2. apt-get remove python-numpy -y
  3. apt-get install python3-numpy autoconf gfortran libsamplerate0-dev cl-fftw3 libhamlib-utils libportaudio2 python3-dev -y
  4. nano /etc/apt/sources.list
  5. Comment out: deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
  6. add:  deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
  7. Save it
  8. apt-get update
  9. apt-get install python3-pil
  10. apt-get install libjack-jackd2-0
  11. nano /etc/apt/sources.list
  12. Comment out:  deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
  13. Un-comment: deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
  14. apt-get update
  15. apt-get install python-imaging-tk
  16. apt-get install python-pmw
  17. apt-get install portaudio19-dev
  18. apt-get install subversion
  19. svn co https://svn.code.sf.net/p/wsjt/wsjt/branches/wspr
  20. cd wspr
  21. ./autogen.sh
  22. make
  23. sudo make install


To redo to the process you can run:

  1. make clean && make distclean &&  ./autogen.sh 

  2. make && sudo make install

Using the steps above I am currently stuck in the midst of step 22. The output of that sub-step is shown below:

RUN F2PY w.so
--------------------
/usr/bin/f2py3 -c --quiet --fcompiler=gnu95 --f77exec=gfortran --f90exec=gfortran \
--opt="-cpp -fbounds-check -O2" thnix.o   -lfftw3f -lgfortran -lportaudio -lpthread -lsamplerate  libwspr.a -m w wspr1.f90 getfile.f90 paterminate.f90 audiodev.f90
rmbadname1: Replacing "len" with "len_bn".
{}
{'attrspec': ['intent(in)']}
{'attrspec': ['intent(in)']}
    Building module "w"...
        Constructing wrapper function "wspr1"...
          wspr1()
        Constructing wrapper function "getfile"...
          getfile(fname,len_bn)
        Constructing wrapper function "paterminate"...
          paterminate()
        Constructing wrapper function "audiodev"...
          inbad,outbad = audiodev(jdevin,jdevout)
    Wrote C/API module "w" to file "/tmp/tmpn9wngzym/src.linux-armv6l-3.4/wmodule.c"
    Fortran 77 wrappers are saved to "/tmp/tmpn9wngzym/src.linux-armv6l-3.4/w-f2pywrappers.f"
cc1: error: unrecognized command line option ‘-fstack-protector-strong’
cc1: error: unrecognized command line option ‘-fstack-protector-strong’
error: Command "arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/tmpn9wngzym/src.linux-armv6l-3.4 -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.4m -c /tmp/tmpn9wngzym/src.linux-armv6l-3.4/fortranobject.c -o /tmp/tmpn9wngzym/tmp/tmpn9wngzym/src.linux-armv6l-3.4/fortranobject.o" failed with exit status 1
Makefile:162: recipe for target 'WsprMod/w.so' failed
make: *** [WsprMod/w.so] Error 1

 

I have tried a couple of other recipes based upon those links at the top of this post but they all had some pretty complex issues with PIL/Pillow and versioning that I was unable to completely resolve. 

It is a bit disappointing that there is a WSJT package (deb) for the Raspberry PI that seems to work without all of this non-sense but not for WSRP. This level of complexity and time commitment is beyond what many ham radio operators (and builders) really want to invest since it is a software issue.

I would love to get this resolved as I think that it would be fun to use my Raspberry PI as the platform for digital mode operations in my shack. Yes, I have more powerful computers with more full featured operating systems but that is not really what I want. I was thinking of the RPi + FLDigi + WSPR +WSJT tied my Elecraft K2 or something similar in a dedicated position in my shack away from the other operating positions. Digital + QRP (5 watts or less) seems like a good use the RPi.

Hopefully these notes help someone else to get WSPR running on a RPi with a current OS stack. I will keep playing but it is hard to think that I will spend this much time on again anytime soon.

73 de NG0R