I just got a Nike+iPod gadget thingy. It's pretty cool, and stores all the running stats in xml files on the iPod, making for easy hacking of the running data. However, that's not what I really want to do with it.
I got one of Sparkfun's USB serial adapters for it, and can now get the raw data off of it. What I need to be able to detect is whether the sensor received an impact.
Before I bought this, I had heard that the sensor in the shoe transmits its ID every time the runner takes a step. However, after a little experimentation, I found this is not the case. Stepping on the sensor activates it, and once active, broadcasts some data chunks every 1 second. The dump below is from me dropping the sensor on the table, then letting it sit there until it stopped sending. You can see it took 13 seconds of just sitting there before it stopped sending data.
(If you look closely, you'll see some 010's in there. That is obviously not a real hex byte, and has something to do with the VB program that Sparkfun put together. I can't actually get the checksums to work out, otherwise I'd be able to tell what it should be.)
Here is what we know so far, compiled from here and here
FF 55 : Apple Accessory Protocol header 1E : length of packet data (from mode through data before checksum) 09 : mode for Nike+ 0D 0D : command 01 : unknown (start of parameter) 70 C5 07 30 : my transmitter's ID A5 : appears to be a counter, always starts with A, counts from 0-F next 21 bytes : unknown
79 : 8 bit additive checksum ((sum of all length/mode/command/parameter bytes) & 0xFF) Note: I can't actually get this to calculate out correct on any of the rows. I must be doing something wrong.
Currently I don't have enough information in order to be able to tell whether a packet contains a footstep or not, since it continues to transmit even after it stops getting footsteps.
Links:
- http://www.ipodlinux.org/Apple_Accessory_Protocol
- http://www.ipodlinux.org/forums/viewtopic.php?t=24578
- http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-02/0005.shtml
- http://www.cs.washington.edu/research/systems/privacy.html
- http://en.wikipedia.org/wiki/Nike%2BiPod
- http://www.apple.com/ipod/nike/