this neat gadget has me buffaloed

Discuss Applications
worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

this neat gadget has me buffaloed

Post by worker201 » Sun Aug 28, 2005 7:18 pm

Void, you're going to hate me for this, but I need help getting Linux to recognize my iPod.

Everything I see on Google tells me that it should just pop right up. Being able to use it is another story altogether, but detecting it should be a snap. But not for me!

Here's what /proc/bus/usb/devices has to say about my 2 high-speed USB ports (the first one is empty, the second one contains the iPod:
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 4
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.12-1.1398_FC4 ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=0000:02:01.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 66 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=05ac ProdID=1203 Rev= 0.01
S: Manufacturer=Apple
S: Product=iPod
S: SerialNumber=000A2700141504F6
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
So something has managed to find it. Now it is supposed to use SCSI emulation to create a device. It will probably be sdb, since the Zip drive is sda. But there seems to be a problem. Check out the following tiny snippet of my endless dmesg file:
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
usb 1-4: USB disconnect, address 5
usb 1-4: new high speed USB device using ehci_hcd and address 6
scsi10711 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
usb 1-4: USB disconnect, address 6
usb 1-4: new high speed USB device using ehci_hcd and address 7
scsi10712 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
usb 1-4: USB disconnect, address 7
usb 1-4: new high speed USB device using ehci_hcd and address 8
scsi10713 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 8
usb-storage: waiting for device to settle before scanning
usb 1-4: USB disconnect, address 8
usb 1-4: new high speed USB device using ehci_hcd and address 9
scsi10714 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
usb 1-4: USB disconnect, address 9
The scsixxxxx number began at '2' when I plugged the damn thing in, and the address numbers go from 2 to 127 and then recycle. Presumably, this numerical offset is based on the presence of the Zip drive (on a low-speed usb port).

So at this point in the game, this is sorta like a usb stick that isn't detected. Normally, the computer has no problem finding my usb Zip or my usb stick - which makes it weird.

Can you think of anything I should check? Adjustments? Modules to load? Sizes of hammer to use in pulverizing this thing? I know that the iPod and Apple are not exactly GNU or open source, but this is the coolest little usb/firewire hard drive I have ever seen. Taking 20GB of stuff from work to home and back again would be very cool. So please consider helping me solve this detection problem. I promise to get it working by myself after that.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Aug 28, 2005 7:44 pm

You are right, I'm not much of a fan of the iPod, not the device itself but the service and the DRM stuff. Just out of curiosity have you tried to plug it in without the zip drive being plugged in? Maybe you could buy one for me and I could see if I can get it to work on my machine? :) You're right, it would make a nice little (large) portable storage device if you can get it to work. I'll do a little research and see what I can come up with.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Aug 28, 2005 7:46 pm

Now this looks interesting:
http://www.ipodlinux.org/Main_Page

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Aug 28, 2005 7:54 pm

I assume you actually tried to mount it even though you don't mention that specifically. You can also look for a partition table:

# fdisk -l /dev/sdb

to mount

# mkdir /mnt/ipod
# mount /dev/sdb2 /mnt/ipod

When it's plugged in what do you see in /proc/partitions?

# cat /proc/partitions

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Aug 28, 2005 8:28 pm

Nice article but targeted toward firewire:
http://pag.csail.mit.edu/~adonovan/hacks/ipod.html

There is someone who added a USB comment:
Corrin Lakeland (lakeland at cs.otago.ac.nz) reports that reading HFS+ works, but writing was problematic; also, he suggests that USB can be used as a more straightforward alternative to FireWire:

1) I got a USB cable with my iPod for about $25 extra. Since a PCI firewire card is about the same, this seemed a good idea and cuts out a lot of work. I would recommend anybody without firewire gets the cable instead of a PCI card.

2) Running kernel 2.6.7 I was able to mount the ipod right from when I got it by issuing the command: mount -t hfsplus /dev/sda3 /mnt/ipos.
However, write support seemed unreliable and despite using uid=1002 in /etc/fstab, I kept having all files owned by root (or some user 99 which doesn't exist on my system). Sometimes comamnds worked, frequently the failed. I spent quite a lot of hours before I finally gave up and swapped to vfat. I hope that in a few kernels, hfsplus will work for everyone.
I suppose in your case you would use "sdb3" rather than "sda3" depending on if it shows up in /proc/partitions. Also, if it has HFS format you might have to specify it in the mount command if it doesn't automatically detect the FS type.

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Mon Aug 29, 2005 3:09 pm

[lholcombe@holcombe2 ~]$ cat /proc/partitions
major minor #blocks name

3 0 117220824 hda
3 1 40131 hda1
3 2 84052080 hda2
3 3 1 hda3
3 5 20506941 hda5
3 6 2096451 hda6
3 7 10490413 hda7
3 64 78150744 hdb
3 65 76051678 hdb1
3 66 2096482 hdb2
22 64 117220824 hdd
22 65 117218241 hdd1

I can't mount the device, because it hasn't assigned a device name to it yet (Zip unplugged):
[root@holcombe2 lholcombe]# mount -t hfsplus /dev/sdb3 /mnt/ipod
mount: special device /dev/sdb3 does not exist
[root@holcombe2 lholcombe]# mount -t hfsplus /dev/sda3 /mnt/ipod
mount: special device /dev/sda3 does not exist

[root@holcombe2 lholcombe]# lsusb
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 003: ID 05da:30d9 Microtek International, Inc.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 061: ID 05ac:1203 Apple Computer, Inc.
Bus 001 Device 001: ID 0000:0000

So it is pretty sure it's there, but it is having a hard time doing the SCSI emulation. This is annoying.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Aug 29, 2005 3:36 pm

What distro/kernel are we talking here? FC4 w/latest? I'm really starting to think you are going to have to buy me one before I can figure out the problem. :)

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Mon Aug 29, 2005 3:42 pm

FC4 with 2.6.12-1.1398

Sorry, can't afford iPods as gifts right now. Gotta save up for my trip to Galapagos next month.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Aug 29, 2005 4:15 pm

worker201 wrote:FC4 with 2.6.12-1.1398

Sorry, can't afford iPods as gifts right now. Gotta save up for my trip to Galapagos next month.
Wow, that's cool! Just for vacation or for research?

Regarding your iPod issue, I *might* have found the answer. What's odd is most things I see relating to FC4 would indicate it should "just work". It seems some people have to recompile the kernel and unset the CONFIG_EFI_PARTITION var. At least they had to on particular versions of FC2:

http://jeremy.linuxquestions.org/blog/_ ... 61449.html

I notice in the config for our FC4 kernel this is enabled. I wonder if disabling it will fix the issue? Here's my kernel rebuild tutorial if you need it:

http://voidmain.is-a-geek.net/redhat/fe ... build.html

That is for FC3 but it should work for FC4 too.

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Mon Aug 29, 2005 4:45 pm

25 days on an Ecuadorian Naval research ship. They want to get the area between Ecuador and Galapagos added to their exclusive economic zone, so they are researching the hell out of it, trying to prove to the UN that it is all one system. A couple Naval officers came here to do graduate work, and we made friends with them. Which clearly is starting to pay off. If I'm lucky, I'll get a fat job mapping for them! Anyway, we'll be working a lot of the time, taking samples and watching computer screens. But supposedly the research boat is like a floating 5-star hotel. The best part is that the university is paying our airfare, so my only cost is souveneir money!

I am building my own 2.6.12-5 kernel, and I built HFS+ support in, as well as SCSI disk support - they are modules in the FC4 official kernel. After I read your post, I removed the EFI partition support, and started again. Interestingly, the help for that particular option says that it is currently only useful on 64 machines - so why it is built in by default is beyond me. Unless 64's are way more popular than I thought.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Aug 29, 2005 5:31 pm

Wow! Think there's any chance they'll need to bring someone else along to swab the deck or something? :)

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Mon Aug 29, 2005 5:48 pm

Maybe after I get a job, I will get you hired as a systems consultant! You can stop in every few months (at their expense) to update Linux.

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Mon Aug 29, 2005 6:16 pm

Okay, it works now. But I don't understand why.

What I did - I unplugged the iPod from one hi-speed USB port, and plugged it into the other one. It only took 16 addresses to assign it sdb. Now the damn thing is mounted and working just fine.

But I swear that both hi-speed ports should be working just fine. So why would it be detected in one, but not the other? The first one is the one I use all the time, especially with my usb stick. And I know it works, I have used it this week. But it didn't like the iPod.

Hardware baffles me.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Aug 29, 2005 8:08 pm

Me too. Glad you got it working!

Linux Frank
administrator
administrator
Posts: 239
Joined: Fri Jan 10, 2003 2:06 pm

Post by Linux Frank » Tue Sep 06, 2005 5:11 pm

Your USB port might be wearing out. Every time you connect you shave a tiny amount of metal way. If it is a port you use a lot for connecting and disconnecting this might be a warning to get a hub. Start logging everytime yoy connect a device and see if you start to see errors happening more often.

Galapagos - <insert terms of jealousy here>

Post Reply