« Linux + Nike+ SportBand | トップページ | 2010三浦国際市民マラソン »

Linux program for Nike+ Sportband

I recently purchased Nike+ Sportband, this is a nice useful device, I really love it. However, since I usually use Linux, I don't want to boot Windows PC for just transfer data from it. I search a software to transfer data on Linux, but no luck.

I decided to create the software myself and start learning how to transfer.

I analysed the USB packet on Windows and successfully get a run data from Sportband. Here is the program for transfer run data from Sportband on Linux and translate it to distance and duration.

I analysed the run data, here is what I understand;

  • Run data is start with code "0xe300".
  • Individual run data is start with "0xe800" and end with "0xe900".
  • 0xe800 followed by date and time which is 32bit time_t format and 24 byte data.
  • 0xe900 followed by date and time which is 32bit time_t format and 6 byte data.
  • When press pause, code "0xea00" is recorded followed by 32bit date and time.
  • When press pause again (resume), code "0xeb00" is recorded followed by 32bit date and time.
  • When activity changes from walk to run, code 0xe200 is recorded.
  • When activity changes from run to walk, code 0xe201 is recorded.
  • Three bit data is recorded every second, then five seconds data are packed in a 16bit data.
  • Activity data for every second means how long you ran in the second (zero to six). Seven means no signal from sensor (for example, you stopped at traffic light).

From my analysis (and assumption) , I wrote the program for translate the data into distance and duration. Please refer my latest post.

I wonder if somebody help for test the program.

The C source code for transfer and analyse the data can be downloaded from here.


« Linux + Nike+ SportBand | トップページ | 2010三浦国際市民マラソン »



Hey, Do you mind if I post your code to github.com as open source (and attribute the original work to you)? This would be really nice, because I could easily work with others on maintaining this code going forward. If so, What license do you want me to use? Should I just use MIT license (http://opensource.org/licenses/MIT)?

Look forward to hearing back from you! Thanks for writing and sharing this code!

投稿: Jon | 2012年11月 8日 (木) 12時55分

Thanks for your quick reply. I see I thought you were saving the entire file off of the sportband. I am using USBtrace, it seems to be that it is not capturing all the data traffic.

Thanks again

投稿: Ron | 2011年3月29日 (火) 13時23分

> Ron,
I used "USB Snoopy" to analyze the protocol and hacking.

投稿: | 2011年3月29日 (火) 10時22分

Hi would you mind explaning how you were able to get the dumped file off of the nike sportband?

Thanks for the help

投稿: Ron | 2011年3月29日 (火) 08時01分

> rajibe

Thank you for the comment.
Yes, we can work together to make our program better. I will contact you via email.

投稿: knz | 2010年9月 6日 (月) 13時04分

I wrote a Linux driver for sportband.


Thanks for your ideas, I would like to contact you to work together and improve the project.


投稿: rajibe | 2010年9月 5日 (日) 06時15分

Hi Wesley,
You need libusb 0.1 package to build the program.

please try "yum install libusb" or visit www.libusb.org to get latest version.

Please note you need libusb 0.1 not libusb 1.0. These two version are not compatible.

投稿: knz | 2010年8月18日 (水) 07時58分


I am trying to run your script but get an error "/usr/bin/ld: cannot find -lusb". Any ideas - I'm on Ubuntu 10.04.

投稿: Wesley | 2010年8月18日 (水) 02時57分

> kelner
Thanks for the comment.
I updated the program and posted new article.
I'd like you to down load and confirm the result again...

投稿: knz | 2010年6月 4日 (金) 18時41分


Try to decode dumped file with 'hexdump' tools. It looks more clear. There is 2 times more lines in dumped file than my registered runs. Probably info about each run is writed into two lines.

投稿: kelner | 2010年6月 4日 (金) 08時41分

> Giorgio
Thank you for the comment. It is very nice if we could work together!

投稿: knz | 2010年4月23日 (金) 08時26分

Hi, I am the guy who made Nike4all. I was asked if that would work with the sportband too and (having not idea) I stumbled upon your page. Would you like to write me an email? We can try to work together and crack this.

投稿: Giorgio | 2010年4月23日 (金) 06時36分

Thank you for the comment.
Yes, I still working on the project. I wonder if some smart guy find out haw to convert a binary log to a XML file...

投稿: knz | 2010年4月15日 (木) 12時54分

are you still working on this project? How can we collaborate with you? It will be an usefull piece of code :D

投稿: hamen | 2010年4月15日 (木) 00時35分

Thank you for the comment.
The program in here is useless. It just upload the binaly dump from sportband.
I'm still trying to analyze the binaly data but still no progress.

投稿: knz | 2010年4月10日 (土) 07時58分

I am thinking about buying a nike sportband. Have you made any progress? From what I understand so far, the end result should be an XML file that can be uploaded to the Nike+ site with something like nike4all : http://gilest.ro/2009/nike4all-upload-your-nike-data-to-the-officiale-nike-website/

投稿: Erik | 2010年4月10日 (土) 03時39分

> lachose
Possibly you don't have access permission to the USB device. If so, you should use "su" to get root permission.
If the problem persists, please let me know the error message and your environment.....

投稿: | 2010年4月 8日 (木) 09時48分

Did you ever manage to get this to work? I just bought a sportband and cannot get it to work under linux at all...

投稿: lachose | 2010年4月 8日 (木) 08時04分



この記事へのトラックバック一覧です: Linux program for Nike+ Sportband:

« Linux + Nike+ SportBand | トップページ | 2010三浦国際市民マラソン »