GETTING PROPRIETARY ELECTRONICS to work on Linux can be a hassle sometimes. More often that not, companies develops controller software for Windows only, or at best for Windows and Mac OS, but neglects to support the Linux platform. Then us that enjoy the freedom and wonders of Linux is often out of luck, or have to reverse engineer a solution. Fortunately a couple of hackers did just that for the Garmin Forerunner 610.

With thanks to Tigge and Dave Lotton it is possible to download files from the watch and upload them to Germin Connect.

.

Tigge have created the tools to connect to the watch and download training pass files from it. Download from github and install:

» git clone https://github.com/Tigge/openant.git
» (cd openant; sudo python setup.py install)
» git clone https://github.com/Tigge/antfs-cli.git
» (cd antfs-cli; sudo python setup.py install)

Now insert the ANT+ usb dongle, and run this command to download all training pass from the watch.

» antfs-cli

The files will end up in the directory ~/.config/antfs-cli//activities.

.

To upload the files to the Germin Connect service, install the GcpUploader made by Dave Lotton:

pip install gcpuploader

Next setup a credentials file for GcpUploader.

echo -e "\
[Credentials]\n\
username=\n\
password=" > ~/.guploadrc

Edit the file and set credentials. When setting the username your must write your e-mail address. Otherwise you will get a login failure *1 .

Finally upload all files:

~/.config/antfs-cli/3894281250/activities» gupload.py -t "running" *.fit
File: 2015-02-20_16-38-36_4_3.fit    ID: 707690585    Status: SUCCESS    Name: N/A    Type: running
File: 2015-02-24_17-46-28_4_4.fit    ID: 707690640    Status: SUCCESS    Name: N/A    Type: running
File: 2015-02-25_18-18-04_4_5.fit    ID: 707690660    Status: SUCCESS    Name: N/A    Type: running
File: 2015-02-27_17-26-12_4_6.fit    ID: 707688520    Status: EXISTS    Name: N/A    Type: N/A

As seen from the output, already uploaded files are skipped, so if not wanting to specify each file specifically, the *.fit wildcard works perfectly fine. Note that gupload.py supports other taggings than running. Run gupload.py --help for more information.

.

Side note:
For the version that I downloaded (GcpUploader-2015.2.21.3 I had to patch it to accept login with the credentials file:

--- gupload.py.orig     2015-02-28 14:03:14.223948320 +0100
+++ gupload.py  2015-02-28 16:24:35.738408614 +0100
@@ -92,7 +92,7 @@
       self.msgLogger.debug('Using credentials from command line.')
       self.username=myargs.l[0]
       self.password=myargs.l[1]
-    elif os.path.isfile(self.configCurrentDir):
+    elif os.path.isfile(configCurrentDir):
       self.msgLogger.debug('Using credentials from \'%s\'.' % configCurrentDir)
       config=ConfigParser.RawConfigParser()
       config.read(configCurrentDir)

If not wanting to venture into patching, gupload.py also accepts credentials as arguments (see gupload.py --help for more information).

.

Addendum: Dave Lotton recommends that instead of GcpUploader, one should use the tapiriik service instead…


1 Comment

Michael · 2016-02-14 at 6:11

Thanks for this! I’m brand new to Linux, but after a little fiddling and fumbling was able to make it work. Just one question, which is probably more basic Linux than specific to this program: When I try to run this command from my terminal, ~/.config/antfs-cli/3841592901/activities» gupload.py -t “running” *.fit, (with the name changed from your device number to mine), I get a file or folder not found error. It only works for me when I open a terminal window from my activities folder or cd into my folder. What am I doing wrong?

Thanks.

Comments are closed.