I followed the steps in thatÂ blog post pretty closely, so this is largely a re-hash of that post for my own reference. But here’s what I did on OSX:
- Make a copy of the garmin device using dd
dd if=/dev/disk2 of=~/temp/garmin.img bs=1m
You can (but don’t need to) mount the device using Finder:
- Get sleuthkit
- Download latest from 9033839013
- Fix the junit path in bindings/java/nbproject/project.xml . Change from:
- Fix the junit version in bindings/java/ivy.xml . Change from:
<dependency org="org.xerial" name="sqlite-jdbc" rev="3.8.0-SNAPSHOT" >
<dependency org="org.xerial" name="sqlite-jdbc" rev="3.8.7" >
./configure && make
- Get scalpel:
git clone /github.com/machn1k/Scalpel-2.0.git . ./configure && make && sudo make install
- Create a scalpel.conf:
#fit file definition from /www.thice.nl/recovering-data-from-garmin-edge500 #fit y 1000000 \x0E\x10\x98\x00??????\x00\x2E\x46\x49\x54\x00\x00\x40\x00 \x01\x00\x00\x1A\x01??# updated fit definition as per data on my Garmin fit y 1000000 \x0E\x10\x98\x00???\x00\x2E\x46\x49\x54\x00\x00\x40\x00 \x01\x00\x00\x1A\x01??
It’s worth noting that the first definition does find some files on the device (perhaps from an earlier version of the firmware), but the second definition finds a lot more files (including the recent file I was missing). I found the common header and footer by using hexdump on some known good .fit files on the device, e.g.
for f in $(ls -1 2014-1*.fit); do hexdump -n16 $f; done
- Run scalpel on the copy of the garmin device:
scalpel -c scalpel.conf -o garmin.out garmin.img
There will now be a bunch of files in the garmin.out directory
- Get FitDump and GarminFit perl scripts:
mkdir fitdump; cd fitdump curl /pub.ks-and-ks.ne.jp/cycling/pub/fitdump-0.04.tar.gz > fitddump/fitdump.tar.gz curl /pub.ks-and-ks.ne.jp/cycling/pub/GarminFIT-0.12.tar.gz > garminfit.tar.gz tar -xzvf fitdump.tar.gz tar -xzvf garminfit.tar.gz
- Do something like this to find the file you're looking for
for f in $(ls -1 ../../garmin.out/fit-0-0/*.fit); do echo $f; ./fitdump $f | grep time_created; done > ~/temp/garmin.out/time_created.out
Then you can look through the time_created.out file to find the file containing the ride you're missing based on the date. You can then directly upload this file to Strava
After migrating to my new mac, I found I needed to reinstall the ssh2 PHP extension:
Fatal error: Call to undefined function ssh2_connect() in /Users/ethan/Sites/myfile.php on line 40
Since this is the second time I’ve had to do this now, and it took a bit of head scratching both times, I figured I’d document how to install this extension under Mac OS 10.6… Read the rest of this entry »
A very minor update to make the widget work with the recent change to the TPG site (seems someone decided they should refer to Downloads instead of Download).
Note that previous versions of the widget are no longer functional
To enable diagnostics for the TPG widget:
- Open ~/Library/Widgets/TPG.wdgt/TPG.js in a text editor
- Change the first line of code (past the documentation and revision historyFrom:
/ global debug variable var _debug = false;
/ global debug variable var _debug = true;
- Save and quit
- On the dashboard, close the TPG widget and then add it again
- Check /var/log/system.log (via the terminal, or the console app) for entries marked with 3thirty.
This will show the username that has been recorded, and the values that are used to calculate the usage meters
I’ve knocked up a simple calculator dashboard widget for OS X. It doesn’t look that pretty, but it utilises the power of bc, and provides a quick and easy front end for it.
The release notes:
/* * Simple bc WidgetÂ * URL: /www.3thirty.net/simple-bc * Author: Ethan Smith * Created: 22/10/08 * * Simple dashborad calculator utilising the baisc calculator, bc. This is really just an interface that * passes exactly what you enter to the bc command and prints out the result. The idea behind this widget * is to make it really quick and easy to perform simple calculations. * * Some of the things that this widget does (aka why this is better than the commandline): * - Typing anywhere on the widget will start typing in the sum box * - Pressing enter will perform the calculation * - Pressing escape will clear the textfield * - Starting a calculation with an arithmetic operator (+-/*) will perform the calculation against * the previous result * - The "previous result variable" allows you to substitute the previous result at any point in * the current calculation (note that this can be a single letter or a longer word, but you'll have * all sorts of problems if you try to use a number!) * * Some of the bc features that are known to work: * - Enter almost anything and bc will do it's best to make a calculation out of it * Example "xyz + 14 - ff * 2 - (v + c)" = 14 * - multiline calculations are supported, with a semicolon between each calculation. The results * will also be separated by semicolons. * Example: "10+4; 10+5;" = 14;15 * - variable assignment works. Just be careful that variable names don't get trodden on by the * "previous result variable". * Example: "x=12; x=x+48; x-10" = 50 * * Notes on the implementation of bc: * - this widget really just passes through the calculation almost exactly as entered. Try running * bc from the commandline, see "man bc" or /en.wikipedia.org/wiki/Bc_(Unix) for more * - the scale (number of decimal places) is set to 3 by the widget */
2672423438 widget for OS X (zip, 48kb)
Released a new feature today. As requested, we are now storing and graphing monthly total distance for the current year. This is only available on the BikeJournal Tab on your profile
The current month actual figure is shown in red, and the grey bar behind it is the projection, assuming that you continue riding at the rate you have been so far for the month, so this figure will get more accurate the closer we get to the end of the month.
You can see this in action on my BikeJournal Tab or by adding BikeJournal to your profile tabs.
Hope everyone enjoys the new feature – let me know your thoughts and any suggestions!
I’ve made some updates to the pull box – some performance improvements and have added a new Tab View.
This Tab View also shows the two leaderboards – Yellow Jersey with the top 5 users for the month by distance, and Green Jersey for the top 5 riders with by average speed. If you don’t record distance or speed for your rides, you won’t be included in these leaderboards.
To add the Tab view to your profile, log in to your profile and click the + button and select BikeJournal. It’s that easy.
Get in touch if you have any questions or feedback about this!
two-mast (version 1.10, 92kb)
- Fixed major bug in percentage calculations that was causing us to always use the 10% warning, 20% critical limits
- Modified horizontalIndicator behaviour – don’t show critical unless we are over the critical limit. Basically, this has the effect of “rounding down” from critical to warning, which is useful, given the granularity of the indicator I’m using
- Removed target percentage, it’s unnecessary
- Fixed minor bug with clicking on the two targets in quick succession
I think it’s time to update this page with product info and revision history, instead of having separate posts for each update….