Running headless WSPR on the Raspberry Pi

I’ve tried a few times to compile and run WSJT on the Pi in order to decode JT65 mode transmissions – I think I got close, but I ran into other issues with the soundcard configuration that has tripped me up, like configuring WSJT to listen and transmit to my soundcard’s inputs and outputs.

I’ve seen some other posts on getting WSPR running, so this looks like it’s more possible.

From going through the WSJT dependencies, I’d already installed all the libportaudio and python-* dependencies. If you’re following this from scratch through, I’d start with George Smart’s article here. To get a working config I followed George’s article first and then picked up LX3KR’s article here to get the soundcard config working – I also wanted to run WSPR in headless mode, so I picked up the steps at this point:

I’m not sure the suggestion for the .asoundrc file worked for me, as referencing the input as 2#audio and output as 3#radioconv in the WSPR.INI didn’t work.

At this point I did some guessing. When wspr starts up, it writes a list of audio devices to audio_caps file in your wspr dir. Here’s what mine looks like with my Rigblaster Advantage attached:

So I’m guessing the Rigblaster is device 0 and sysdefault is 1.

From the suggested config in WSPR.INI, it configures the in and out like this:

2 and 3 don’t seem to match up with anything I’m seeing, but since the other earlier step changed the USB sound card devices to be default, I set these instead:

Before starting up wspr I also ran alsamixer and set the vol and mic levels to be roughly 3/4 volume.
Now when starting up it looks like wspr sees my devices and off it goes:

The last few lines repeat for a minute or so then it starts reporting the actual volume level. You want to adjust the radio volume or volume on the Rigblaster so that the level is close to 0db. +/- a few doesn’t seem to make much difference.

The other values I changed are:

This is percent tx time. Leave it at 0 for rx only, otherwise change to a %age of time value that you want to send your own transmissions. I changed it to 5.

This represents the band you’re listening to, counted from the list of freq values. 600m is 1, 160m is 2 and so on.

Start it up and off you go!

Posted in Amateur Radio | Tagged , , | 2 Comments

tmux useful commands

tmux is a great alternative to screen if you’re looking for multiple virtual sessions in one terminal window.

Useful commands:

Ctrl-b c : open new session

Ctrl-b n /p : cycle next / previous through sessions

Ctrl-b % / ” : split horizontally / vertically

Ctrl-b left / right : cycle back /forward through visible split windows

Using Putty SSH, if you’re not getting line characters for the splits, change session charset to UTF8.

Posted in Tech Notes | Tagged , , | Leave a comment

Reading from the Adafruit GPS sensor on the Pi

Per instructions in the Oracle Embedded Java MOOC this week, here’s the steps to get gpsd setup to read from the sensor if it’s attached via a USB TTL cable:

sudo apt-get install gpsd gpsd-clients python-gps

ls /dev/ttyUSB* – to check what USB port we’re connected to

sudo gpsd /dev/ttyUSBx -F /var/run/gpsd.sock to start the daemon, replace x with the port number from step above

cgps -s – to run the client

Posted in Tech Notes | Tagged , | Leave a comment

Windows 8.1 update 4/8/14

I picked up the 4/8/14 Windows 8.1 update today and was pleased that the Metro apps can now appear in the ‘classic’ desktop taskbar. It still seems odd to me that Windows 8 has two distinctly different personalities – the touchscreen friendly Metro apps from the new Start screen, and the classic desktop with regular looking Windows apps. It just seems confused to me – which is it? A post-PC touchscreen OS or a classic Windows desktop? Well, now at least the two are somewhat more combined.

Rather more odd however is that this cumulative update is required if you want to continue to receive Windows Updates. Pretty sure some internal IT departments are going to be pretty annoyed with this approach – “You want updates in the future? Install every update up to this date then we’ll give you new updates”. Uhuh.

Posted in Kev's Blog | Tagged | Leave a comment

Enabling i2c on Raspbian

Add the following to /etc/modules:

Install i2c-tools:

Edit /etc/modprobe.d/raspi-blacklist.conf and remove/comment out these two lines:

Detect your ic2 interface with:

If you get this error:

Then run this first and you should be good to go:

More info here.

Posted in Tech Notes | Tagged , | Leave a comment

Disabling strict key checking on ssh

Key checking on ssh validates that the remote system you’re attempting to connect to is the same server that you connected to the last time, to help prevent the possibility that someone has hijacked the DNS name, IP, or the hardware itself.

However, some times you may want to avoid this checking. For example, I have a Raspberry Pi that I boot from multiple SD cards, but each is setup with the same IP. If strict key checking is enabled then your ssh client will prevent you from connecting when it detects a signature change. You’ll see this error:

To avoid this, edit or add ~/.ssh/config, and add:

where the IP can be the IP of the machine you’re connecting to, or you can use a * wildcard too (maybe not as secure).

If you’ve already connected and have a key in your known_hosts, then I think you need to delete this entry first, and then try with this config.

 

Posted in Tech Notes | Tagged , | Leave a comment

Raspberry Pi ARM ASM syscall notes

A few notes on useful syscalls:

SWI 0 : executes instruction based on value in R7

Write to screen: R7 = 4

Read from keyboard: R7 = 3

Posted in Tech Notes | Tagged , , , | Leave a comment

Debugging JAXB unmarshalling issues

JAXB appears to fail silently in some cases if the XML it’s attempting to unmarshall to mapped classes doesn’t have the necessary mapped properties.

You can get additional output by adding the following:

- displays information during JAXB initialization

Before you call unmarshall() on your Unmarshaller, call setEventHandler() and add a DefaultValidationEventHandler as follows:

- this will output additional failure information about missing mappings for xml elements, useful if your mapped class ends up with missing values.

Posted in Tech Notes | Tagged , , | Leave a comment

Can’t create new AVD with Android Development Tools 22.6

I haven’t done any Android development for a couple of years. I just updated to the latest ADT, version 22.6, and seems I’m run into an issue where I can’t create a new AVD. Exactly the same as this problem here. So now downloading an older version of ADT and I’ll try again.

Posted in Kev's Blog | Tagged | Leave a comment

Working split in FLDIGI

Most things are easy to work out in FLDIGI, but I just tried working a station that was working RTTY split, listening 1 up. You can certainly do this via settings on your radio but FLDIGI allows you to set different rx and tx freqs too – which is easier as it’s just point and click:

  • select the tx freq and press the ‘Lck’ button – this fixes the tx
  • clicking anywhere on the waterfall after you’ve pressed Lck now sets the receive

Don’t forget to unclick Lck when you’re done.

I got this from the manual here (funnily enough).

Posted in Kev's Blog | Tagged , | Leave a comment