Nike4All – Upload your Nike+ data to the official Nike+ website.

After a couple of days of hacking, I managed to get a way to upload the data from Nike+Ipod device to your Nikerunning account. No iTunes needed! That is quite cool considering that the Nike+ Ipod Sport kit has been out for a while (2006 according to wikipedia) and linux users had no way to sync their runs without iTunes. Until now.

Installation.
Simply download the python script from here. It’s a single file and all it requires is Python (was tested with 2.5 and 2.6 – should work also with 3.0). You can place the script wherever you want. It is suggested to save the script in /usr/bin so that you can run it without typing the path everytime.

GUI.
A graphical interface is also available, as Screenlet. Get it here.


First time run – pairing your data with your account.

1. If you don’t have one yet, create an account on the Nike+ website. You will be asked for an email address, password, personal details and, at the end, for a screenname. Just go throughout the entire registration. If you already have an account on the site, skip this step.

2. Make sure you are not logged in into your Nike+ account (hit logout).

3. Start nike4all issuing the following command:

gg@fly-home:$ nike4all.py -createAccount
Go to this URL and login whit username and password of the account you just created
Url to visit: http://www.nike.com/nikeplus/?token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&v=2
Press enter to continue only AFTER you login

4. After a few seconds you will be asked to visit a website: simply open that URL in your favourite browser and login using your credentials. Edit [28.02.11]: it seems Chrome may cause some troubles at this step. If it doesn’t work please use another browser; Firefox should do it.

5. After having done so, go back to the command line and hit Enter. The program will then say:
Congratulation, your status is now confirmed
The user <screenName> is now associated to the pin xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
Your pin was successfully saved in the configuration file
To update new files connect the iPod and use the following command:
nike4all -sync

The configuration file is in your home folder and it is called
.nike+rc
the running files you will be syncing will also be backup in the same folder
~/nike+
you can change the backup folder by editing the configuration file with your favorite text editor.

Usage.
You should already know by now.
Other than regular syncing, you can also upload specific files. Start the program without parameters to get a help message.

Caveats and technicalia.
If you already have a Nike+ account, you can still use that one. You existing data will not be lost but you may experiencing problems syncing with iTunes again in the future because your PIN was changed. Your iTunes PIN is stored on your iPod, encrypted (probably with AES CBC 128 bit) in a plist file. Maintaining the same PIN for iTunes and nike4all would require finding that password.

Please, do not use the nikerunning website with any other device that is not an iPod or a sportband. The nikerunning website is a service for Nike customer only and nike4all shall be seen as a tool that allow linux users to use this wonderful service.

License and Credits.
As usual, thanks to python and thank to Ubuntu. Nike4all was developed using only free software and it is released under GPL. If you like the software, please consider donating using the button on the right side – money will go into a research fund (the Institute of garage science).

Bugs and history.
If you find a bug, please drop me an email.
08/15/2009 – first release v0.1

Update (July/2010)

Masatoshi Kanzaki has published a similar tool to upload Nike+ Sport band data from linux! Get it on his blog.

Update (October/2010)
I uploaded the sourcecode on googlecode. Feel free to contribute or fork.

22 Comments

  1. Reply
    John 23 August 2009

    Any plans to release this for Windows?

    • Reply
      gg 23 August 2009

      I haven’t tried yet, but this may already work under Windows, actually.

  2. Reply
    Marek 4 September 2009

    I keep getting this error:
    ./nike4all.py -createAccount
    Go to this URL and login whit username and password of the account you just created
    Url to visit: http://www.nike.com/nikeplus/?token=************
    Press enter to continue only AFTER you login
    Congratulation, your status is now confirmed!
    The user ******** is now associated to the pin *******************************
    Traceback (most recent call last):
    File “./nike4all.py”, line 518, in
    if nike.savePinToFile():
    AttributeError: nikeUploader instance has no attribute ‘savePinToFile’

    Any hints?

    • Reply
      gg 4 September 2009

      There was a small bug in the new release. Thanks for pointing that out. It should work properly now. If it doesn’t please contact me via email.

  3. Reply
    Marek 5 September 2009

    -uploadFile worked like a charm anyway. I will test the fix, thanks a lot for it.

  4. Reply
    Marek 6 September 2009

    With the new version I get this error:

    Traceback (most recent call last):
    File “./nike4all.py”, line 531, in
    if nike.saveConfigFile():
    TypeError: saveConfigFile() takes exactly 3 arguments (1 given)

  5. Reply
    dalailama 6 September 2009

    wow the best widget I have been waiting for!!!
    after terminal nike pin association I had this error too:

    Traceback (most recent call last):
    File “/usr/bin/nike4all.py”, line 531, in
    if nike.saveConfigFile():
    TypeError: saveConfigFile() takes exactly 3 arguments (1 given)

    Could you help me pleae?

    Keep on going the great work!!! Bye.

  6. Reply
    gg 9 September 2009

    Alright guys, now it should go. I was traveling and couldn’t really test it before but now works on my machine.

  7. Reply
    dalailama 10 September 2009

    Wow, perfect! I’ll take it under test and will report any problem!
    Thank you very much for your work!

  8. Reply
    Marek 19 September 2009

    Works excellent! Thanks for the fix.

  9. Reply
    ilovenike+ 24 September 2009

    hello, does this work for the new iphone 3gs?

    • Reply
      gg 26 September 2009

      I think the iphone 3gs cannot be mounted as disk in linux unless it is jailbroken. If this is really the case, then it should work with a freed iphone but one may have to specify a new path for the data.

  10. Reply
    Technik-Serie Teil2: Linux + Nike Plus | Running Twins 30 September 2009

    […] […]

  11. Reply
    leijonasydan 30 September 2009

    Hi!
    Is this script supposed to work also on Nike+ SportsBand? I don’t own an iPod so I thought the SportBand would be a good option, but booting to Windows just to sync to the Nike+ is just pain.

    • Reply
      gg 30 September 2009

      Can the Nike Sportband be mounted as an external disk? If yes, then it should work. May require a little tweaking though.

  12. Reply
    oscar 18 April 2010

    Hi, when i write the command:
    nike4all.py -createAccount
    i get: command not found. I have the file in the home directory and i cannot copy it to usr/bin

  13. Reply
    oscar 18 April 2010

    ok, my mistake, i was writting the line wrong.
    Works perfectly, thanks

  14. Reply
    Ace 13 June 2010

    Awesome, simply awesome. I can now be totally free of Windows.

  15. Reply
    rajibe 25 August 2010

    I wrote a Linux driver for sportband.

    http://sourceforge.net/projects/comsport/

  16. Reply
    Andre Reis 28 February 2011

    Congratulations for the wonderful idea of powering linux users to upload workouts to nike plus.

    Unfortunately, I’d allways got the message:

    Problem getting new pin. Did you login after creating the account?
    Your temporary pin was …

    I did login using the provided URL but it didn’t work.

    Do you know what it could be?

    Thank you.

    • Reply
      gg 28 February 2011

      Andre, send me an email (see the contact page) and we’ll figure it out.

  17. Reply
    Arosborough 10 April 2011

    The screenlet just freezes for me using Ubuntu 10.10. I can access its menu right up until the point where it says there is a new software update which could not be installed. Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *