My last few blog entries have been about the iPod+Nike kit for the iPod.
I’ve completed my first 5mile run using my temporary shoe ‘hack’ to secure the sensor between the shoe tongue and the laces. I’ve uploaded my data to the nikeplus website and that’s when I experienced the first real disappointment with this product.
The Nikeplus website is a bit of a let down. It looks pretty enough as it’s all Flash driven but it lacking in several other areas. Firstly, there’s no sense of community. You can look up the ‘leader-boards’ for those who’ve run the furthest, those who’ve run for the longest and those who’ve turned in quick times for 5k and 10k runs - but that’s about it. You can’t browse their stats or their run histories to see how they’ve improved. I can appreciate that some runners will want to keep their data private but an opt-in setting to “share my stats with the community” would be a welcome improvement.

Click for a larger version
Worse yet; I can’t share my data with anyone. I was going to link up to my stats so you can browse my data and get a feel for the system but I can’t even do that — unless I gave out my log in information. In this age of community focused web-applications it feels like a bit of a step back.
This got me thinking: surely there’s a way to extract the run data from one’s iPod in it’s raw format. Apple are fond of using either XML or SQLite to store data locally so reading the data wouldn’t be a problem. I ran (pun intended) a few spotlight searches to see if the data is cached on my harddrive. It’s not. Hmmm.
I plugged back in my iPod Nano and enabled ‘Disk Mode’ and double clicked the icon. In typical Apple fashion, anything remotely scary is hidden. So, it’s over to terminal.
After a bit of digging around, I located the data. It’s stored in XML format (no surprise there) and is found in: iPod/iPod_Control/Device/Trainer/Workouts/Empeds/{Sensor ID}.
My sensor ID is ‘4H627YP2VSX’. This sensor ID is also located in a file called ‘linkData’ in the Emped folder. I copied the folder to my desktop so I could poke around without risking the data on my iPod.
As the data is in XML format, it makes for easy reading. The first part holds some interesting data:
<runSummary>
<workoutName>Basic</workoutName>
<time>2006-09-05T12:53:57+01:00</time>
<duration>3538875</duration>
<durationString>58:58</durationString>
<distance unit=”km”>8.0492</distance>
<distanceString>5.00 mi</distanceString>
<pace>11:47 min/mi</pace>
<calories>752</calories>
<battery></battery>
<playlistList>
<playlist>
<playlistName>a.Current</playlistName>
</playlist>
</playlistList>
<stepCounts>
<walkBegin>4490</walkBegin>
<walkEnd>9130</walkEnd>
<runBegin>3600</runBegin>
<runEnd>7666</runEnd>
</stepCounts>
</runSummary>
The most curious is the “stepCounts”. This data doesn’t appear to be used by the system currently and it’s unclear how it calculates “walkBegin” and “runBegin”.
Further down the file we get the KM and mile splits.
<startTime>2006-09-05T12:53:57+01:00</startTime>
<snapShotList snapShotType=”kmSplit”>
<snapShot><duration>435715</duration>
<distance>1.002</distance>
</snapShot>
<snapShot><duration>848088</duration>
<distance>2.0</distance>
</snapShot>
<snapShot><duration>1258480</duration>
<distance>3.001</distance>
</snapShot>
<snapShot><duration>1708667</duration>
<distance>4.002</distance>
</snapShot>
<snapShot><duration>2149958</duration>
<distance>5.003</distance>
</snapShot>
<snapShot><duration>2593229</duration>
<distance>6.003</distance>
</snapShot>
<snapShot><duration>3060237</duration>
<distance>7.002</distance>
</snapShot>
<snapShot><duration>3517397</duration>
<distance>8.0</distance>
</snapShot>
</snapShotList>
Right at the bottom is the extended data which must be used to fill the ‘curve’ shown when you’ve uploaded your data and when you view previous runs.
The most exciting prospect is writing a little application that can take this data from your iPod and upload it to another website where it’s stored, consumed and written out without a ton of flash. One could then invite others to download the application and upload their stats and create a ‘real’ community site where runners could browse other’s stats and share their own.
Hmmm….
Update 6th September
I’ve written a dashboard widget that uses the widget.system() functionality in javascript to call a perl script which locates the iPod, iPod serial number and training data. It then POSTs this to a PHP file sitting on this server which simply writes the data to a temporary file.

It’s ugly, but it works
I’m using the ‘lastWorkout.xml file as my test subject. It works well. I can now add a username and password field in the widget and write a basic log in handler and we have the beginnings of our community of runners. The next step is to store the last sync date and upload the real XML files as attachments for storing in a database.
Recent Comments