Suunto makes some solid sport-watches, problem is that the management software is comprised of a closed source synchronization program (compatible with Windows and OSX only) and some cancerous cloud web interface accessible directly from their website.
Even putting aside my personal aversion for closed source software, it is clear that this approach is retarded because an internet connection is required to be able to download any kind of data from the watch.
What if I don’t have any signal? What if I don’t want to upload my data to Suunto’s servers?
Luckily some good lads reverse engineered the communication protocol used by the watch to “speak” with the PC synchronization client, and even more, they also wrote an open source Linux compatible tool that can be used to download data from the watch.
This tool is called: Openambit
The version included in Fedora 27 repositories is not up to date and does not support the Ambit3 Run I own, luckily the github version does.
.:. Compile Openambit from source
First of all install some libraries that are required in order to successfully compile Openambit:
$ dnf install qt5-qtbase-devel qt5-linguist systemd-devel
Clone Openambit’s official git repository:
$ git clone https://github.com/openambitproject/openambit.git
Run the commands one by one in a terminal or run the following script to automagically compile and install openambit.
#!/bin/sh # git repo: https://github.com/openambitproject/openambit.git # deps: qt5-qtbase-devel qt5-linguist systemd-devel SRC_DIR="$(pwd)/openambit" INSTALL_DIR="/opt/openambit" DEBUG=0 FIRST_INSTALL=0 CORE_N=17 # compile # cd $SRC_DIR git pull rm -rf build && mkdir build && cd build if [ $DEBUG -eq "1" ] then cmake -DUSE_QT5=1 CMAKE_BUILD_TYPE=Debug .DEBUG_PRINT_INFO=1 .. else cmake -DUSE_QT5=1 .. fi time make -j$CORE_N # install # sudo rm -rf $INSTALL_DIR && sudo mkdir $INSTALL_DIR sudo cp -r $SRC_DIR/build/src/* $INSTALL_DIR sudo cp -r $SRC_DIR/tools/openambit2tcx-lap.py $INSTALL_DIR sudo chmod 755 $INSTALL_DIR/openambit2gpx.py if [ $FIRST_INSTALL -eq "1" ] then sudo ln -s $INSTALL_DIR/openambit/openambit /usr/sbin/openambit sudo cp $SRC_DIR/src/libambit/libambit.rules /etc/udev/rules.d/ sudo ln -s $INSTALL_DIR/openambit2tcx-lap.py /usr/sbin/openambit2tcx-lap.py sudo cp $SRC_DIR/icon.png $INSTALL_DIR fi
The first time I had the watch attached to my PC openambit was unable to connect to the device, compiling with DEBUG flags showed what the error was:
libambit INFO: ambit_device_info_new(): ignoring unknown device (VID/PID: 0b0e/0305) libambit INFO: ambit_device_info_new(): ignoring unknown device (VID/PID: 1af3/0001) libambit INFO: ambit_device_info_new(): ignoring unknown device (VID/PID: 2516/001a) libambit INFO: ambit_device_info_new(): ignoring unknown device (VID/PID: 2516/001a) libambit INFO: ambit_device_info_new(): HID : /dev/hidraw4: 'Suunto Ambit' (serial: xxx, VID/PID: xxxx/yyyy) libambit ERROR: ambit_device_info_new(): cannot open HID device (/dev/hidraw4): Permission denied
To solve the issue simply chmod the device file.
sudo chmod 666 /dev/hidraw4
.:. Compile GoldenCheetah from source
GoldenCheetah is not present in Fedora 27 repositories, installing it from source is the best option.
First of all, let’s add some required packages and clone the official git repository:
$ dnf install bison flex byacc qt5-qtbase-devel qt5-qtserialport-devel qt5-qtmultimedia-devel qt5-qtwebkit-devel qt5-qtcharts-devel qt5-qtsvg-devel qt5-qtconnectivity-devel openssl-devel $ git clone https://github.com/GoldenCheetah/GoldenCheetah.git
The following script atomatically compile and install the program:
#!/bin/sh # git repo: https://github.com/GoldenCheetah/GoldenCheetah.git # deps: bison flex byacc qt5-qtbase-devel qt5-qtserialport-devel qt5-qtmultimedia-devel qt5-qtwebkit-devel qt5-qtcharts-devel qt5-qtsvg-devel qt5-qtconnectivity-devel openssl-devel SRC_DIR="$(pwd)/GoldenCheetah" INSTALL_DIR="/opt/GoldenCheetah" FIRST_INSTALL=0 CORE_N=17 cd $SRC_DIR cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri echo "QMAKE_CXXFLAGS += -O3 MAKE_LEX = flex QMAKE_YACC = bison LIBZ_LIBS = -lz QMAKE_LRELEASE = /usr/bin/lrelease-qt5" > src/gcconfig.pri make clean qmake -recursive time make -j$CORE_N if [ $FIRST_INSTALL -eq 1 ] then sudo mkdir $INSTALL_DIR fi sudo cp $SRC_DIR/src/GoldenCheetah $INSTALL_DIR sudo cp $SRC_DIR/src/Resources/images/gc.png $INSTALL_DIR if [ $FIRST_INSTALL -eq 1 ] then sudo ln -s $INSTALL_DIR/GoldenCheetah /usb/sbin/GoldenCheetah fi
.:. Converting Openambit logfiles to TCX format
Openambit logs are XML files but they are not recognized by GoldenCheetah so it is impossible to load them.
Openambit include a Python script to convert the logs to standard GPX files, unfortunately GPX does not store any kind of addition data other than GPU coordinates.
I could not find any existing program/script capable of converting Openambit logs into TCX files, so I wrote one.
The script can be found on my github, hopefully it will also be accepted into openambit official repo: openambit2tcx-lap.py