Saturday, March 16, 2013

im-me Arduino & Java code

I've had some people asking me to provide the arduino and Java source code that I wrote for my hacking.


It's been ages since I was doing this work, but here's what I can remember, and the code that I used.   You'll need to know some electronics, arduino programming, and Java to get all this to work for yourself.

Yes, I used the Arduino to program the im-me as I mentioned here: http://daveshacks.blogspot.co.uk/2010/01/im-me-hacking.html  You'll need to breadboard a voltage-level converting circuit as I described there.

I initially got the interface into the im-me working just with the Arduino, and once I got it working reliably later moved most of the logic into a Java application running on my windows PC.  The arduino sketch that I used at the time is here: https://www.dropbox.com/s/1tca3see5loka1c/cc1110debug.pde.  You'll see from the code how it evolved from being standalone and controlled by commands I typed in via the UART, to being a simple interface to the Java application.  I recommend that you start your journey by reverting the code to arduino-only to begin with (e.g. rename loop1() to loop()).  Once you get standalone mode working you can then add back the Java piece.

A zip containing all my Java-related code is here: https://www.dropbox.com/s/cwaqlmy6drdoh3o/debugger.zip.  You'll see quite a bit of java code that's similar to that in the arduino sketch - this relates to how I moved more and more functionality from the arduino to Java.  Just ignore the references to CypressUsb - this relates to some work I was doing with the im-me dongle.  This is code I used to experiment with, and is far from polished!  Good luck reading, understanding, and tweaking it to work for yourself.