Success!

Now that I have a few more runs worth of data, I was able to pick a little bit of information out of the miCoach binaries.

There are 40 EXRCS001.BIN files on the device (after the data has been unpacked), each one corresponding to an individual workout. This means you can store up to 40 workouts before you need to sync the device again. Knowing that, I had a bit of a better idea what I was looking at.

The miCoach pacer records various data points periodically – every few seconds as far as I can tell. The record length for these data points is 14 bytes. So far we have:
0x1E – row number, increments one each row
0×21 – distance
0×23 & 0×24 – Not sure exactly what the values are, but these dropped to 0 at a point where I paused the pacer and the miCoach graph shows a stride/pace of 0
0×25 – stride rate
0×26 – same situation as 0×23 and 0×24
0×27 – heart rate
0×28 – Not sure what this is, but it’s the same for each row
0×29 – time in. I think this is in seconds, but I’m not sure. It goes up by 5 each record.

At the start of the file, from 0×07 to 0×10, is a bunch of data that I suspect to be the date but haven’t figured out an obvious format. For my workout on 5/20/2010 9:58am, the hex values are 01 5A 4F B4 3C A7 53 B4 3C 24 8C

Yay progress!

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

I've had the miCoach for 2 days now, and I have to say I'm pretty happy with it. If you remember, I got the miCoach because I wanted an exercise logger to hack around with and wasn't in the mood to give Apple any of my money. I haven't had much time to tinker with the device or website itself; the website uses Flash / AMF and the device itself uses a proprietary binary format.

Here's my impression so far:

Accuracy

I ran on a treadmill and the miCoach was true to the treamill's distance calculation within two hundredths of a mile. The miCoach measures how for my foot travels, and the treadmill measures how far the belt travels. I'm not sure which I'm inclined to believe, but in truth two hundredths of a mile is fine for my running.

For some reason gym equipment never registers my heart rate, so I don't have a good way of comparing the miCoach heart rate monitor to anything else. But checking my pulse the old school way (two fingers on my neck) after my run came out to about what the miCoach said.

Sync / Online Interface

The syncing process is pretty smooth, you plug the pacer into your computer and the miCoach application sends your data to their servers. The graphs are nice looking. I like showing my pace alongside the heart rate data, it's interesting to see how small changes in the speed of my running affect my heart rate. Running at 5.5 mph is fine, but pushing it up to 6 mph over a few minutes sends my heart into the red.

There's not much in the way of social interaction, but since no one else I know has one of these that's not a big drawback for me.

Coaching / Music

If you like, the pacer will coach you through various predefined workouts or your own custom plans based on either runnin speed or heart rate. I still prefer my workout-specific running mixes to the random British dude talking over a generic playlist, but it's a well implemented feature.

The miCoach daisy chains itself between your MP3 player and headphones. It uses a standard 3.5mm jack so it will work with pretty much any audio source. My gym has TVs and headphone jacks on each treadmill (yes, I go to a fancy gym) and it has been pretty exciting to listen to the audio from the TV instead of just reading the closed captions, while still getting audio cues from the pacer for when to slow down and speed up.

Value

The miCoach is not cheap. I got mine from RoadRunner Sports for $125 shipped. As a running tracker, it's probably only worth it if you're serious about running. Otherwise the $30 Nike+ is much more affordable (assuming you have a compatible iPod; I didn't).

However, comparing the miCoach to the Nike+ is a bit unfair. Nike+ is a pedometer, whereas miCoach is a heart rate monitor with online tracking and a pedometer. This is significant because the miCoach is useful for pretty much any type of exercise, not just running. Since it measures your heart rate and not just your footfalls it's still useful for rowing, cycling, etc. You won't get the same type of distance/pace data, obviously.

I really wish there was a standard for exercise data. The ergometer we got back in 2000 has the ability to interface with a PC, so there's no technical reason all the equipment couldn't feed into the same tracking systems. But since everyone has their own proprietary thing we end up with a separate tracker for each type of workout data. Bleh.

Hacking

Using FireBug I watched a few of the AMF calls, but since I have no experience with AMF it will be a while before I can see if that's something I can use in my own code. In theory if the Flash client can do it I should be able to (since Flash is run locally), but it's been a very long time since I looked at anything Flash related. I wish they'd just open an API. It could only help adoption of the device if third-party sites were able to support it.

Upon mounting the device in Windows it shows up as a removable drive with two files on it, adidas.bin and adidas.dat. There doesn't appear to be anything in adidas.bin, and adidas.dat looks to be encrypted/compressed/otherwise a pain.

However! Once you run the Adidas MiCoach Manager software, a ton of files show up on the device (I'm assuming decompressed from adidas.dat). From my 28 minute workout there are 40 files named EXRCS###.bin, 16 WKDEF###.bin, and a handful of other binaries. A quick stab with IDA Pro didn't turn up anything super exciting, but my guess is that the EXRCS files are completed workout data and the WKDEF are pre-programmed workouts.

I have a ton of dev work to do over the next month, and a wedding to start planning, so it will probably be a while before I can really look at these. But it's a start!

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

In preparation to tinker with the miCoach data, I started with some better-travelled exercise bits: WiiFit body test data. Starting with Jansen Price’s excellent blog post on the subject, I slowly worked through the data and wrote a python script to interpret the binaries and save them to a CSV. By using the excellent flot javascript library, I was able to generate the nice graph above. There was a lot of trial and error, but here’s an overview of the process:

  1. Copy Wii save game data to the SD card. This is done from Wii Options > Data Management > Save Data > Wii
  2. Find the save game data on the card. It’s in something like ‘private/wii/title/RFPE’, although different regions may have slightly different codes. RFPE is the code for WiiFit Plus. Copy the WiiFit data.bin file from the SD card to your local machine.
  3. Decrypt data.bin. This is explained pretty well here. To create the keys I ended up creating text files with the hex string for each and then using “xxd -r -p sd_iv_hex sd_iv” et al to save a binary version. If you’re getting “MD5 mismatch” errors, you probably saved the keys incorrectly. If you aren’t sure, check the file size. They should be 16 bytes each.
  4. Run the decrypted RPHealth.dat through a parser (I wrote one in Python for this)
  5. Run the CSV through your favorite graph generation library. I use flot because Google Charts don’t handle dates very well.

Thanks to Jansen’s handy chart of which bits are where, writing the parser was pretty easy. This isn’t the most elegant code I’ve ever written, but it gets the job done:

import struct
import string
import csv
 
 
mii = 0
#we know that each record is 0x9271 bytes long
record_length = 0x9281
 
record_start = 0
 
#path to WiiFit data file
infile = 'RPHealth.dat'
 
FH = open(infile, 'rb');
 
 
## It loops through 7 profiles, because I happen to know I have 7.
## A better approach would be to go to the end of the file, of course.
while (mii < 7):
 
    #go to the start of the current record
    FH.seek(record_start)
 
    #read the first 30 bytes (header + name)
    line = FH.read(30)
 
    #for some reason names are stored as N a m e instead of Name.
    #Throw away the header any extranous spaces
    data = struct.unpack("<9xcxcxcxcxcxcxcxcxcxcxc",line)
 
    #Condense our unpacked characters into a string
    wf_name = string.join(data,'')
 
    #open a new CSV file for this person.
    #If the name is shorter than 4 characters or has whitespace, the script
    #will exit. This should probably be fixed.
    FW = open('WiiFit_'+wf_name[0:4]+'.csv', 'w')
    recordWriter = csv.writer(FW, delimiter=",", quotechar="'", quoting=csv.QUOTE_MINIMAL)
 
    #Weigh-in data starts 0x38a1 bytes into the record
    FH.seek(record_start + 0x38a1)
 
    #we'll loop through the record data until it starts coming up blank
    while(1):
        #4 byte date 
        line = FH.read(4)
        data = struct.unpack(">i",line)
        #bit shift to get the month, day, and year. Could also get time if you wanted.
        year = data[0] >> 20 & 0x7ff
        month = data[0] >> 16 & 0xf
        day = data[0] >> 11 & 0x1f
 
        #break the loop if the date comes back 0
        if(year == 0): break
 
        #format the date into something humans like to read
        date = str(int(year)) + '-' + str(int(month)+1) + '-' + str(int(day))
 
        #the next three sets of 2 byte data represent weight, BMI, and balance
        line = FH.read(17)
        data = struct.unpack(">3H",line[0:6])
 
        recordWriter.writerow([date] + [data[0]] + [data[1]] + [data[2]])
 
 
    #now that we're done with the record, advance to the start of the next one
    record_start = record_start + record_length
 
    mii = mii+1

You can download a copy of it here.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

I have to give Adidas credit where credit is due. They’ve managed to tie a $140 upsell to a pair of shoes I bought for $55.

It’s no secret that I, like many nerds, suffer from gadget lust. When I see a new gadget, my thought process goes something like: “Oh that’s so neat… but it’s kind of expensive, and I could build something way better for less money… but I’m never going to actually get around to doing that so I’ll just buy it.”

So when I noticed a sticker that said “miCoach compatible” on the new pair of running shoes I got from the clearance rack at DSW, I was intrigued. “Compatible” is almost certainly a hardware term. Was miCoach some sort of Adidas version of the Nike+? Did this mean that my shoe had a secret cavity for storing circuit boards? And would that cavity also fit the Nike+ so I could log my workout data automatically?

The answers to all of the above was yes. Hooray!

I did some research on the miCoach. It’s similar to the Nike+ (widget you put in your shoe to track your workout) but is more of a comprehensive package (includes a heart rate monitor and pacing tool which tells you to slow down / speed up according to your HR). It’s also about $100 more expensive than the Nike+. The shoe sensor has a user replaceable battery, but still.

Then I did some research on the data export. Because what fun is collecting data if you can only get it via someone else’s bad UI? Nike+ hacking is well traversed ground, with easy access to the XML workout data. miCoach doesn’t seem to have much going on, and uses a proprietary binary format to store the workout data (which is then presumably decoded by their servers). Gross.

I was all set to buy a Nike+ when I found out that my 5th generation iPod was not compatible with it. In order to use the Nike+ I’d have to pick up a new Nano. The price of the Nike+ just got a lot more expensive.

After talking to some of the Resistor folks I decided tinkering with the miCoach could be fun. Between the raw data from the device and whatever software is used to transmit it to the the miCoach servers we should be able to get *something* interesting. It’s admittedly pretty far out of the realm of things I’ve done before, so it’ll either be a good learning experience or a huge road block / dead end.

We’ll see when it gets here next week!

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

I’m actually just starting week 4, but I realize I forgot to post last week’s track list. If anyone wants a copy of the mix drop me a line and I can post it you can download it here.

Of Montreal – Sink the Seine
Duran Duran – Notorious
YTMND – Tubesdance
Elf Power – Under the Northern Sky
No Doubt – Excuse Me Mr
Elliot Smith – Son of Sam
White Stripes – Fell in Love with a Girl
Soul Couging – Adolpha Zantziger
Weezer – Hash Pipe
Ani DiFranco – Virtue

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

Another thing that bugged me about the LEGO store…

One of the employees was enthusiastically telling us all about LEGO (as employees ought to), and showed us a magazine dedicated to “Adult fans of LEGO” or AFOL.”

He then went on to explain that within AFOL is a subgroup, AFFOL or “Adult Female Fans of LEGO,” a rare and mystical breed of AFOL. He proceeded to flip through the magazine to show us a photo of a REAL LIVE LADY who ACTUALLY BUILDS WITH LEGOS!

I wasn’t in the mood to pick a fight over nomenclature, but really? When are people going to realize that singling out women in a male-dominated field, be it work or play, is counterproductive? I’m not an AFFOL any more than I am a “girl gamer.” Drop the extra adjective, people.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

I’m in need of many, many LEGO bricks for what is currently a SECRET project.

This week I went to the LEGO store in Paramus, NJ. It was a bit of a let down, and not really worth the hour of fighting traffic it took to get there. They didn’t have any big tubs o’ bricks, just kits, and their pick-a-brick selection was pretty limited (I was looking for 1×2 bricks).

What I DID find was an amazing resource, Brick Link. Bricklink is like eBay for LEGO bricks. You can find pretty much any size/shape/color. Their interface is a little clunky, without integrated shipping or payment, but it gets the job done.

I ordered roughly 700 red LEGO bricks for $40, most of which was the cost of shipping. It’s marginally cheaper than the cost per brick of a big tub, but I was able to hand select the colors and shapes that I wanted.

More details when I get the LEGO bricks in…

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

This week I mixed my own Couch to 5k track. Rather than just slap the vocal cues onto a mix, I picked songs that fit the tempo and length of each run/walk segment. The result is interesting, although it sacrifices musical flow in a few places. It’s difficult to find songs that are exactly 1.5 and 2 minutes long, so some of them are cut short in places.

The track list:
Me First and the Gimme Gimmies – Tomorrow
K’s Choice – Paradise in Me
Screeching Weasel – Totally
Men Without Hats – Safety Dance
The 5,6,7,8′s – Woo Hoo
The Smiths – Girlfriend in a Coma
Supernova – Vitamins
The Beatles – Elanor Rigby
Freezepop – Brain Power
Amelie Soundtrack – La Noyee
Q and Not U – Little Sparkee
REM – Stand
Katamari – Overture II

You can download it here (Warning: the file is about 35 meg).

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter


I took a cardboard Uline box downstairs for recycling, and while it was patiently waiting to be taken out the kittens discovered it. And they love it. They loved the box so much that rather than take it out, I decided to convert it into a kitten gym.

I taped the top shut and then cut a circular hole for them to climb in and out of. I placed a smaller box, about 1/3 the height of the big one, under the hole so they could more easily get out. There’s also two door flaps cut in the side and two long, narrow rectangular flaps (one on the top and one of the side). The long flaps let light in, let paws out (yaknow, to attack whoever is outside the box), and the bit of cardboard flapping around gives them something to attack.

It took them all of 5 minutes to make and two minutes for the kittens to realize that this new box was the most exciting thing in the world. I consider it time well spent.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

The main reason I chose the B&N nook over the Kindle when I bought an ebook reader was the fact that the nook supports PDF and Epub. While the nook's PDF support is really only suited for text, it doesn't do a very good job with graphs and images, I find that I can convert most anything a nook-friendly format using Calibre.

One thing the nook handles surprisingly well is manga, Japanese comic books. The nook doesn't do so well with full sized American comics due to resizing (thus rendering text illegible), but the smaller form factor of manga is perfect for the nook's screen size:

A lot of manga is only commercially available in Japanese, and the English translation are largely done by fans. The translated files are available in .CBR or .CBZ format, which is really just a renamed zip file full of images. Calibre does a great job of converting the CBR files in to an Epub suitable for the nook. The pages are very readable, and the artwork looks good.

There was also some new nook firmware released today. While most of the attention is going to the new browser (in beta) and games, the page turns are noticibly faster in 1.3. They're now fast enough that I don't really notice them, and consider it on par with the amount of time it takes to physically turn a page:

The nook got off to a shaky start, but it's turning out to be a really nice ebook reader. The games are cute, but not something I see myself using much. Hopefully when the browser is out of beta it will allow for downloading books through it (right now you have to cable sync or use B&Ns app). Or better yet, I hope they let folks develop their own apps for them. A Calibre client for the nook would be great.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • RSS
  • StumbleUpon
  • Twitter

« Older entries § Newer entries »