Advanced GPS voodoo with Ubuntu

rweait's picture

Several Garmin GPSes 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.


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

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.


This article was originally published on Sun, 09/21/2008 - 15:54.


No more Voodoo

I believe current versions of Ubuntu have these fixes included, so one doesn't need to apply such Voodoo magic manually any more.

Also I would use a free open source graphical program such as Viking[1] which will use GPSBabel behind the scenes in transfering data to/from a GPS device over the serial connection.
Disclaimer: I'm currently the maintainer of Viking


Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.