Garmin Connect & Linux
I recently picked up a Garmin forerunner 305 to replace the broken Garmin Edge on my bike. While researching my options for a GPS and linux, I found Garmin Connect. Its Garmin’s online training software. For windows and mac there’s a plugin which links the website and GPS device, but for linux no direct support. This article covers what I did to get it working.
Garmintools (garmin-forerunner-tools package on Ubuntu) is where I started. It provides a tool for communicating with the GPS receiver over USB. It works with the older receivers (Forunner 305/Edge 305). It doesn’t sound like it works with the 405. (Too bad I really wanted the newer model.)
Garmintools has the ability to dump to an XML format. Garmin publishes the schema (TCXv2) required for manual uploads to Garmin Connect. To integrate the two I created a pretty simple XSLT stylesheet. I’m actually quite surprised couldn’t find an existing solution.
If your interested you can grab a copy from svn (or just browse);
svn co http://linuxnerd.net/svn/trunk/projects/garmin-dev
In order for the script to work you’ll need an XSLT2 processor (XSLT1 won’t work). The script assumes you’ll be using saxon-xslt, which is provided by the ubuntu package ‘libsaxonb-java’. Once saxon’s installed the process is pretty simple;
[Updated] In order for the script to work you’ll need install Java 1.6 VM (either Sun’s or OpenJDK). Included in SVN export is a copy of Saxon 9 (which requires java). Make sure your not using GCC/GIJ’s JRE, it won’t work. Once the JRE’s installed, execution is pretty simple;
- Save the runs on the device; garmin_save_runs
- 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) - 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.
Update 1:
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
Update 2: (Apr 03, 2010)
It looks like garmin changed the login screen to force https. I’ve had to tweak the scripts. If you’re start to see “403 Forbidden” when uploading data, make sure to get the latest from SVN. I’ve update both branches to use https when logging in.

June 21st, 2009 at 9:57 pm
you have a typo on line 52 of the upload script. it says $GARMIN_SABE_RUNS and not $GARMIN_SAVE_RUNS which causes a problem if you execute the script from somewhere other than the desired storage directory. love your script though!!!!!
June 21st, 2009 at 10:54 pm
Fixed. Thanks for the catch. Glad to hear the scripts are useful.
June 25th, 2009 at 7:51 am
Very useful indeed. One thing– where can I get a copy of the saxonb-xslt command used by gmn2tcx? I usually just use ‘java -jar saxon.jar….’
June 25th, 2009 at 9:28 am
Hi,
I’m writing a small application and I’m focusing on the interaction with the Garmin Connect site.
I found the script to upload tcx file to garmin connect quite interesting, but I’m mostly interested in the opposite process: download the tcx from Garmin Connect (or any other XML format that contains similar information).
Any idea where I can find this information?
Thanks!
June 25th, 2009 at 9:51 am
‘saxon-xslt’ is just a help script installed by the ubuntu saxon package. On Ubuntu the contents are;
#!/bin/shexec java -classpath /usr/share/java/saxonb.jar net.sf.saxon.Transform "$@"
June 25th, 2009 at 10:00 am
This is the URL used by the export link, e.g. export event;
http://connect.garmin.com/proxy/activity-service-1.0/tcx/activity/EVENT_ID?full=true
You can use the first two wget’s in my upload script as an example of how to login.
And a third wget on an URL similar to the one above. (actually, login is probably only
required if your trying to export private data).
The harder problem might be finding the id’s you want to export.
Maybe you can get this from your connect rss feed?
Otherwise, the activities page on connect seems to use an ajax/json service, it probably possible to build a client to talk to this.
July 13th, 2009 at 7:41 am
Hi Braiden,
I’m getting the following error…
dunc-laptop[pts/6]% saxonb-xslt /tmp/foo.xml garmin/gmn2tcx.xslt
Validation error at xsl:value-of on line 72 of file:///home/dunc/garmin/gmn2tcx.xslt:
FORG0001: Invalid duration value ‘PT0:38:53.77H’ (non-numeric component)
Transformation failed: Run-time errors were reported
dunc-laptop[pts/3]% head /tmp/foo.xml
3.71505451
298
Haven’t touch xslt in years and 2.0 is beyond me
I could probably fix it with a perl script in the middle but ew.
Any ideas? Appreciate your sharing of your solution.
I guess a hint would be I’m in GMT+0800, the timezone might catch you out, although I couldn’t pick any dependence there in the xslt.
TIA!
July 13th, 2009 at 8:03 am
Its not tokenizing the semi-colon for some reason. Maybe this has something to do with your locale? I just commited new version of the script which makes sure both gmn2tcx and gmn2tcx.xsl use UTF-8. You can give this version a try.
[EDIT] See below, updating your JRE to Java 1.6 (Sun or OpenJDK) will probably fix this.
July 17th, 2009 at 11:24 am
Hi there,
I try to use your script with Open Suse 11.1 and saxon8 () but I get the following error:
~/Skript> gmn2tcx /home/rissling/2009/07/20090716T201526.gmn > run.tcx
./tcx.xsd:262: parser error : Entity ‘nbsp’ not defined
^
./tcx.xsd:277: parser error : Entity ‘nbsp’ not defined
^
./tcx.xsd:313: parser error : Entity ‘copy’ not defined
© Braiden Kindt, L
^
./tcx.xsd:318: parser error : Entity ‘nbsp’ not defined
^
Schemas parser error : The XML document ‘./tcx.xsd’ is not a schema document.
WXS schema ./tcx.xsd failed to compile
Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/saxon/Transform
-:1: parser error : Document is empty
^
-:1: parser error : Start tag expected, ‘<’ not found
^
Can you help me?
July 18th, 2009 at 9:40 am
I’ve made couple changes to the project which should fixes the issues reported so far:
FORG0001: Invalid duration value 'PT...'July 20th, 2009 at 3:45 am
I put some things together (with the help of braiden
), and now you can download a package with the following at http://sporttracks.rissling.name/ :
- Download Tracks from a garmin sportswatch
- Convert .gmn-files to .tcx
- Import tcx-file into SportTracks
- Enjoy!
It’s all written in german, so i hope you understand it. If you are interested, I could translate it to english…
Write to: frederik [at] rissling.name
July 24th, 2009 at 1:16 pm
Great work, but I found an issue with some old tracks in my forerunner:
Suppose you have an old track, which does not contain any track and point (just remove those lines from the output from garmin_dump). Your XSLT stylesheet produces an empty track from this (), which cannot be validated by xmllint, because the XST schema expects the Track to have some childs:
element Track: Schemas validity error : Element ‘{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Track’: Missing child element(s). Expected is ( {http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Trackpoint ).
To get rid of this empty track, I just encapsulated the Track in an , and it seems to work. Please be aware, tha XSLT is absolute new to me, but here is my small patch:
— gmn2tcx.xslt (revision 211)
+++ gmn2tcx.xslt (working copy)
@@ -103,6 +103,7 @@
Manual
+
@@ -118,6 +119,7 @@
+
July 24th, 2009 at 1:22 pm
Excuse me please, I missed to mask the XML-code in my last comment.
If you like, I’ll send you the patch by mail, but it was really nothing more than a ‘xsl:if test=”../&track”‘ around the Track.
July 31st, 2009 at 4:20 pm
Yes, wordpress mangled your patch
. Send it by email and I’ll apply the patch.
August 4th, 2009 at 2:01 am
The saveruns script was complaining that the pending directory could not be created when saving multiple runs. I added an if to check if the directory is already there, and thus skip its creation.
Thanks for sharing this, I was struggling to upload to Garmin.
jorge
#!/bin/bash
export GARMIN_SAVE_RUNS
while read line ; do
if [ -z "$GARMIN_SAVE_RUNS" ] ; then
GARMIN_SAVE_RUNS=`pwd`
fi
if [ ! -d "$GARMIN_SAVE_RUNS/pending" ]; then
mkdir “$GARMIN_SAVE_RUNS/pending”
else
ln -s “$line” “$GARMIN_SAVE_RUNS/pending/`basename $line`”
fi
done < (garmin_save_runs | grep '^Wrote:' | cut -b7-)
August 4th, 2009 at 10:44 pm
Thanks, I will apply fix.
August 10th, 2009 at 1:43 am
Thanks for the script, works great! One small suggestion: instead of “mkdir pending” do “mkdir -p pending”. That way when the pending directory already exists, it won’t print a warning.
August 10th, 2009 at 7:54 pm
I’ve applied all the mentioned fixes / patches to the latest version in svn.
August 24th, 2009 at 6:54 am
Does it also work for the 405?
August 25th, 2009 at 3:44 pm
Sorry, I don’t think so.
It should work with any device supported by garmintools, but I don’t think that includes the 405.
September 14th, 2009 at 10:56 pm
Hi there,
I use your program for the forerunner 305, great work.
Do you have any idea how to make it work for the 310xt?
lsusb resulte into:
Bus 002 Device 011: ID 0fcf:1004 Dynastream Innovations, Inc.
but ./saveruns does nothing.
Would be cool if this wireless transfer could work under linux as well…
September 15th, 2009 at 11:21 am
Sorry, I’ve really only written a collection of scripts on top of garmintools. If garmintools supported the device it would probably work, but my understanding is the wireless devices are quite different.
There was a project which had limited support for the 405 (which was also wireless and i’m guessing might be similar to the 310′s wireless protocols). Maybe worth a try, but wouldn’t have much hope that it will work without modification:
http://cgit.gromotion.com/cgit.cgi/gant/
December 6th, 2009 at 5:38 pm
Thanks! That was exactely what I was looking for. Worked like a charm on my ubuntu. One more reason not to reboot to my windows partition!
January 9th, 2010 at 2:29 am
Thanks for this terrific set of scripts. Happy Cycling and Linuxing!
January 10th, 2010 at 10:07 am
Thank you! This works wonderfully and I echo the sentiments from above. I could not find any solutions in Linux Mint Helena until this.
January 28th, 2010 at 5:54 pm
[...] werden, so ist eine weitere Konvertierung sinnvoll. Dazu verwendet man das Tool gmn2tcx, welches hier beschrieben wird. Es lässt sich ganz leicht über den Subversion-Server [...]
January 30th, 2010 at 8:10 pm
Cool scripts! Working well. One thing, it seems to keep adding activities even if they have been added already. Obviously the device can be cleared of all activities after uploading but is there any way to prevent duplicate activities from being uploaded without removing them fom the device?
Thanks!!!
January 31st, 2010 at 3:30 pm
@retsin2000
The scripts should only upload new content. Let me explain a bit about how it works, and let me know if you think you have a bug.
“saveruns” really does two things.
1) It calls “garmin_save_runs” from the garmintools project. This program should download only new runs. (if it is your very first time running “garmin_save_runs” it will download -everything-, and I should probably add a warning that this will happen). “garmin_save_runs” dumps its output to the directory sepcified by “$GARMIN_SAVE_RUNS” variable. If that’s not defined it uses current directory. So its best to defined “$GARMIN_SAVE_RUNS” with path where you want to write your local cache of data. (If the cache can’t be found, it might duplicate data.)
2) Once “garmin_save_runs” finishes “saveruns”, my script, updates $GARMIN_SAVE_RUNS/pending. This directory should contain a sym link to every new .gmn file. Its basically the queue of stuff that needs to be uploaded. Processing pretty much stops here.
When you run “uploadruns” it goes to $GARMIN_SAVE_RUNS/pending and prepares a TCX file for upload. If upload to garmin is successful, it deletes the contents of pending. If garmin returns an errors code we leave the files queued.
So.. if its duplicating runs for you every time:
1) Make sure to explicitly set the value of GARMIN_SAVE_RUNS.
2) Run “saveruns” and check the “pending” folder contains only new data.
3) Rune “uploadruns” and make sure “pending” is empty once the command completes.
If #2,3 look to not be working, let me know can I can take a look.
February 1st, 2010 at 7:06 pm
Thanks a lot for the scripts! I did have some problems, but was able to fix them. First, the garmin_dump seems to produce bad content in the “name” element. I ended up to edit that manually.
The second problem was finding out that the correct package for Saxon was libsaxonb-java, not libsaxon-java (error message about missing adjust-dateTime-to-timezone function.)
Finally I have a working environment with my Forerunner 301 and Linux Mint!
March 15th, 2010 at 1:51 am
Thanks again for the great scripts. Everything has been working well so far, but today when I tried to upload my run somehow gmn2tcx did not encode the GPS points anymore (it encodes general data such as time, calories, etc., but not the GPS points, so no map nor pace graphs etc.). So I tried to see what has changed since last time I uploaded my runs, and I think the only change is that I’ve updated packages on ubuntu, including the OpenJDK java package (I now have package build openjdk-6-jre_6b16-1.6.1-3ubuntu1_i386 ). Since your script uses a custom copy of Saxon, could this be where the problem lies? Otherwise I have no idea what has changed since last time I uploaded a run last week…
Any idea? Thanks a lot!
March 15th, 2010 at 3:58 pm
I love your scripts. Very clever. For some reason, though, my file is not uploading. During the POST, I’m getting an HTTP 500 Server Error from Garmin Connect. Is anybody else experiencing this problem? I’m able to manually upload the .tcx file just fine. Also, I’ve compared the wget POST operation in your script, with the output from the Firefox LiveHTTPHeaders plugin. Everything seems to match. Weird.
March 15th, 2010 at 6:21 pm
@vincent
I’ll follow up in email. I’m curious to know what the output of garmin_dump (from garmin tools) looks like. I’d guess maybe this isn’t working. Occasionally, but rarely, garmin tools won’t give me any geo data for my run.
I always wait until I have a GPS lock before starting the timer. Seems to cause the issue less, but can’t be sure.
March 15th, 2010 at 6:39 pm
@greg
For 500 error. I’ve had a couple people get this error. I get it occasionally, but it always seems to go away.
I have a development version of the scripts ;
SVN is http://bam4.linuxnerd.net/svn/trunk/projects/garmin-dev/
This has a couple improvements. It uploads one activity at a time, this is slower, but seems to have better success. Garmin may not like it when I try to send a file too big.
This version also verifies that login was successful before POST’ing.
Just a warning, the URL in this post is a dev version. Its under a separate path because I’m waiting until weather improves and I can regularly use and test it.
March 15th, 2010 at 7:07 pm
Braiden, the new version of your scripts uncovered my problem. I was following an example that you used earlier where you set the USER and PASSWORD variables on the command line. With bash, you actually have to export those values before the script will pick them up. So, it works (with bash) if I execute “./saveruns && USER=username && PASSWORD=password && export USER PASSWORD && ./uploadruns”.
Alternately, I modified the “uploadruns” script and just hardcoded them.
I believe what was happening before is that the PASSWORD variable was not set, and Garmin must not do any server-side checking on that POST parameter (since they’re bombing with 500′s). So the POST would fail.
Also, it may be worth mentioning that several shells, I believe, already use the “USER” variable name, to indicate the OS-logged-in-user. In my case, my OS-user name and Garmin Connect user name are different, so setting and exporting that in a shell could cause other problems for people using the script that way. If you ever run into that issue, you may want to reconsider the name for that variable.
Anyhow, everything works like a champ. Thanks for the help.
Greg
April 7th, 2010 at 11:39 pm
Braiden,
I have an older (not sure exactly which revision) of uploadruns that worked fine for me until the recent https change by garmin. While trying to get it working again (before your update), I tried your newest version and instead started getting “500 Internal Server Error” errors. The absolute latest version (267) still gives me the same 500 errors. I went back to the older version that I’ve been using and changed the login url to use https and now it work again. Still can’t get the newest version to do anything besides give me errors. I tried hard coding in the username and password like Greg suggested above, but that didn’t help. If you’d like I can email you the version I have that works for me.
Thanks for an awesome set of tools!
April 8th, 2010 at 7:43 pm
I was running a Windows via VirtualBox to get the plugin to work, but found it easier to run the Windows version Firefox via Wine and it works perfectly. Sure its not a native Linux solution, but it works for all models I have tried.
Here is my write up.
http://dropoff.tumblr.com/post/505336492/garmin-connect-running-on-ubuntu-linux
April 9th, 2010 at 11:43 am
I’m also trying to use your scripts. First I had to fight with the Garmin connect website – now it seems to be OK.
Unfortunately, the script is ending with the following error:
2010-04-09 17:39:44 (274 MB/s) – »/dev/null« gespeichert [12970/12970]
–2010-04-09 17:39:44– https://connect.garmin.com/proxy/upload-service-1.1/json/upload
Auflösen des Hostnamen »connect.garmin.com«…. 92.123.150.235
Verbindungsaufbau zu connect.garmin.com|92.123.150.235|:443… verbunden.
HTTP Anforderung gesendet, warte auf Antwort… 403 Forbidden
2010-04-09 17:39:46 FEHLER 403: Forbidden.
The USER and PASSWORD variables are set correctly – I tried two ways: included in `xxx` and not.
Thanks for your help – your the hope of all garmin-enabled and running LINUX users
April 27th, 2010 at 6:33 am
I get the exact same error:
–2010-04-27 12:31:38– http://connect.garmin.com/proxy/upload-service-1.1/json/upload
Løser connect.garmin.com (connect.garmin.com)…92.123.246.235
Connecting to connect.garmin.com (connect.garmin.com)|92.123.246.235|:80… forbundet.
HTTP forespørgsel sendt, afventer svar… 403 Forbidden
2010-04-27 12:31:40 FEJL 403: Forbidden.
Any solution??
April 28th, 2010 at 8:14 pm
@thomas, @regis
Sorry, I’ve been busy and neglecting comments. I have one issue with the -dev version.
There’s a bug where it will report a 403 when trying to upload (but it acutally succeed in uploading in an earlier POST). For me, everything does get posted to the website despite the error. But, Its worth giving it a try again once i’ve fixed the bug.
Will patch this weekend (05/01).
April 29th, 2010 at 1:18 pm
Thank you very much for your job. I used the dev version and it work perfectly
May 2nd, 2010 at 9:57 am
@thomas, @regis,
…and anyone else seeing 403 with, try updating to the latest version of -dev. I was stupidly deleting authentication data after trying to upload the first file.
May 8th, 2010 at 4:47 pm
@braiden
I updated to the latest version and now everything works again. Thanks!
May 23rd, 2010 at 9:13 am
Hey, thanks for these scripts – so far the most hassle-free solution I’ve come across (tried sporttracks for linux and the “raw” garmintools). Great job!
June 5th, 2010 at 6:57 am
it’s not for Garmin Connect but you can try a good project for Garmin & GNU/Linux: Pytrainer. It use garmintools and gpx files for work, and you can upload to Garmin Connect.
June 28th, 2010 at 6:23 am
Thank you for this nice tools! Worked like a charm.
July 25th, 2010 at 7:50 pm
Very well done, this just worked perfectly for me using Ubuntu Lucid and Java sun-java6-jre-6.20dlj-1ubuntu3
I’ve been looking for a fix for uploading to Garmin Connect from my Forerunner 305 for ages!
August 2nd, 2010 at 4:18 am
exactly what I need thanks a lot man.
August 3rd, 2010 at 4:59 am
i also had the “500 internal server error” errors (with both the ‘stable’ and dev versions) and i couldn’t resolve them by changing the way USER and PASSWORD is read by the script.
however i was able to deal with the problem by using curl for the upload instead:
curl -b $COOKIES -F “file=@$TCX;type=application/octet-stream” http://connect.garmin.com/proxy/upload-service-1.1/json/upload
(add > output.html if your terminal can’t read the output)
off course this solution depends on curl but has an advantage of being more readable. and as far as i can see, it doesn’t require the mime part.
August 5th, 2010 at 5:24 am
This really looks like a nice set of tools. I like to keep the rough data myself, to be able to switch between software (Garmin Connect, Sporttracks, etc) when needed. The new announced paid policy for Sporttracks 3.0 makes me switch to Garmin Connect and your tools are great for this.
– Niels
August 13th, 2010 at 8:58 pm
@Jens Stein,
Thanks for the help. I didn’t know curl had built-in support for http file uploads.
Definitely smarter than the crap I wrote. I’ve replaced wget with curl in latest version (garmin-dev).
Hope this helps anyone else anyone else who was seeing 500 errors.
August 15th, 2010 at 4:29 pm
@braiden Thanks this is fixing my problem
August 16th, 2010 at 8:46 pm
I by the way reuploaded some of your upload functions in a Python Library :
http://github.com/chmouel/python-garmin-upload
it has an added function to name the last workout and probably will add a bit more functions to allow me to automate my workout workflow…..
All inspired from your shell script, tks again…
September 4th, 2010 at 12:21 pm
Freaking spectacular, especially the automatic uploading. Do you take donations?
September 16th, 2010 at 2:22 pm
Extremely useful, thanks a million. I can now retire my Windows Virtual Box. Woot!
October 21st, 2010 at 5:39 pm
Great work, this is invaluable to me.
It looks like Garmin have changed the API slightly in the last few days, as I started getting upload failures. Looks like the URL for the upload on line 78 of the script now needs to be: http://connect.garmin.com/proxy/upload-service-1.1/json/upload/.tcx
October 22nd, 2010 at 10:47 am
@Glenn,
Thanks for pointing out the issue. I’ll update the version in SVN in the next day or two.
November 17th, 2010 at 8:13 pm
This is a great tool.
I noticed that it stopped working after Garmin’s update today. Anybody (Glenn maybe) come up with a fix yet?
I’d figure it out myself, but I’m not experienced in tools/methods for reverse engineering which URLs to call, etc. If somebody could point me in the right direction, though, I’m happy to do some leg work toward finding a solution.
November 17th, 2010 at 8:43 pm
If you haven’t already, make sure to check-out the latest code from;
http://linuxnerd.net/svn/trunk/projects/garmin-dev
This code hasn’t changed since Oct 23rd, so you may already be up-to-date.
Did something change today on garmin’s site?
I just test uploaded some data using the scripts and it succeeded.
November 18th, 2010 at 1:45 pm
The Oct 23rd code is working for me again. (Whew)
I tried several times yesterday over a several-hour period, with no luck. Very glad it’s working again!
January 3rd, 2011 at 5:19 pm
Cool stuff, man. Not sure if you’ve seen this before, but I found this nice PERL script (see tedlogan.com) that outputs a summary table of laps, time, duration, HR, etc. into the terminal through garmin_dump on the .gmn files. I’m currently writing a PyGTK implementation that will pipe the dump from the terminal, allow me to attach a run type to it, and write it to a MySQL table.
January 14th, 2011 at 11:26 am
I have problems with the safe connection in uploadruns. So I change every “curl” to “curl -f” in the file.
January 15th, 2011 at 1:06 am
I’ve downloaded the latest, run ./saveruns && USER=UserName PASSWORD=Password ./uploadruns (using my user ID and P/W).
After the Garmin 305 beeps and seems to be pulling data I see the following:
- validates
–2011-01-15 00:03:06– http://connect.garmin.com/signin
Resolving connect.garmin.com… 184.50.254.235
Connecting to connect.garmin.com|184.50.254.235|:80… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: https://connect.garmin.com/signin [following]
–2011-01-15 00:03:06– https://connect.garmin.com/signin
Connecting to connect.garmin.com|184.50.254.235|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 14135 (14K) [text/html]
Saving to: `/dev/null’
100%[======================================>] 14,135 –.-K/s in 0s
2011-01-15 00:03:07 (413 MB/s) – `/dev/null’ saved [14135/14135]
–2011-01-15 00:03:07– https://connect.garmin.com/signin
Resolving connect.garmin.com… 184.50.254.235
Connecting to connect.garmin.com|184.50.254.235|:443… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: http://connect.garmin.com/dashboard?cid=500270 [following]
–2011-01-15 00:03:08– http://connect.garmin.com/dashboard?cid=500270
Connecting to connect.garmin.com|184.50.254.235|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 27929 (27K) [text/html]
Saving to: `/dev/null’
100%[======================================>] 27,929 50.6K/s in 0.5s
2011-01-15 00:03:09 (50.6 KB/s) – `/dev/null’ saved [27929/27929]
–2011-01-15 00:03:09– http://connect.garmin.com/proxy/upload-service-1.1/json/upload
Resolving connect.garmin.com… 184.50.254.235
Connecting to connect.garmin.com|184.50.254.235|:80… connected.
HTTP request sent, awaiting response… 599 Unknown
2011-01-15 00:03:10 ERROR 599: Unknown.
January 29th, 2011 at 11:18 am
[...] data from the Garmin to the computer using GNU/Linux. To do this, I found a great reference at braiden.org and I did everything, more or less, following the same steps, but our goal is to upload the data to [...]
February 7th, 2011 at 10:00 am
Hi,
your scripts work great on my Ubuntu 10.10 box !
Thanks a lot for the great work
Sandro
February 9th, 2011 at 7:32 pm
I tried to upload a run this afternoon and got the exact same error message as Doug (ERROR 599). Does anyone have any idea what this might mean?
February 12th, 2011 at 3:27 pm
@Doug, @brook:
Sorry for slow reply looks like you might be using the old version? Give this version a try: http://linuxnerd.net/svn/trunk/projects/garmin-dev. I need to update the post, this is the better (newer) version.
March 7th, 2011 at 1:35 pm
Hi,
The saveruns/uploadruns worked great on my ubuntu box. Thanks! Got a question though: How can I prevent uploading duplicate runs?
Thanks for great work! linux as a home pc is always a challenge and it’s fun to get things to work despite not doing Windoze.
Susan
March 7th, 2011 at 1:42 pm
Hi again,
Sorry. I got only one duplicate the first time and it was caused by having originally loading it manually without your updated saveruns/uploadruns design. Reran and no reloads.
Thanks.
Susan
March 7th, 2011 at 1:50 pm
@Susan,
The first time you execute the script it will upload everything on the gps device. Subsequently it will only upload new data.
More Details:
You can check what is queued for upload to garmin by checking the “pending” directory. It contains symlinks to everything not yet uploaded. The very first time you run this program you might want to delete these links (to avoid uploading old data).
if $GARMIN_SAVE_RUNS is defined, the script looks for $GARMIN_SAVE_RUNS/pending if not, it uses current directory. So to make sure you don’t duplicated, either 1) always run the script from same working directory, or 2) define $GARMIN_SAVE_RUNS to location on your PC where you want to save your runs. If you change the value of GARMIN_SAVE_RUNS, you need to manually clean out “pending” subdirectory before running uploadRuns the first time after change.
March 8th, 2011 at 11:46 am
@braiden,
Beautiful. Thanks.