Back to home
<<Back to Linux Notebook

Digital Cameras
Between my wife and I, we have three digital cameras. We have a Nikon Coolpix 3100, an Olympux C-700 Ultra Zoom, and a Canon Powershot S2 IS. The Nikon and the Olympus are detected as USB Mass Storage Devices, while the Canon uses Picture Transfer Protocol (PTP). All were relatively straight-forward to use with Debian, once I figured it out.



USB Mass Storage Devices
As I said up above, the Nikon Coolpix 3100 and the Olympus C-700 Ultra Zoom cameras we have are detected as USB Mass Storage Devices. This means that when you connect them to a USB port on a Windows XP machine, no driver is needed, and the camera looks like another drive letter. It's almost that easy to use in Linux. Once you know where the device is, you just mount it like a DOS/Windows partition.

  1. Make sure the usbcore and usb_storage modules are already loaded

    lsmod | grep usb

    then look for those entries.

  2. Plug the camera into the USB port

  3. Check /proc/scsi/scsi to determine if it has been detected. When I type

    cat /proc/scsi/scsi

    I see the following output for my Olympus camera:
        Host: scsi1 Channel: 00 Id: 00 Lun: 00
            Vendor: OLYMPUS Model: C-700UltraZoom Rev: 1.00
            Type: Direct-Access ANSI SCSI revision: 02

  4. Check syslog to determine where the device is. When I type:

    tail -n 20 /var/log/syslog

    I see the following output:
    Oct 13 15:39:58 localhost kernel: 1-1: new full speed USB device using address 2
    Oct 13 15:39:58 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage devices
    Oct 13 15:39:59 localhost kernel: Vendor: OLYMPUS Model: C-700UltraZoom Rev: 1.00
    Oct 13 15:39:59 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02
    Oct 13 15:39:59 localhost kernel: SCSI device sdb: 256000 512-byte hdwr sectors (131 MB)
    Oct 13 15:39:59 localhost kernel: sdb: assuming Write Enabled
    Oct 13 15:39:59 localhost kernel: sdb: assuming drive cache: write through
    In this case, the camera is at /dev/sdb

  5. Create a mount point for the camera

    mkdir /mnt/olympus

  6. Mount the camera (need to be logged in as root to do this)

    mount -t vfat /dev/sdb1 /mnt/olympus

  7. Assuming that worked, make the appropriate entry into the fstab so that my regular user account is the owner when it gets mounted

    nano -w /etc/fstab

    Add the following line
    /dev/sdb1 /mnt/olympus vfat user,noauto,uid=1000,gid=1000 0 0
    assuming my userid and groupid are both 1000.

  8. I repeated the same procedure for the Nikon camera. The only difference is the mount point and that the Nikon gets detected as /dev/sdc1.
(written 10/13/2005)




PTP Cameras
After using my Olympus C700UZ camera for 4-5 years, it was time for an upgrade. Everything about the Canon Powershot S2 IS told me it was the camera for me. The only thing that made me hesitate was I knew the camera would not get detected as a USB Mass Storage Device since it uses PTP to communicate with a computer. When it arrived, I discovered that I could just plug it into a Windows XP computer, and it would still get mounted like a drive without any drivers. So, that was a huge relief. It turns out that it's almost equally easy to use in Linux (after I figured it out).

  1. Install gphoto2

    apt-get install gphoto2

  2. Install digikam

    apt-get install digikam

  3. Plug the camera into the USB port

  4. Test to see whether gphoto2 works properly with the camera

    su
    gphoto2 --get-all-files

    It works! All of the pictures are automatically downloaded to the current directory. That was surprisingly easy. Unfortunately, it doesn't work as a normal user, because the permissions on the USB devices aren't set to allow users to access them.
  5. Add my user account to the camera group

    nano -w /etc/group

    Alter the following line
        camera:x:105:
    to read
        camera:x:105:tew
    Where "tew" is my username, and 105 is the group number.

  6. Make changes to the fstab

    nano -w /etc/fstab

    Add the line:
        none /proc/bus/usb usbfs user,auto,devmode=0660,devgid=105 0 0
    which sets the owning group to be #105.

  7. Reboot

  8. Become superuser

  9. Plug the camera into the USB port

  10. Make sure the camera got detected.

    tail -n 50 /var/log/messages

    You should see entries referring to a new USB device. Also check

    lsusb

    and make sure there are entries there pertaining to the camera.

  11. Run Digikam

  12. Under the Camera menu, choose Add Camera

  13. Add "USB PTP Class Camera" (my camera isn't directly supported)

  14. Now when I look at the Camera menu and click on USB PTP Class Camera, I automatically see a window with thumbnail images of the pictures on the camera.

    Alternatively, the pictures can be downloaded as a regular user at the command line instead of by using Digikam by using the following:

    gphoto2 --get-all-files
(written 10/13/2005)






Linux Notebook on FluggartFluggartEmail