On Sat, 13 Dec 2003, Jonathan Melhuish wrote: > I Googled for some time and looked in the list archives, etc., but could > find nothing relevant on installing my digital camera under Debian, so I > got bored and tried typing:
See http://home.gagme.com/greg/linux/usbcamera.php: [...] Connecting your camera via USB When you connect your camera it's important to make sure the camera is turned OFF when connecting it as well as turning the camera OFF before disconnecting the camera from your computer. I'm not sure why but the Linux USB driver gets really pissed off otherwise. If you connect your camera and turn it on you should get something resembling the following in your /var/log/messages : Jan 22 17:21:23 localhost kernel: hub.c: USB new device connect on bus1/1, assigned device number 2 Jan 22 17:21:23 localhost kernel: usb.c: USB device 2 (vend/prod 0x4b0/0x106) is not claimed by any active driver. Jan 22 17:21:26 localhost /etc/hotplug/usb.agent: Setup usb-storage for USB product 4b0/106/100 Jan 22 17:21:26 localhost kernel: Initializing USB Mass Storage driver... Jan 22 17:21:26 localhost kernel: usb.c: registered new driver usb-storage Jan 22 17:21:26 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage devices Jan 22 17:21:27 localhost kernel: Vendor: NIKON Model: NIKON DSC E775 Rev: 1.00 Jan 22 17:21:27 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02 Jan 22 17:21:27 localhost kernel: USB Mass Storage support registered. If your output looks like this then you're in good shape. The USB driver will set up "SCSI emulation" on the device. What's most annoying is that nowhere does it tell you which device name was chosen for this. If you don't have any SCSI devices other other USB mass storage devices the device to use will be /dev/sda1 . Otherwise go down the line with /dev/sdb1 , /dev/sdc1 , etc. until you find the correct device name. To find out try to manually mount the device as root: # mount /dev/sda1 /mnt # ls /mnt dcim misc nikon001.dsc # umount /mnt Assuming you got this far, you'll want to set up an automatic way of getting to the camera without needing to log in as root and mount it. At this point I want to remind you that it's vitally important to unmount the device before turning off the camera. Also, remember that you need to turn off the camera before unplugging the USB cable. What I like to use is the automounter for this purpose. I've also set this up for NFS mounts from other servers as well as my CD-ROM and floopy drives. If you haven't used the automounter yet you'll want to edit your /etc/auto.master file and add the following line: /misc /etc/auto.misc --timeout=30 Adjust the timeout value to suit your needs. My default of 30 seconds works for me. This is how long the automounter will wait before unmounting the device. If you set it too high you'll be waiting a long time before you can safely unplug your camera. Before you continue make sure to: # mkdir /misc to create the special directory the automounter will look at. Then create the file /etc/auto.misc and put in the following: # This is an automounter map and it has the following format # key [ -mount-options-separated-by-comma ] location # Details may be found in the autofs(5) manpage cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom floppy -fstype=auto :/dev/fd0 camera -fstype=auto :/dev/sda1 Leave out the lines for the floopy and CD-ROM drive if you'd rather not have those devices automounted as well. Now plug in your camera then turn it on. Restart the automounter to load in your new configuration and try it out: # service autofs restart # ls /misc/camera dcim misc nikon001.dsc # chkconfig autofs on (If you want to make this permanent) If you set it up you can also test /misc/cdrom if you have a CD loaded. Reading CF cards with PCMCIA [cf-pcmcia.png] An alternate way to download pictures from a digital camera is to use a PCMCIA adapter for your memory card. I know this works great with Compact Flash (CF) cards, I'm guessing it'll work similarly with other PCMCIA interfaces. In my experience this method is FAR more reliable. Unlike the USB mass storage driver this driver seems to be quite reliable in Red Hat 7.3, 8.0 and 9. The PCMCIA driver is also a little easier to use as when you plug the card into your laptop you'll get output like this in your /var/log/messages : Jan 24 13:01:09 localhost kernel: hde: PQI ATA Rev6.0, ATA DISK drive Jan 24 13:01:09 localhost kernel: ide2 at 0x100-0x107,0x10e on irq 3 Jan 24 13:01:09 localhost kernel: ide-floppy driver 0.99.newide Jan 24 13:01:09 localhost kernel: hde: 256000 sectors (131 MB) w/0KiB Cache, CHS=1000/16/16 Jan 24 13:01:09 localhost kernel: hde: hde1 Jan 24 13:01:09 localhost kernel: ide-cs: hde: Vcc = 3.3, Vpp = 0.0 Jan 24 13:01:09 localhost cardmgr[769]: executing: './ide start hde' Notice the hde1 in the output above, your device name may be different. That's the file name you will configre in the /etc/auto.misc file as below: camera -fstype=msdos :/dev/hde1 Once you do that just restart the automounter like you did for USB support above. # service autofs restart # ls /misc/camera dcim misc nikon001.dsc # chkconfig autofs on (If you want to make this permanent) [...] Oliver -- ... don't touch the bang bang fruit -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]