Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Download *.fit activity files from Garmin Fenix watches via USB MTP

License

Notifications You must be signed in to change notification settings

geberl/python-fit-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-fit-downloader

Dependencies

mtpy

https://github.com/ldo/mtpy

Got the file mtpy.py from there, changed the lines for macOS:

29    mtp = ct.cdll.LoadLibrary("libmtp.so.9")
29    mtp = ct.cdll.LoadLibrary("libmtp.dylib")

54    libc = ct.cdll.LoadLibrary("libc.so.6")
54    libc = ct.cdll.LoadLibrary("libSystem.dylib")

Note: I also tried https://github.com/emdete/python-mtp and couldnt't get it to run.

libmtp

Installed libmtp via brew:

brew install libmtp

Copied the dylib into the script directory, I suppose linking it to an expected place would also work:

cp /opt/homebrew/Cellar/libmtp/1.1.20/lib/libmtp.dylib .

Usage

Running it to list and download activitiy *.fit files:

cd python-fit-downloader
python download.py

# Device 0 (VID=091e and PID=4cd8) is a Garmin Fenix 6S Pro/Sapphire.
# Downloading 2023-03-13-18-23-31.fit 86.9 KiB

Target file path: python-fit-downloader/activities/2023/2023-03-13-18-23-31.fit

Alias

Put the following into your .zshrc:

alias fitdl='cd "/Users/guenther/Development/private/python-fit-downloader/" && python download.py && cd -'

About

Download *.fit activity files from Garmin Fenix watches via USB MTP

Topics

Resources

License

Stars

Watchers

Forks

Languages