Bringing your Garmin GPS to Linux: Part 1

Interacting with your hiking/personal Garmin GPS unit in Linux can be simple and rewarding.  However, getting started takes a lot of work behind the scenes.  This tutorial requires you to execute terminal commands and modify read-only files, so it is for intermediate to expert users only.  Before beginning, make sure that the following packages are installed: gpsd, gpsbabel, and garmindev.

The first thing to do is connect your GPS via USB, and make sure that Linux has recognized your GPS.  The easiest way to do that is to execute the following command:
dmesg

This command will show a list of system messages.  The last few on the list should be related to the connection of your GPS device.  My Garmin, an eTrex Venture HC, gives the following messages, indicating that it is connected to /dev/ttyUSB0:
[30206.209794] garmin_gps: v0.33:garmin gps driver
[30282.227125] usb 2-2: new full speed USB device using uhci_hcd and address 3
[30282.357447] usb 2-2: New USB device found, idVendor=091e, idProduct=0003
[30282.357455] usb 2-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[30282.364664] garmin_gps 2-2:1.0: Garmin GPS usb/tty converter detected
[30282.365055] usb 2-2: Garmin GPS usb/tty converter now attached to ttyUSB0

At this point, the GPS should be up and running.  Unfortunately, you don’t have permission yet to interact with the GPS.  So the next step is to set up device permissions.  Create a file in /etc/udev/rules.d called 51-garmin.rules which contains the following line:
SYSFS{idVendor}==”091e”, SYSFS{idProduct}==”0003″, MODE=”666″

Now disconnect your GPS device and run:
udevadm control –reload-rules

(that’s a double dash before reload, not an emdash – sorry for any confusion)

The next time you connect your GPS, it should have the correct permissions, allowing you to interface with the GPS.

Coming up in Part 2: enabling and disabling the Garmin kernel driver.

(tested on Fedora 14, results on other distros may vary slightly)

Comments are closed.