Connecting an iPod Shuffle



A few years ago, driving home from a night drinking in the old town of Heidelberg, I stumbled upon an iPod shuffle of the 4th generation. Being the drunk and stupid guy I was back then, I didn’t think much, and just took it home - just to wake up the other day recognizing I was now the proud owner of an iPod. Yay.

Of course, now, that I had that thing, I wanted to use it. Only to stumble upon the problem of not being able to connect it, because it doesn’t use the “standard” iphone cable, but just a USB-to-3.5mm phone connector.

Since I didn’t have one at hand at that time, the iPod just took its way into one of the electronic-stuff-boxes I own.

Yesterday, I discovered it again and after spending two minutes on amazon, I even was the proud owner of a usb-to-3.5mm phone connector cable, which arrived today. Let the fun begin

Connecting an iPod to linux…

…sounds not that hard, right? After all, OS X is somewhat linux-ish, and this should work somehow, right?

Nope. I already had tried a few years back to mount an iPod, and I also had a nice tutorial by the debian guys at hand, but I failed miserably. So this time, I wanted to go “the easy way” - using what other people already had written to do this.

I looked around, and quickly found out that rhythmbox, the ubuntu standard music player, seemed to be able to access an ipod. One sudo apt-get install later, rhythmbox was up and running, my iPod was connected and - nothing. It didn’t react in any way. Reconnecting, disabling the iPod-plugin, restarting rhythmbox, nothing worked.

Searching the web, I found that I should install gtkpod, and I also decided to give banshee a try. Neither of those two did any good for me, and neither of those worked.

Now, it was obviously time to go back to hacking, and first of all, using system tools to find out if the iPod was recognized in any way.

$ dmesg
[843399.244310] usb 1-1.2: new high-speed USB device number 24 using ehci-pc
[843399.339648] usb 1-1.2: Product: iPod
[843400.341469] sd 13:0:0:0: Attached scsi generic sg1 type 0
[843400.352344] sd 13:0:0:0: [sdb] Attached SCSI removable disk

Ah. At least it was detected, and it seems to have an entry in /dev. Not to my surprise, it didn’t.

So what do we have, a scsi sg1 type removable disk that won’t show up in /dev. Time to google, and quickly I found what was supposed to be the solution: sg3-utils

Installing these, I did what I was told:

 $ sg_scan -i
 /dev/sg1: scsi14 channel=0 id=0 lun=0 [em]
     Apple     iPod              2.70 [rmb=1 cmdq=0 pqual=0 pdev=0x0]

Nice, it seems to have detected my iPod. Next step, mapping sg1 device to sdb device to give me “real devices”, as the sg3-docs manual stated.

$ sg_map
/dev/sg1  /dev/sdb

This looks like it mounted /dev/sg1, which was previously unmountable (not a block device), to /dev/sdb. So lets mount that.

$ pmount /dev/sdb

And tada: rhythmbox successfully detected the iPod, and i was able to just copy music to it, drag and drop style.

In my eyes, not the prettiest and handiest solution, but it works quite nicely. Since I normally handle all my music with mpd and use ncmpcpp as a frontend, I just decided to create a separate directory for rhythmbox, copy all the music I want on the Ipod to it, and just use rhythmbox to update its library to this directory, copy the files and be happy :))