Introduction
A few years ago I bought a Garmin eTrex Legend HCx. This article records my experiences with the device including terminology, procedures and Linux compatibility.
Terminology
GPS coordinate: representation of a geographical location in numeric format, specified as degrees north of the equator and east of the Greenwich meridian (e.g. N40.829656,E-73.926198)
GPS receiver or just GPS: the equipment (e.g. Garmin eTrex Legend HCx) for receiving GPS data (e.g. the device's current GPS coordinates, its current altitude)
point of interest or POI: a geographical location which is of general interest (e.g. the Kempinski Hotel Munich, the police station on the Boulevard du Palais on the Ile de la Cite, the Natural History Museum in London, the Volpetti Rosa pizzeria in Rome)
waypoint: a geographical location which is on a route; this is normally a POI or a more personal point of interest (e.g. corner of School Street and Province Street in Boston, your friend's house, the peak of Mount Everest, N52.524183,E13.412437)
map: data about a region; it includes locations of roads, altitude information, POIs
basemap: a basic map that comes preloaded on the receiver; it is not deletable; the lack of detail on the map means it is pretty useless unless you're making a long intercity journey (see http://www8.garmin.com/include/basemaps/atlantic_recreational.html)
route: a manually or automatically calculated set of instructions for getting from somewhere to somewhere created before a journey
manually calculated route: a route where the set of instructions is defined by a person. Typically, this involves creating a sequence of waypoints (perhaps at road junctions)
- downloading from the internet a track that somebody else has done and using software to convert it to a route
automatically calculated route: a route where the set of instructions is defined by a computer (e.g. MapSource, Google Maps) or by the GPS. Typically this involves requesting the computer or GPS to calculate a route from the start waypoint to the end waypoint (e.g. from Paris, possibly via Zurich to Prague or from home, possibly via the dentist's surgery, to work)
track: location data created during a journey (e.g. now, at 4pm the device is at N52.52344,E13.411399 and now, at 4pm and 10 seconds it is at N52.523788,E13.4119 and now at 4pm and 20 seconds it is at N52.524183,E13.412437, etc).
navigation mode: the method by which the route between the waypoint on a route are calculated; note that even in a manually calculated route navigation mode is still relevant
off-road navigation mode: straight lines are drawn between the waypoints on a route on the map; it is assumed this is enough for your purpose (e.g. you might specify enough waypoints so as not to need more than straight lines
follow-road navigation mode: the GPS will calculate the route between waypoints using roads; if no roads are available then it will tell you to turn back so that it might approach the next waypoint from another direction
MapSource: Garmin's software for browsing maps, preparing routes, transferring maps, routes, waypoints to and from the GPS
Americas, Atlantic or Pacific Recreational: Garmin's base maps
Trip & Waypoint Manager: Garmin's MapSource software and one of Garmin's base maps bundled together on CD and distributed with the GPS
Procedure: Firmware upgrade
- Insert the SD card
Put the device into "USB storage" mode (System->Interface->USB storage)
- Attach the device to a Linux box and check of the GPS is seen as a new drive of the correct size.
- If it is then the firmware does not need to be upgraded.
- Attach the device to a real Windows system (not Wine)
- Perform a firmware upgrade.
Procedure: Granting access to the hardware
Attach the device and run:
lsusb | grep -i garmin
and note the vendor and product IDs (these are the four digit numbers on either side of the colon, respectively). In what follows, we'll assume those IDs are '091e' and '0003', respectively.Edit /etc/modprobe.d/blacklist.conf and if the following line is not already present then add it:
blacklist garmin_gps
Edit /etc/udev/rules.d/51-garmin.rules to contain the following:
SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", GROUP:="plugdev", MODE:="660"- If you are not already in the 'plugdev' group, then edit /etc/group and add youself to it.
Reboot (or log out and in again to have your login processes added to the supplementary groups and run:
udevadm control --reload-rules
but honestly, it's easier just to reboot.)
Procedure: Installing MapSource
Insert "Trip & Waypoint Manager" CD-ROM or mount its ISO image.
- Attach the GPS and put it in USB storage mode; wait until Linux has automatically mounted the device and you can browse it in a file browser.
Run:
winecfg
and set:- the Windows version to 'Windows XP'
the drive type to 'floppy' (failure to do this will result in the Wine seeing the drive, but MapSource software not seeing it when run on newer versions of Wine!) as illustrated here:
Run:
cd <mountpoint-of-cd-or-iso-image> wine Setup
At the "Trip & Waypoint Manager" window, click "Install Trip & Waypoint Manager". If the following error message appears:
torchio$ wine Setup err:msi:copy_package_to_temp failed to copy package L"TWPT_ENU.msi" fixme:msi:MSI_OpenDatabaseW open failed r = 80030002 for L"TWPT_ENU.msi"
or
wine: cannot find L"D:\\Setup.exe"
then just exit and rerun:
wine Setup
- At the "Trip and Waypoint Manager v4 Setup" window, when prompted "Welcome ...", click "Next".
- At the "Trip and Waypoint Manager v4 License Agreement" window, when prompted "SOFTWARE LICENSE AGREEMENT", tick the "I accept the Software License Agreenent" checkbox, and click "Next".
- At the "Trip and Waypoint Manager v4 Setup" window, when prompted "Installing to the default location ...", set the installation directory to C:\Garmin (under Debian squeeze I found that drive C: could not be seen despite it having been correctly set up by winecfg earlier and I had to set the installation directory to it explicitly ... twice!) (Failure to set it to C:\Garmin will cause a lot of registry-based problems later) and click "Install".
- At the "Trip and Waypoint Manager v4 Setup" window, when prompted "Garmin Trip and Waypoint Manager v4 is successfully installed ...", click "Finish".
At the "Trip & Waypoint Manager" window, when prompted "... Get Adobe Reader ...", move cursor back into the terminal window from where you launched wine and press CTRL-C.
Under Debian squeeze, I found that the MapSource software was installed in ~/Garmin (which Wine called H:\Garmin) and the Trip and Waypoint Manager software (i.e. the basemap) was installed in ~/.wine/drive_c/Garmin (which Wine called C:\Garmin), despite the fact that I specified everything to be installed in C:\Garmin. To correct this I ran:
mv ~/Garmin/* ~/.wine/drive_c/Garmin rmdir ~/Garmin
(MapSource.exe seemed to be able to find all its other components without problems after this move.)
If you want to set up your window manager's or panel's menus to run MapSource then the command to run is:
sh -c 'wine ~/.wine/drive_c/Garmin/MapSource'
and here is a little icon to use:

Procedure: Installing maps from http://openstreetmap.org packaged by Lambertus
Ensure MapSource is not running.
Visit http://garmin.na1400.info/routable.php and follow the instructions there.
- Continue only once you have the following files:
- osm_routable_mapsource.exe
Run:
wine osm_routable_mapsource.exe
Start MapSource and verify that the new map appears in the pull-down menu of maps.
Procedure: Installing maps from other sources
- Different maps need to be installed in different ways.
- Regedit may be needed to load .reg files.
If regedit refuses to load a .reg file by running:
regedit <filename>
then it may be necessary to change the first line of .reg files from:
��Windows Registry Editor Version 5.00
to
REGEDIT4
or to convert from Unicode to ASCII by cat-ing the file and then using the mouse to copy it and paste it into a new file or by running:
iconv -f UNICODE -t ANSI_X3.4 <old-reg-file> -o <new-reg-file>
Unlock the maps from within MapSource.
Procedure: Pushing maps to the GPS
This procedure covers selecting which maps should go on the GPS, merging those maps into one file, transferring them to the GPS. It does not cover transferring waypoints, routes and tracks.
- Power on the GPS, connect it to the computer, and put the GPS in "USB storage" mode.
- Make sure the device is now mounted and browsable with your file browser.
Run MapSource.
- Select the map tool (either from the 'Tools' menu or from the toolbar).
- Switch to a product (either from the 'View' menu or from the toolbar).
- Use the mouse to select from the grid of maps those maps you wish to download to the GPS.
Repeat the last two steps for other products (e.g. to select south-east England and London).
From MapSource's 'Transfer' menu, select 'Send to device ...'; the device should be listed (e.g. as D:\); click 'Send'; if it is not listed then run:
winecfg
and make sure that the drive type is set to 'floppy'.- Wait. (The merging of maps and the subsequent download are quite slow; the fewer map segments you select the faster it will be.)
Procedure: Pushing waypoints and routes to the GPS
Power on the GPS, connect it to to the computer, make sure it is not in "USB storage" mode (and therefore not mounted).
Run:
gpsbabel -r -i gpx -f <gpx-file-containing-routes>.gpx -o garmin -F usb: gpsbabel -w -i gpx -f <gpx-file-containing-waypoints>.gpx -o garmin -F usb:
- If this does not work then repeat as root.
Procedure: Pulling tracks from the GPS
- On the GPS, save any tracks (ideally, do this on the same day you made the track, then it will be named after that date).
- Put the GPS in USB mass storage mode, mount the device and copy over the GPX files (don't use gpsbabel to retrieve the tracks as, for some reason, the track will only contain 500 track points) and then unmount the device.
Load each file into MapSource and delete any 1- or 2-point tracks (such as are created if the GPS starts recording tracks before it has acquired satellites).
- If any of the tracks have odd points in them (such as are created if the GPS starts recording tracks before it has acquired satellites) then right-click on the track, select 'Properties' and try to work out which point needs deleting, and then edit the GPX file and reload it).
Run the command:
gpsbabel -i gpx -f inputfile1.gpx -f inputfile2.gpx -f inputfile3.gpx ... -x track,merge -o gpx -F mergedfile.gpx
Bash's {X..Y} syntax means you may be able to use something like this:
gpsbabel -i gpx "-f donau-track-"{20110613..20110621}.gpx -x track,merge -o gpx -F mergedfile.gpxSome sites restrict the size of GPX uploads so it may be necessary to run something like this:
gpsbabel -i gpx -f mergedfile.gpx -x simplify,count=2000 -o gpx -F simplifiedfile.gpx
If you merge tracks or perform other operations using gpsbabel and try to load the resulting files into MapSource then you may encounter:
then run:perl -0777 -pi -e 's@(?<=<trkseg>\n)<extensions>.*?</extensions>\n@@ms' file-1.gpx file-2.gpx ...
which will delete any <extensions> sections which are inside any <trkseg> sections. There is no need to delete <extensions> sections which are inside <trk> sections but not inside deeper <trkseg> sections.
What they didn't tell you
- You definitely need more maps! Note that country maps don't include cities; city maps are a bundled as a separate product! E.g. I needed to install the following products:
- Topo Deutschland
- City Navigator Europe NT 2008
The maps are expensive! Check out their prices at http://www.amazon.com, http://www.amazon.de or wherever.
if you are only using the basic "Trip & Waypoint Manager" map and you are doing on-road routing, then a route from your house to the corner shop will go via the autobahn!
- Any off-road routing will go "as the crow flies" - in an absolutely straight line.
- Since on-road and off-road routing can be useful (straight lines are useful for manually calculated routes over fields and small tracks, but obviously not when you're going from Paris to Prague), it is possible to set the default routing method to 'prompted', meaning that whenever you follow a track or a route or go to a waypoint, then you'll be asked to specify if it should be on-road or off-road. I keep mine on this setting because I use both routing methods about equally.
- If you want to navigate somewhere and you have no satellite reception you'll get no instructions because the GPS doesn't know where you are; if it doesn't know where you are then it can't possibly begin to work out how to get to your destination.
When looking at the map, a quick press of the joystick creates a waypoint where the cursor is, but a long press of the joystick creates a waypoint where the GPS/you is/are.
If you move the cursor on top of a waypoint in order to get it automatically selected and click then you'll be brought into the waypoint menu (delete, show on map, navigate to). If you choose 'map' to show it on the map things look just as they did before, but now if you get the same waypoint automatically selected and click then you'll be able to move it (correct its position I mean)
- There are two sorts of compasses: magnetic compasses and GPS compasses; not all models have magnetic compasses. GPS compasses can only tell which way is north when you are moving. This means if you are standing still then north will probably wander around and you should not rely on it.
When playing games the cursor is moved by you moving with the GPS, not by moving the joystick
Remember to enable track logging before starting a journey. If you do so and then later you don't want the track you can delete it. If you don't do so and later you do want the track you're screwed.
Routes in MapSource can contain as many points as you like. Routes in the GPS are limited to 250 points.
- If you buy a mounting clip to put your GPS on your bicycle, then watch out: there is a package which includes the clip and a replacement back-panel for the GPS, but this back panel does not fit on the GPS models which have a slot for an micro SD card. If in doubt, take your GPS to the shop and and actually try it before you leave!
Review
Overall, I am extremely happy with this device and would recommend it to any cyclist, mountain hiker or city walker.
It does everything I need (I want to plan on- and off-road routes for cycling, off-road routes for hiking, get GPX data for my tracks, and use it when I get lost in a foreign city), it works reasonably well with Linux using Wine and gpsbabel, the display is bright and easy to read, a couple of its screens can be configured to display the information you prefer (e.g. on one screen I have a large compass/heading-arrow and current time and on another display I have time to next waypoint, distance to next waypoint, time to destination, distance to destination, current time, current speed, ...).
One bad point is that, if this is to be your first GPS, then the documentation is woefully inadequate!
One feature i miss, and I suspect this is something not available on any GPS, is a panel indicating the heading after the next way point; I can see what heading I should be on up until the next route point, but I cannot see what my heading should be after that. Yes, I can look at the map screen but, generally I'm looking at the configurable screens (to see speed, distance covered, current time, etc).
Andy Allan wrote a good review, which is at http://www.gravitystorm.co.uk/shine/gps-recommendations/.
See also
http://www.gpswandern.de/gorp/gorp.shtml and http://www.gmap-pedometer.com/ and http://www.marengo-ltd.com/map/ and http://gpsplanner.net/ (draw routes on Google Maps and save them as GPX files, upload GPX files and have them displayed on Google Maps)
http://veloroutes.org/ and http://www.bikeroutetoaster.com/ (elevation profile plotters)
http://maps.google.com plus http://www.elsewhere.org/journal/gmaptogpx/ (convert routes calculated by Google Maps to GPX files)
http://www.mvv-muenchen.de/de/home/fahrgastinformation/mobithek/freizeit/mvv-radl-touren/ and http://www.doit-edv.de/radtouren.htm and http://www.gps-tour.com/ (cycling tours in Germany)
http://www.openstreetmap.org (free maps)
Map Products (e.g. Topo Deutschland, City Navigator Europe 2008 NT): proper maps
Wine: to run MapSource and install map products under Linux
gpsbabel: to communicate with the GPS in Garmin USB mode, to convert GPX data formats, to reduce/filter GPX data
QLandkarte: free software to replace MapSource
