Garmin Forerunner 305 with Linux

Important Links: product website | firmware upgrades

My unit ID: 3334620240, Training Center S/N: TC42019554, # on the package: 13V036569

Key Combinations and Special Modes

  • Service Mode: Starting the FR305 up whilst pressing the [Enter] button enters the unit into a "test" sequence. source
  • Soft Reset press at the same time: [mode] and [lap/reset] (forces a "restart" of the device, source)
  • Hard Reset press the [mode] key and keep it pressed while pressing the power button for 2 seconds to switch it on. You will be asked whether to erase all user data.

Best Practices on the Command Line

With garmintools/garmin-forerunner-tools and gpsbabel

http://forum.ubuntuusers.de/topic/gpsbabel-u-garmin-forerunner-305/#post-2091512

For the installation of the needed tools, see the corresponding sections.

Get data from Forerunner as .gmn (saved to working directory):

garmin_save_runs

To import data to a program such as Sport Tracks use ./gmn2tcx from garmintools:

gmn2tcx /home/cabby/Desktop/Trainingsdaten/2009/07/20090731T124002.gmn >/home/cabby/Desktop/Trainingsdaten/2009/07/31_07_09.tcx

Damit erhält man eine tcx Datei wo auch Pulswerte usw. gespeichert sind.

Möchte man aber einen gelaufenen/gefahrenen Track auf z.B. Gpsies laden, so sollte man den Track folgendermaßen aus dem Forerunner 305 ziehen:

sudo gpsbabel -t -i garmin -f usb: -o gpx -F tracks.gpx

Soll ein Download statt finden von Gpsies, so holt man sich die Datei als gpx Route, und kann diese mit :

gpsbabel -D 4 -t -i gpx -f /pfad/zur/180er_runde_jo.gpx -o gpsdrivetrack -F daten

in die Datendatei umwandeln, und dann folgendes Skript anwenden: createroute.sh.

Die Route kann dann gekürzt werden mit:

sed -i '1~5d' /pfad/zur/datei/daten

löscht jede fünfte Zeile raus, um die Trackpoints zu reduzieren.

ODER :

die Route direkt von Gpsies als gpx Route in den Forerunner 305 laden:

gpsbabel -i gtrnctr -f somefile.tcx -x simplify,count=50 -x transform,rte=trk -r -o garmin -F usb:

Dabei wird direkt eine Reduzierung der Punkte vorgenommen. Das scheint aber nur beim Forerunner 305 zu funktionieren.

Garmin Forerunner 305 on Arch Linux (2014-06)

  1. Install garmintools from AUR
  2. Run sudo rmmod garmin_gps and add blacklist garmin_gps and install garmin_gps /usr/false to the (probably new) file /etc/modprobe.d/blacklist.conf.
  3. Add the file /etc/udev/rules.d/10-garmin.rules with the content SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", GROUP="users", MODE="0666" and then apply this rule directly with udevadm trigger.
  4. Run garmin_get_info.

And also get the braiden scripts https://livesoncoffee.wordpress.com/2013/10/21/garmin-forerunner-and-ubuntu-12-04-updated/

mkdir ~/Downloads
cd ~/Downloads
git clone git@github.com:cstrelioff/garmin-dev.git
cat << "EOF" >> ~/.bashrc
export PATH=${PATH}:~/Downloads/garmin-dev/
EOF
source ~/.bashrc

and create and run this bash script in the data folder:

#!/bin/bash

export PATH=${PATH}:~/Downloads/garmin-dev/

for gmnfile in 20*/*/*.gmn
do
  echo "Found $gmnfile."
  tcxfile="${gmnfile%%.*}.tcx"
  gpxfile="${gmnfile%%.*}.gpx"
  if [ -f "$tcxfile" ]
  then
    echo "TCX file $tcxfile exists. Skipping."
  else
    echo "Creating $tcxfile..."
    gmn2tcx "$gmnfile" > "$tcxfile"
  fi
  if [ -f "$gpxfile" ]
  then
    echo "GPX file $gpxfile exists. Skipping."
  else
    echo "Creating $gpxfile..."
    SIMPLIFY=""
    #SIMPLIFY="-x simplify,count=999"
    gpsbabel -i gtrnctr -f "$tcxfile" $SIMPLIFY -o gpx -F "$gpxfile"
  fi
done

Add this rule to /etc/udev/rules.d/10-garmin.rules:

SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", GROUP="users", MODE="0666", TAG+="systemd", ENV{SYSTEMD_WANTS}="garmin.service"

/etc/systemd/system/garmin.service

[Unit]
Description=Pulling data from Garmin Forerunner 305

[Service]
User=pklaus
Type=oneshot
ExecStart=/storage/raid1/share/Philipp/GPS-data/run.sh

[Install]
WantedBy=multi-user.target

Run sudo systemctl enable garmin and sudo udevadm control --reload-rules. Then when you unplug and plug back in the device, the data should be pulled and converted.

GPSBabel

http://www.gpsbabel.org/
http://wiki.openstreetmap.org/wiki/USB_Garmin_on_GNU/Linux

installation

sudo aptitude install gpsbabel

In der Datei /etc/modprobe.d/blacklist muss man die Zeile blacklist garmin_gps auskommentieren (einfach # vor die Zeile machen). Damit man als normaler Nutzer Zugriff auf den erkannten Garmin-Treiber am USB-Anschluss hat, muss man die Datei /etc/udev/rules.d/51-garmin.rules bearbeiten/anlegen und die Zeile SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="0666" einfügen.

usage

GPSBabel parameters:

  • -i = inputformat
  • -f = inputfile / -device
  • -o = outputformat
  • -F = outputfile / -device
  • -r = routes
  • -t = tracks
  • -w = waypoints

advanced example from http://www.gpsbabel.org/htmldoc-development/fmt_gtrnctr.html: using the filter simplify and transform gtrnctr as fileformat enables gpsbable to handel heart rate etc.:

gpsbabel -i gtrnctr -f somefile.tcx -x simplify,count=50 -x transform,rte=trk -r -o garmin -F usb:

write GPX-file to your Garmin:

gpsbabel -i gpx -f test.gpx -o garmin -F usb:

read out a tracks:

gpsbabel -t -i garmin -f usb: -o gpx -F tracks.gpx

read out a track and save it in Google Earth (kml) format

gpsbabel -t -i garmin -f usb: -o kml,points=0,line_color=ff0000ff -F route.km

TCXConverter

http://www.teambikeolympo.it/TCXConverter

workflow:

  1. I find a nice route on the Internet (e.g. in the .PCX format).
  2. I import that file in my GPS-Software Touratech QV 4
  3. I export it to .GPX
  4. I convert it to .TCX course using the TCX Converter
  5. I upload the course to my Forerunner 305 using Garmin Training Center
  6. I enjoy the ride / run / skating course ;)

installation

cd ~/Downloads
wget http://www.teambikeolympo.it/includes/DOWNLOADS_files/TCX-C-Experience_2015_Linux.tgz
tar -xf TCX-C-Experience_2015_Linux.tgz
chmod +x TCXConverter/TCXConverter

run

~/Downloads/TCXConverter/TCXConverter

MyTourbook

http://mytourbook.sourceforge.net

Written in java, better than pytrainer.

installation

search for the latest file on http://sourceforge.net/projects/mytourbook/files/

cd ~/Downloads
wget http://sourceforge.net/projects/mytourbook/files/MyTourbook/10.3/mytourbook_10.3.0.linux.gtk.x86.zip/download
unzip mytourbook_10.3.0.linux.gtk.x86.zip

to start it

cd ~/Downloads/mytourbook
./mytourbook

BikeXperience

http://www.bikexperience.de/
not open source but freeware written in java

install (also needs java runtime!)

cd ~/Downloads
wget http://www.chris-werx.de/bXp-4.0.0-linux-gtk-install.tar.gz
tar -xf bXp-4.0.0-linux-gtk-install.tar.gz
./bXp-4.0.0-linux-gtk-install.sh

extract.pl - perl script to plot heartrate

perl script to plot heartrate using gpsbabel and gnuplot http://www.coruskate.net/Garmin%20and%20Linux

see also http://gist.github.com/345083

tcx2gpx - a perl script to convert tcx files to gpx

http://www.nightwatch.org.uk/tcx2gpx/ or http://gist.github.com/346488

maybe this is too old! use rather the gtrnctr format of gpsbabel! It defaults to scanning for bike routes. Use the -? option to find out how to change this.

Golden Cheetah

http://goldencheetah.org

there is no direct support for the Forerunner 305, but you can import TCX (Garmin Training Centre) files.

garmin-upload-tools (auto-upload to motionbased, uses garmintools)

http://forums.motionbased.com/smf/index.php?PHPSESSID=62f2a7a64e6e3e415a51df24a0788cd5&topic=10625.msg64147#msg64147

latest version 1.4.0: http://developer.garmin.com/forum/viewtopic.php?p=1695#1695
A package which when installed will download new activities from the device and upload these to your motionbased inbox automatically when you plug it into a usb port. The package is nothing more than a few scripts, plus a bit of platform setup stuff such as installing the UDEV hook to make sure the USB event triggers the action, and logrotates happen etc.

Config file at /etc/garmin-upload-tools/garmin-upload-tools.conf.

Run gut -h or man garmin-upload-tools for help. The upload to motionbased is done via a simple Perl mechanize bit of scripting. It logs you in and then uploads the file(s). Only new (not uploaded before) files are uploaded.

Requirement: garmintools (see above)

now the installation of garmin-upload-tools_x.x itself:

cd downloads
wget http://www.waite.net.nz/downloads/garmin-upload-tools_1.2.0_all.deb
sudo apt-get install po-debconf libmoose-perl libxml-xpath-perl libxml-writer-perl xml-twig-tools libdatetime-format-w3cdtf-perl libwww-mechanize-perl libtest-simple-perl xmlstarlet
sudo dpkg -i garmin-upload-tools_1.2.0_all.deb

change configuration:

gedit /etc/garmin-upload-tools/garmin-upload-tools.conf

content:

# Created by garmin-upload-tools postinst
# Feel free to modify the contents. These values will affect
# how the upload tools scripts work.

# directory that gamin-upload-tools lives in
GUT_HOME=/usr/share/garmin-upload-tools

# user who owns files
GUT_USER=pklaus

# whether units are metric or not: "yes" or "no"
GUT_METRIC="yes"

# directory where garmin data is kept
GUT_DATA=/raid/gps_data/garmin-upload-tools_data

# directory log files are kept
GUT_LOGS=/raid/gps_data/garmin-upload-tools_data

# auth details for the above
GUT_UPLOAD_USER=""
GUT_UPLOAD_PASS=""

# whether to automatically upload new data to the
# your online website or not: "yes" or "no"
GUT_AUTOMATIC_UPLOAD="no"

get the new data:

/usr/bin/gut get

convert a .gmn file to something else (Hst Kml Gpx Csv Txt Html)

gut translate -f 20090409T104743.gmn -O Hst > tmp.hst

if that does not work, you can do the conversion using the garmin-forerunner-tools package:

garmin_gpx 20090913T170409.gmn > out2.gpx
garmintools

http://code.google.com/p/garmintools

extremely nice!!! specifically to the Forerunner 305!

README: http://code.google.com/p/garmintools/source/browse/trunk/README

as svn version:

sudo aptitude install libusb-dev
svn checkout http://garmintools.googlecode.com/svn/trunk/ garmintools-read-only
cd garmintools-read-only
./configure
make
sudo make install

or install it on Ubuntu where it is packaged as garmin-forerunner-tools:

sudo aptitude install garmin-forerunner-tools

usage:

garmin_get_info
garmin_get_runs

clickroute.de

http://www.clickroute.de

Service able to create and convert gpx files to .crs / .tcx files. Course generator for Garmin Training, Center, Edge 305 and Forerunner 305 etc.

offline as of march 2010 (planned to be back online some time)

Viking GPX Viewer

http://sourceforge.net/apps/mediawiki/viking/

not so much for sporting...

sudo aptitude install viking

geo-* — Rick Richardson's Linux tools for geocaching (using geocache.com)

http://geo.rkkda.com/
actively developed as of 2010-02

prerequisits:

sudo aptitude install sharutils

cd ~/Downloads/
wget http://geo.rkkda.com/geo-09-09-10-14-04-59.tar.gz
tar -xf geo-*.tar.gz
cd ~/Downloads/geo

Compile:

make

to install in $HOME/bin:

make install

OR to install in /usr/bin...

sudo -i
cd ~pklaus/Downloads/geo
PREFIX=/usr make install
make install-man

Create a $HOME/.georc file with at least these lines in it:

PASSWORD="your_geocache.com_password"
USERNAME="your_geocache.com_username"
LAT=n50.129111  # Your home latitude in decimal or MinDec degrees
LON=w8.666585   # Your home longitude in decimal or MinDec degrees

usage

manual pages: http://geo.rkkda.com/manual.pdf

Documentation

    You can read the manual pages for more information.

    Tools for accessing gc.com...
        (SO) : this program works only for gc.com subscribers

        geo-found   List caches found (by you or someone else)
        geo-nearest List the nearest caches to a location
        geo-newest  List the newest caches in a state
        geo-placed  List caches placed (by you or someone else)
        geo-keyword List caches by keywords.
                All of the above can enter the waypoints into the
                GpsDrive MySQL database.
        geo-html2gpx    Convert a gc.com printable web page (such as the
                above commands can produce with the -H option) to
                a GPX file.

        geo-count   Count caches found
        geo-usernum Determine gc.com user number (used by geo-count)

        geo-gid     Retrieve cache info by GCxxxx waypoint name
    (SO)    geo-gpx     Retrieve GPX file by GCxxxx waypoint name
    (SO)    geo-demand  Request an immediate pocket query email
    (SO)    geo-gpxmail Process GPX email from GC.com
    (SO)    geo-myfinds Schedule a Pocket Query containing your finds.
    (SO)    geo-rehides From your found.gpx file, produce a GPX file of rehides
        geo-density Compute cache density of an area

        gpx2html    Lightly hacked converter from GPX to HTML
                Originally by fizzymagic (v1.90).  My version
                fixes issues with HTML in the cache descriptions
                and adds sort by latest log date for easy perusing
                    of recent cache activity.
        gpx-loghistory  Print all logs in reverse cron order.
        geo-pqs     Figure out what PQs to run to get an entire state.
        geo-state   Convenience script;  geo-state -? gives usage.
        geo-suffix  Replace name with name/TypeSizeDiffTerr/gcid/LatLon

    Tools for accessing nc.com...
        nc-newest   List the newest caches in a state
                EXPERIMENTAL, subject to drastic changes

    Tools for general use
        geo-2gpsdrive   Enter a waypoint file into the GpsDrive MySQL database
        geo-2tangogps   Enter a waypoint file into the tangoGPS sqlite database
        geo-circles Compute the intersection of two circles on the earth
        geo-intersect   Compute the intersection of two line segments
        geo-project Project a waypoint
        geo-code    Geocode an address
        geo-dist    Compute distance along a list of waypoints.
        geo-waypoint    Enter a waypoint into the GpsDrive MySQL database
        geo-map     Create a map with waypoints plotted on it
                These CANNOT be used for publication unless the
                selected map source is the tiger, topographic, or
                aerial map server!
        geo-firefox     Display a map of a point using MapQuest aerial photos
        gpx-photos  Fetch hi-res aerial photos of all caches in a GPX file
        gpx-stats   Compute stats from a GPX file.
        gpx-finders Output the finders from a GPX file.

        geodetics.html  A modified version of Gary Nicholson's javascript
                Geodetics Calculator.
        ll2utm/utm2ll   To/From lat/lon to UTM
        ll2osg      Lat/lon to British National Grid

    Tools for manipulating Mapopolis place guide data
        geo-poi     Search place guide (*.pdb or *.csv) for places
        pgpdb2txt   Convert a place guide to plain text

    Tools for use by the MN Geocaching Association
        mngca       Count caches found/placed by MnGCA members
        mngca-logs  Create web pages of recent area logs from GPX files
        mngca-newmap    Create newest cache maps for Minnesota

    Miscellaneous
        addletters  Add all letters: a=1, b=2, c=3, ... z=26
        lethist     Compute letter histogram.
        geo-bot     Experimental IRC bot

Setup for OpenStreetMap

http://wiki.openstreetmap.org/wiki/User:0800peter

Zum Hochladen und Ansehen gehe ich über die GPSies Website.

Der Transfer zu OSM geht dann leider nicht mehr direkt von GPSies.de aus, daher lade ich die Datei wieder als gpx-track von gpsies runter und dann manuell in OSM wieder rauf.

Noch habe ich die richtige optionenkombination für gpsbabel nicht gefunden um den konvertierungsvorgan zu vereinfachen. aber das wird noch.

Auf dem KDE Desktop ligt schon ein icon das die tipperei bis hochladen und Ansehen abnimmt file:/*home/knoppix/Desktop/Forerunner auslesen.desktop das ich hier mal abdrucke, sieht scheusslich aus, aber geht.

[Desktop Entry]
Comment=echo garmin_gpx `cat qwe.txt | grep rote | cut -c 10-` '> in.gpx ; gpsbabel -i gpx -f in.gpx -o gpx -F ' `cat qwe.txt | grep rote | cut -c 10- | sed -e s/gmn/gpx/1` > qwe
Comment[de]=echo garmin_gpx `cat qwe.txt | grep rote | cut -c 10-` '> in.gpx ; gpsbabel -i gpx -f in.gpx -o gpx -F ' `cat qwe.txt | grep rote | cut -c 10- | sed -e s/gmn/gpx/1` > qwe
Encoding=UTF-8
Exec[$e]=sudo /sbin/rmmod garmin_gps ; sudo garmin_save_runs > qwe.txt ; cat qwe.txt ; echo garmin_gpx `cat qwe.txt | grep rote | cut -c 10-` '> in.gpx ; gpsbabel -i gpx -f in.gpx -o gpx -F ' `cat qwe.txt | grep rote | cut -c 10- | sed -e s/gmn/gpx/1` > qwe ; chmod 774 qwe ; ls -al qwe ; qwe ; cat qwe
GenericName=
GenericName[de]=
Icon=exec
MimeType=
Name=Forerunner auslesen
Name[de]=Forerunner auslesen
Path[$e]=$HOME/
StartupNotify=true
Terminal=true
TerminalOptions=\s--noclose
Type=Application

the braiden scripts - very good

http://braiden.org/?p=62 or on Archive.org

cd ~/Downloads
svn co http://linuxnerd.net/svn/trunk/projects/garmin braiden-garmin

execution is pretty simple:

  1. Save the runs on the device; garmin_save_runs
  2. Convert the .gmn files to .tcx; ./gmn2tcx 2005/05/20090529T091703.gmn > run.tcx (hint: you can list as many gmn files as you’d like and save to one .tcx)
  3. Login to connect.garmin.com and upload the file.

The next step is to automate these steps. I think it should be pretty easy to automatically run these tasks whenever the device is attached.

I’ve added a couple extra scripts to the project: saveruns, basically a wrapper arround garmin_save_runs from garmin tools, but it creates a pending folder with symlinks to all .gmn files which are pending upload to Garmin Connect. uploadruns, which uploads the pending queue to garmin connect.

Now synchronizing can be done in a single command line;

./saveruns && USER=braiden PASSWORD=abc123 ./uploadruns

SportTracks with Mono

http://www.zonefivesoftware.com/SportTracks/Downloads/linux.php
http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=124627#895705

install

sudo aptitude install mono-devel libmono-winforms2.0-cil
cd ~/Downloads; wget http://www.zonefivesoftware.com/SportTracks/Downloads/Versions/Mono/sporttracks-2.1.3478.tar.gz
tar -xf sporttracks-2.1.3478.tar.gz

run:

cd ~/Downloads/sporttracks-2.1.3478
mono SportTracks.exe

garmin-sync

A CLI tool for syncing data to and from Garmin GPS devices. It can currently only download track data, including information about runs and laps. Written in Python, no change since 2008. https://launchpad.net/garmin-sync/

Turtle Sport

http://turtlesport.sourceforge.net

Turtle Sport is a free Java GUI software for Garmin fitness products (forerunner and edge).

installation

cd ~/Downloads
mkdir turtlesport
cd turtlesport
wget http://surfnet.dl.sourceforge.net/project/turtlesport/turtlesport/0.1.13/turtlesport-linux-0.1.13.tar
tar -xf turtlesport-linux-0.1.13.tar

run

~/Downloads/turtlesport/turtlesport

Alternative Software

Resources

Comments