GithubHelp home page GithubHelp logo

nscooling / python-ant-downloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from braiden/python-ant-downloader

0.0 2.0 0.0 725 KB

Python Ant Downloader - tools for download from garmin wireless (ANT) devices

License: BSD 2-Clause "Simplified" License

python-ant-downloader's Introduction

Python Ant Downloader

Tools for extracting data from Garmin wireless (ANT) GPS devices. The project goal is to support downloading data from GPS unit and upload to Garmin Connect. It doesn't support support workout, profile, or activitly uploads like the Windows "Garmin ANT Agent."

This software implements the Garmin Device Interface Spec over an ANT-FS transport. In theory it should work with any device implementing this stack. Early wireless Garmin devices should be supported, but newer hardware uses a different protocol. See "Supported Devices" below.

The software can be run as either a daemon or on-demand. In deamon mode it automatically saves TCX files to a configured directory whenever a paired devices is within range and has new data. In on-demand mode the program just downloads once and terminates. The software also supports automatic upload to Garmin Connect.

Getting Help

Issues Tracker: https://github.com/braiden/python-ant-downloader/issues

Supported Devices

So far this software software has been reported to work with:

  • 405
  • 405CX
  • 410

Unsupported Devices

  • 610
  • 310
  • FR60
  • 910XT

These devices (and probably anything newer) appear to implement ANT-FS instead of "Garmin Device Interface API". You can try this: https://github.com/Tigge/Garmin-Forerunner-610-Extractor.

Installing

Easy Install (stable)

Make sure your system has python, pip, and libusb-1.0:

sudo apt-get install python-pip libusb-1.0-0

You may also want to install python-lxml. If you skip this step pip will need to build from source (which requires libxml2 libxslt1 dev packages):

sudo apt-get install python-lxml

Once prerequisites are installed you can install python-ant-downloader from PyPi:

sudo pip python-ant-downloader

Manual Install (stable/unstable)

You can either clone the git project:

git clone git://github.com/braiden/python-ant-downloader.git

Or download a stable build from PyPi or Github tags

Prerequisites
  • Python 2.6+
  • pyusb 1.0 - latest version from github is recommended. 0.4 will not work.
  • poster - only if you enable upload to garmin connect
  • argparse - if < python 2.7
  • lxml
  • setuptools
  • pyserial (required for older hardware revisions of USB ANT Stick)

On Ubuntu most of these dependencies can be satisfied with:

apt-get install python python-lxml python-pkg-resources python-poster python-serial

But, you will still need to download pyusb from github or PyPi.

Running

$ ant-downloader --help

usage: ant-downloader [-h] [--config f] [--daemon] [--verbose]
optional arguments:
  -h, --help        show this help message and exit
  --config f, -c f  use provided configuration, defaults ~/.antd/antd.cfg,
  --daemon, -d      run in continuous search mode downloading data from any
                    availible devices, WILL NOT PAIR WITH NEW DEVICES
  --verbose, -v     enable all debugging output, NOISY: see config file to
                    selectively enable loggers

First Time

Make sure you have permission to access the USB device. Add a text file with one of the following to /etc/udev/rules.d/99-garmin.rules.

On Ubuntu 10.04 (or other other older distros):

SUBSYSTEM=="usb", SYSFS{idVendor}=="0fcf", SYSFS{idProduct}=="1008", MODE="666"

On Ubuntu 12.04 (or other distros running newer udev):

SUBSYSTEM=="usb", ATTR{idVendor}=="0fcf", ATTR{idProduct}=="1008", MODE="666"

The first time you run the program it will need to pair with your GPS device. Make sure the the GPS unit is awake (press a button), and make sure pairing is enabled. Then just run ant-downloader. When prompted accept the pairing request on your GPS device. Once request is accepted a key is saved and you should not need to pair again.

You may also choose to enable "Force Downloads" on your device. This will cause all old data to be downloaded. WARNING, It will also upload all data to Garmin Connect.

Also the device must not be claimed by the usbserial kernel module. if you get an error and dmesg says

 usb 3-1.2: usbfs: interface 0 claimed by usbserial_generic while 'ant-downloader' sets config #1

try unloading the 'usbserial' kernel module.

Configuration

See antd.cfg from configuration options including where files are saved, and Garmin Connect login details. The file will be created in ~/.antd the first time you run the program.

python-ant-downloader's People

Contributors

braiden avatar cz8s avatar jdeerhake avatar jzacsh avatar superm1 avatar thewtex avatar xaviershay avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.