[Barry] needed some way to get serial output to help debug his efforts to port Linux to the HTC TytnII (Windows mobile Pocket PC phone). He wrote some code to send serial output via one of the LEDs on the phone and rigged up an AVR to pic up the output and provide a USB interface to the computer. It runs at about 200bps – perfect for the quick debug session.
4 thoughts on “LED Serial Debugging For Cell Phone Hacking”
Leave a Reply
Please be kind and respectful to help make the comments section excellent. (Comment Policy)
Cool topic, I think I saw this done to a camera once to dump its firmware via a LED reading USB device. Think it was one of the new cannon’s…
http://www.hackaday.com/2008/05/27/porting-chdk-to-new-cameras/
Yep, this method was on HAD a little while ago.
Camera flash != cell phone IR-LED
Neat trick, though he probably could have done it easier over the headphone jack — HTC uses a special 11-pin port that looks kind of like mini-B USB, but has additional pins for a headset. I would think it would be easy to find a software modem package, though maybe it’s not trivial to route the system terminal to it.
Thanks for the kind words!
@wolf yes, been done a few times, but as far as I could tell never quite like this.
@james You assume we have audio :)
Also you are right, (assuming we had audio) routing to the headphone port after decoding the incoming console data would be a nasty job. I decided to do it this way as it was very simple to do, 9 lines of code in the Linux kernel and a chunk in an avr.