[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using hotplug USB with PDR-M71 Digital Camera



With some help from Jeff Coppock (thanks!), I was able to get hotplug
to work with my Toshiba PDR-M71 digital camera.  I am posting this
message in case anyone else runs into the same problem as me.  First,
here's what I'm using and what I did to get it to work:

  Linux kernel 2.4.20 (kernel-image-2.4.20-686 2.4.20-3)
  hotplug 0.0.20020826-1

I had to edit /etc/hotplug/usb.rc and use the "uhci" module instead of
the "usb-uhci" module:

    # NOTE: this prefers "uhci"; you may prefer "usb-uhci".
    modprobe -q uhci >/dev/null 2>&1 || modprobe -q usb-uhci >/dev/null 2>&1
    # modprobe -q usb-uhci >/dev/null 2>&1 || modprobe -q uhci >/dev/null 2>&1

Oh, another thing was that I had to enable support for USB in my CMOS
setup!  I had forgotten that I had disabled it a long time ago when I
first set up the computer with Debian and Linux 2.2.

So with the above changes, I am now able to hook up the camera, turn
it on, and the following appears in /var/log/messages:

  Jan  3 22:11:31 lorien kernel: hub.c: new USB device 00:07.2-2, assigned address 2
  Jan  3 22:11:31 lorien kernel: usb.c: USB device 2 (vend/prod 0x1132/0x4331) is not claimed by any active driver.
  Jan  3 22:11:34 lorien /etc/hotplug/usb.agent: Setup usb-storage for USB product 1132/4331/100
  Jan  3 22:11:34 lorien kernel: Initializing USB Mass Storage driver...
  Jan  3 22:11:34 lorien kernel: usb.c: registered new driver usb-storage
  Jan  3 22:11:34 lorien kernel: scsi1 : SCSI emulation for USB Mass Storage devices
  Jan  3 22:11:34 lorien kernel:   Vendor: TOSHIBA   Model: PDR               Rev: 1.00
  Jan  3 22:11:34 lorien kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
  Jan  3 22:11:34 lorien kernel: Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0
  Jan  3 22:11:34 lorien kernel: SCSI device sdb: 16000 512-byte hdwr sectors (8 MB)
  Jan  3 22:11:34 lorien kernel: sdb: Write Protect is off
  Jan  3 22:11:34 lorien kernel:  /dev/scsi/host1/bus0/target0/lun0: p1
  Jan  3 22:11:34 lorien kernel: USB Mass Storage support registered.

I can then type "mount /mnt/film" and access the pictures.  I have the
following entry in /etc/fstab:
  /dev/sdb1 /mnt/film vfat defaults,ro,user,noauto 0 0
(You might need to use sda1 instead; refer to your /var/log/messages).
Of course I had to first create the "film" subdirectory under /mnt as
suggested by Ole Aamot at http://www.aamot.org/ole/photography.html (I
didn't particular know where I should mount it, and his idea sounded
ok for now.)

Before I turn off the camera, I type "umount /mnt/film".  Then I turn
it off and the following appears in /var/log/messages:

  Jan  3 22:13:18 lorien kernel: usb.c: USB disconnect on device 00:07.2-2 address 2

I hope this is helpful,
Ken

P.S. I am not subscribed to this list.

P.P.S. The problem I ran into when using the default "usb-uhci" module
in hotplug is that the camera would seemingly be recognized but the
scsi support never materialized.  In particular, the error message
"device set offline - command error recover failed" would appear:

  Dec 29 15:02:36 lorien kernel: hub.c: new USB device 00:07.2-2, assigned address 2
  Dec 29 15:02:36 lorien kernel: usb.c: USB device 2 (vend/prod 0x1132/0x4331) is not claimed by any active driver.
  Dec 29 15:02:39 lorien /etc/hotplug/usb.agent: Setup usb-storage for USB product 1132/4331/100
  Dec 29 15:02:39 lorien kernel: Initializing USB Mass Storage driver...
  Dec 29 15:02:39 lorien kernel: usb.c: registered new driver usb-storage
  Dec 29 15:02:39 lorien kernel: usb-uhci.c: interrupt, status 2, frame# 279
  Dec 29 15:02:39 lorien kernel: scsi1 : SCSI emulation for USB Mass Storage devices
  Dec 29 15:02:45 lorien kernel: usb-uhci.c: interrupt, status 3, frame# 135
  Dec 29 15:02:45 lorien kernel: usb.c: USB disconnect on device 00:07.2-2 address 2
  Dec 29 15:02:46 lorien kernel: hub.c: new USB device 00:07.2-2, assigned address 3
  Dec 29 15:02:46 lorien kernel: hub.c: new USB device 00:07.2-2, assigned address 4
  Dec 29 15:03:00 lorien kernel: scsi: device set offline - command error recover failed: host 1 channel 0 id 0 lun 0
  Dec 29 15:03:00 lorien kernel: USB Mass Storage support registered.



Reply to: