About

Welcome to Panela, Matt Harrison's take on mostly Open Source, Linux, Python, innovation in those areas, other buzzwords and Dick Proenneke. It comes complete with the illustrations as needed. Note the opinions expressed here are merely my opinions and not the opinions of my employer.

about Matt

Calendar

««Jul 2009»»
SMTWTFS
    1234
567891011
12131415161718
19202122232425
262728293031

Mailing List

My RSS Feeds








Using the iPod Nano on linux...

posted 2005.09.26 Mon
So I fell prey to Apple's marketing, and I bought a Nano for my wife's birthday. It's for her, I promise! (Sadly, the 2 day fedex shipping, turned into almost two weeks. It was stuck in China having a "shipment exception" for over 5 days. Apple customer service claimed they didn't know what the holdup was, just that they were sorry. To be fair they refunded my shipping expenditures, but even discounting the 5 days in China, the "two day" shipping took 4 days (not counting a full weekend)!).
Since we have no Windows machine (or Mac for that matter) I'll document my work with Linux. I'm using gentoo, perhaps some of the "desktop friendly" distros make the udev stuff less of a hassle.
  • Charge the nano. Plug it into a powered usb port.
  • Set up udev. This can be a little tricky. For more details check out here. From dmesg, I noticed that the Nano was being detected as a usb storage device.:
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning Vendor: Apple Model: iPod Rev: 1.62 Type: Direct-Access ANSI SCSI revision: 00 SCSI device sdb: 7999488 512-byte hdwr sectors (4096 MB) sdb: assuming Write Enabled sdb: assuming drive cache: write through SCSI device sdb: 7999488 512-byte hdwr sectors (4096 MB) sdb: assuming Write Enabled sdb: assuming drive cache: write through sdb: sdb1 sdb2 Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0 Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0, type 0
  • Use the udevinfo command to find out about the usb device (don't start looking at /sys/bus/scsi cause it won't work! Ask me how I know)
matt@mycomputer ~ $ udevinfo -a -p /sys/bus/usb/devices/2-2/

udevinfo starts with the device the node belongs to and then walks up the device chain, to print for every device found, all possibly useful attributes in the udev key format. Only attributes within one device section may be used together in one rule, to match the device for which the node will be created.
looking at class device '/sys/bus/usb/devices/2-2': SUBSYSTEM=="unknown" SYSFS{bConfigurationValue}=="1" SYSFS{bDeviceClass}=="00" SYSFS{bDeviceProtocol}=="00" SYSFS{bDeviceSubClass}=="00" SYSFS{bMaxPower}=="500mA" SYSFS{bNumConfigurations}=="2" SYSFS{bNumInterfaces}==" 1" SYSFS{bcdDevice}=="0001" SYSFS{bmAttributes}=="c0" SYSFS{configuration}=="" SYSFS{detach_state}=="0" SYSFS{devnum}=="13" SYSFS{idProduct}=="120a" SYSFS{idVendor}=="05ac" SYSFS{manufacturer}=="Apple" SYSFS{maxchild}=="0" SYSFS{product}=="iPod" SYSFS{serial}=="000A270012314B59" SYSFS{speed}=="12" SYSFS{version}==" 2.00"
Add the following line to /etc/udev/rules.d/10-local.rules (note the spaces). The SYMLINK part will create a /dev/ipod entry for you.
BUS="usb", SYSFS{model}="iPod " NAME="%k", SYMLINK="ipod"
  • Create mount directory
mkdir /mnt/ipod
  • Update /etc/fstab. Most linux ipod-friendly apps expect a /mnt/ipod. Update /etc/fstab accordingly
/dev/ipod /mnt/ipod auto nodev,nosuid,user,rw,noauto 0 0
  • Make sure you have the correct kernel modules load hfs kernel module
modprobe hfs
  • Mount that puppy
mount /mnt/ipod
  • launch gtkpod
  • create directories (File->Create Ipod Directories). Necessary the first time.
  • Put some tunes on it
  • Make sure you 'umount' before unplugging...
It appears that amarok (v1.3.2 works too). Still need to figure out how to get album covers working (perhaps an amarok script might be needed).

tags:          

links: digg this    del.icio.us    reddit




1. a random John left...
2005.09.29 Thu 7:40 am

I bought my wife an iPod for finishing residency. Well, technically I spelled it "residecy" on the laser engraved backside. In any case I ordered it the instant the Apple website came back up after the announcement and I got it a day earlier than they said I would. And that was shipped from China, which had me worried. It is sweet. I should have bought a skin to protect it though since it does scratch easily.

Oh, I should also mention that I plugged it in to the Mac mini and it just works. Put about 300 photos on it too. The Mac resizes the photos for the nano so that they don't eat up space.


2. Matt left...
2005.09.29 Thu 10:08 am

Hmmm, was it a 2Gig? I believe they were shipping faster. But I ordered Andrea's two days after you did. Andrea's says "Stolen from Andrea" on it. ;) We left the protective plastic thing on it, so no scratches yet.

(I should hope that it "just worked" for the mini ;) )


3. a random John left...
2005.10.01 Sat 9:28 pm

4 Gig. I learned from ordering the mini to order fast if you want it fast. I need to get her a nano tube or something to protect it.


4. free nano ipod left...
2006.02.07 Tue 1:41 pm :: http://www.freenanoipod.co.uk

i recomend getting a cover straight away as they scratch really easy