Monday, October 15, 2007

How to charge the iPod Touch's battery on Linux

I have never been very much into iPods before. Although people were all excited about the click-wheel and the great user experience I tried some of them and never shared the whole fuzz.

However when I first heard about the iPod Touch I was really fascinated. I watched the iPod Keynote from September 2007 and immediately like the iPod Touch. Usually I am not a person who buys products immediately after their release, but I figured they had had some time to get the worst bugs out of the iPhone; and as the iPod is undoubtedly nothing more than the "phone without the phone" I decided to give it a go and ordered it from the Apple Online Store on September 9th. Delivery was scheduled for the week starting Oct 1st and it promptly arrived on Thursday. As I had it delivered to the office address I suddenly noticed a lot of people coming to my desk...

I connected it to the office desktop (XP) where I had been using iTunes for quite some time already to manage the music I usually listen to while coding. Syncing was a breeze and I was really happy.

Because I did not have time to fully charge it at work and of course played around with the WiFi (which is a little heavier on the battery than just listening to music). So I decided to fully charge it over night at home. However that turned out a lot more difficult than I had imagined. Up to that point I had always considered charging a mobile device via the USB port something nobody could do wrong. However when I plugged it in after I had fired up my Ubuntu desktop it just very briefly showed the "charging" icon on the iPod's screen and immediately went back to "working on battery". The Gnome desktop presented me with a camera import wizard... I tried to disconnect and reconnect, even disabled all udev rules because I suspected one of the programs started upon the discovery of the new device to somehow confuse it - all to no avail.

When I booted into the Windows partition I still keep for emergencies, it started to charge immediately... Now this is some kind of platform tie in! I knew before that Apple's support for anything but OS X or Windows is virutally non-existant, but preventing people from charging the battery, just because of the "wrong" operating system?

It took me four more days, pounding Google with all sorts of keywords I could imagine - "ipod charge linux", "ubuntu ipod battery" and so on. Only when I got the idea to search for some combination of terms that contained "iPhone" I got to this: iPhone Now Charges in Linux.

That site contains the source for a kernel module that will send a short sequence of bytes to the iPod or iPhone that will tell it to start charging the battery. I find it very annyoing that stuff like this necessary to just recharge a device... Thanks to Matt Coyler I do not have to boot Windows just to charge my MP3 player. Great job!

2 comments:

Nitin R.K. said...

I find it quite unusual for a USB device to be very picky about who it gets its electrons from. It's not like it's going to get counterfeit electrons or anything :-P

iPad Mini Skin said...

It''s quite impressive.