[Techtalk] mounting a USB camera

John Clarke johnc+linuxchix at kirriwa.net
Mon Oct 20 12:14:02 EST 2003


On Sun, Oct 19, 2003 at 08:29:41 +0200, Hamster wrote:

> It's my understanding that there are two ways of accessing a digi camera.

i don't think you can actually mount the g1 as a usb mass storage
device.  i can't get my g2 to work this way, but it does work with
gphoto2.  i don't think any of canon's cameras use the usb mass 
storage protocol.

to get to the files directly, buy a cf card reader.  if you can afford
it, get usb 2.0 - it's much faster than the camera which is usb 1.1.

> modprobe sd_mod
> modprobe usb-storage

in /etc/modules.conf, i have:

    alias scsi_hostadapter usb-storage
    
and in /etc/fstab:

    /dev/sdb1   /mnt/cf     auto    user,noauto,nosuid  0   0
    
note the '1' after 'sdb' - the card is partitioned.  to access a cf
card, i insert it into the reader, plug it into a usb slot (in that
order - the usb i/f is hotplug but the cf slot isn't), then:

    [johnc at dropbear ~]$ mount /mnt/cf

and it just works.  no need to load the modules manually :-)  i have
several usb storage devices, and they appear as sda, sdb, and sdc.  to
find out which device name to use, connect the reader and look at the
messages which appear in /var/log/messages:

  kernel: hub.c: new USB device 00:07.2-1, assigned address 6
  kernel: usb-uhci.c: interrupt, status 2, frame# 602
  kernel: usb_control/bulk_msg: timeout
  kernel: scsi2 : SCSI emulation for USB Mass Storage devices
  kernel:   Vendor: SIIG      Model: CompactFlash Car  Rev: 0113
  kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
  kernel: Attached scsi removable disk sdb at scsi2, channel 0, id 0, lun 0
  kernel: SCSI device sdb: 1000945 512-byte hdwr sectors (512 MB)
  kernel: sdb: test WP failed, assume Write Enabled
  kernel:  sdb: sdb1

the last line tells me which partitions are available on the device. 
if you don't have any other scsi or usb storage devices, yours will be
sda1.

> The problem is that on my system, the /dev/sd* devices are not created.

that's easily fixed:

    cd /dev && ./MAKEDEV sd

and i've found a good reference to using digital cameras with linux:

    http://aamot.org/ole/photography.html


cheers,


john

p.s. apologies for any typos etc, i broke my right arm last week and am
typing this one-handed, and to make it worse, i'm very right-handed :-(

-- 
whois !JC774-AU at whois.aunic.net
GPG key id: 0xD59C360F
http://kirriwa.net/john/


More information about the Techtalk mailing list