Just GPSBabel

A while ago I posted my frustrations with running GSAK on Linux, and how I’d found a way of getting the function to send to my Garmin 60CSx to work.

I thought I owed an update to anyone who read that to say I gave up on GSAK and now just use GPSBabel from the command line. Here’s the script I run:

#!/bin/bash

GPXZIP=$1
NAME=`echo $GPXZIP | cut -f1 -d.`

unzip $GPXZIP
GPXFILE=`ls *.gpx`
for FILE in `echo $GPXFILE`; do
    gpsbabel -i gpx -f $FILE -o garmin -F usb:0
done

I called the script ‘sendtogarmin.sh’. I saved it in the directory where I save all my pocket queries are stored as zip files. When it comes to load them, I just hook up the Garmin and then run:

sudo ./sendtogarmin.sh pquery.zip

Works for me, but I never bothered with using GSAK for much more than sending the pocket queries – I’m not at the stage yet where I feel I have to create complicated queries to get a good caching experience.

GSAK and GPSBabel

I run Ubuntu and predictably there’s a derth of support for Geocaching on Linux based systems. It’s not that there isn’t open source alternatives – it’s just that they’re not quite designed for caching.

A truly great piece of shareware for Geocaching on Windows is GSAK, but there is no official Linux version and after 21 days you get a nag screen unless you pony up for the registered version. So imagine my surprise to find that GSAK relies upon an open source technology called GPSBabel to do the actual leg-work of exporting data to your device from your OS.

Basically GSAK is the glossy database that goes over the top – and it is a fine tool don’t get me wrong. Anyway I found a way to make GSAK work on Linux, by replacing the gpsbabel.exe file with an executable script named “gpsbabel.exe”. The original info I got from the GSAK forum provided by alancurry.

alancurry’s script didn’t work exactly, I had to make some tweaks:

#!/bin/bash
case “$1” in
-i)
gpsbabel -i garmin -f usb:0 -o gpx -F “$HOME/.wine/drive_c/Program Files/gsak/Temp/babel.gpx”
exit 0
;;
-N)
gpsbabel -N -i xcsv,style=”$HOME/.wine/drive_c/Program Files/gsak/GSAK.STL” -f “$HOME/.wine/drive_c/windows/profiles/{username}/Application Data/gsak/babel.txt” -vs -o garmin -F usb:
exit 0
;;
*)
;;
esac

I then saved this script as “gpsbabel.txt” in “$HOME/.wine/drive_c/Program Files/gsak/”.

Right now, after using it for 100+ days I’m getting bothered by the nag screen (‘The GSAK Spouse’), but I’m not going to pay and register it and there are a few reasons for this:

  • The developer appears to have no intention of supporting Linux.
  • Since it’s buggy under wine (crashes often) I only use it to load PQs and export them to my GPSmap 60CSx, I don’t save the data – I usually wipe it and start over each week.

So now I’m thinking of finding a quicker way to access the GPX file from the command line, order it like GSAK does and then export directly without having to load up a buggy, nagging GSAK UI.

If I find a way to make it work, maybe I’ll post it as an open source project and invite others to contribute. I’ll need to if I was to try and build a GUI since I know nothing of GUI development.