Sports watches are poorly supported by their manufacturers regarding linux. After I started running I decided on a Garmin FR 410, since it was quite cheap and has all the functionality I wanted. I neglected to look up how it works under linux and for the first couple of months after I got it I had to boot up my XP in VM to transfer data to and from the watch.

Then I came across a nice python tool that made it possible to get data off the watch and upload it to Connect Garmin. The tool is called python_ant_downloader and you can find supported watch models on their github page. It is simple to install through pip (use sudo if needed):



user@host $ sudo pip install python_ant_downloader



Edit 3rd July 2014: If you use Anaconda for virtual python environments as I do, then you might be having issues with python module dbm not being installed when running the ant-downloader:

user@host $ ant-downloader

Traceback (most recent call last):

...

import dbm

ImportError: No module named dbm



If so, you can install it straight from github:

user@host $ sudo pip install git+git://github.com/braiden/python-ant-downloader.git



This gives you a terminal program called ant-downloader that can retrieve data from a connected garmin watch and upload it to garmin. First, I had a problem where my ant+ stick was not getting permissions to mount. In Ubuntu (and derived systems, and probably other distros as well) non-standard usb sticks are not allowed to mount automatically. Those devices follow permission rules that are present in /etc/udev/rules.d/. To generate a rule for our USB Ant+ stick we need to figure out the sticks ID:



user@host $ lsusb

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

Bus 003 Device 002: ID 0fcf:1008 Dynastream Innovations, Inc.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



In my case I identified my USB stick by running the command with it unplugged and then again plugged in. Here the Dynastream Innovation, Inc. is the stick and note the ID : 0fcf:1008. Now we generate a rule for that device:



user@host $ sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0fcf", ATTR{idProduct}=="1008", MODE="666"' > /etc/udev/rules.d/99-garmin.rules



user@host $ sudo bash -c "echo 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0fcf\", ATTR{idProduct}==\"1008\", MODE=\"666\"' > /etc/udev/rules.d/99-garmin.rules"

Edit 3rd July 2014: On Arch based system (I’m using Manjaro at the moment) the command is a bit different:

user@host $ sudo bash -c "echo 'SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0fcf\", ATTRS{idProduct}==\"1008\", MODE=\"666\"' > /etc/udev/rules.d/99-garmin.rules"

Note that the vendor and product attributes use their respective parts of the ID above. Saving this and plugin the USB again should allow you to run



user@host $ ant-downloader



The first time it runs, it generates configs and tries to pair with your watch. After that, you can edit the file ~/.antd/antd.cfg and add your connect.garmin details under the config [antd.connect] (and set enabled = True) for automatic upload to their server. Your workouts are also stored as .tcx files that you can upload to other servers than garmin, you find them in the folder ~/.antd/0xDEVICENR/tcx/ .

Hope this will be of use to someone 🙂 Please let me know of any issues you find with this method.

Binni out.