Make your Garmin speak Ubuntu


Several Garmin GPS receivers work well with Ubuntu as a mass USB storage device. Navigating the menu to enable the mass USB device can be a bit of a headache. Here is an alternative that takes less fumbling with the joyclick on the Garmin and that does a better job of grabbing the data.

gpsbabel does many wonderful and magical things for us as far as format conversion, but also can handle communication with the device for us. For example this tip from txwikinger:
gpsbabel -t -w -i garmin -f usb: -o gpx -F yourfilename.gpx

Will grab tracklogs and waypoints from your Garmin device.

But we can tweak the Ubuntu setup to make it simpler still. Depending on your Ubuntu version, consider enabling access to the Garmin for a non-privileged user, and disabling the default USB handler for Garmin devices.

If
sudo gpsbabel -t -w -i garmin -f usb: -o gpx -F yourfilename.gpx

give you an error similar to
usb_set_configuration failed, probably because kernel driver 'garmin_gps'
is blocking our access to the USB device.
For more information see http://www.gpsbabel.org/os/Linux_Hotplug.html

you’ll want to follow the steps from the listed site. Here are their steps that worked for me on Gutsy.

Disable the default USB module garmin_usb by adding it to the blacklist. Add the following to /etc/modprobe.d/blacklist
# stop garmin_gps serial from loading for USB garmin devices
blacklist garmin_gps

You’ll need to rmmod garmin_usb.

You should now be able to run gpsbabel as root / sudo. This next step allows unprivileged users to access the Garmin.

Create /etc/udev/rules.d/51-garmin.rules containing
SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666"

You’ll get waypoints as well as track files and you you should be able to get at your Garmin as your regular user. Nice.

Now, what if you want to go mapping at night? You’ll want to keep an eye on where you put your GPSr when you stop for a break. My buddy, John, uses these awesome LED lights to keep track of his gear when he goes Night Geocaching. He even sells them.

They’re pretty slick and you’ll want one of these LED lights to gussy up your Garmin.

This entry was posted in Basics and tagged , , , , . Bookmark the permalink.