Using older Garmin GPS serial interface with Debian GNU/Linux tips

I recently started geocaching a bit again and wanted to use my older Garmin Etrex Legend. I know this unit is definitely not the greatest but it worked for me 3 or 4 years ago and we usually could find the caches.

(I realize this info is already available elsewhere-I’m mainly posting it here for my own reference so I know what to do when I forget in another year or two!)

The problem is the older Garmin units use a serial connection which most modern laptops no longer support. So the first thing was to dig out my old USB to Serial-RS232 adapter. Check.

The second thing is that I have left most of my electronics, cables and tools in a trunk which is in storage on the other side of the country, so my Garmin data cable is not with me. These sell for around $40 CDN so I had to find a way to make my own adapter. This page does a good job of explaining a cheap way to build this cable yourself – only 3 wires! Here’s a couple pictures of my adapter here:

Ok, so now I can physically connect the GPS unit to my new laptop. The next part was to make GNU/Linux connect to it.

Depending on your distribution, some people report that everything just works at this point – I think people using Ubuntu have it easy! To check to see how your system is recognizing your fancy USB to serial interface, at the terminal use:

dmesg | grep USB

And look through all the USB devices that are attached for something with ‘USB to serial converter’ or something similar. It might also say something like ‘converter now attached to /dev/ttyUSB0. If so, your system has recognized your data cable and you should be ready to go.

If not, you have to tell your system what it is. My dmesg output recognized the USB device but didn’t know that it was a USB to serial convertor so I used:

sudo modprobe i2c-dev

for the USB to serial converter (I think…) and:

sudo modprobe garmin_gps

for the Garmin drivers – I’m not quite sure if I needed the garmin_gps driver…it was a lot of trial and error and finally dmesg started giving me the messages I thought were correct.

Should be good to go? Well not quite. First we need some software. There are actually quite a few programs available to GNU/Linux users. I haven’t had time to really test them all out (after this post!),  but to get your started, GPSBabel was giving me the best output when trying to figure out how to connect the unit. GPSBabel has a GUI front end which made it a little easier for me – it’s called GPSBabelfe and it’s available in the standard repositories. I think a program called Viking is better for GPS management within GNU/Linux, but it wasn’t giving me much output when I tried to connect.

So I installed GPSBabelfe and to test the connection, I set the program to take it’s input from the device and save it to a file called ‘test’. Where it says ‘device name’, you have to remember what dmesg told you above. (/dev/tty…) Then I got an error stating:

[ERROR] XSERIAL: Cannot open serial port ‘/dev/ttyUSB0′: Permission denied

What does that mean? Well I’m not quite sure but I think it’s a Debian thing. Since it’s more secure than other distributions, I think Debian limits the use of certain connections to root only, since the program worked under root. To use it as a regular user, I had to include myself in the dialout group – whatever that means. I used:

adduser [userName] dialout

This page is where I read how to do that part. And that’s all – it works! Now to learn how to use GPSBabel and Viking to load the maps and waypoints I want!

Bookmark the permalink.

Leave a Reply