Difference between revisions of "Digital camera"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 1: Line 1:
This article is about how you can use digital cameras that have a USB connection with Linux. There are two types of digital cameras: mass storage cameras and PTP cameras. With mass storage devices you connect the camera via USB and can read the photographs as if the camera was a USB hard disk. With PTP cameras, you need software to read the pictures. On most cameras, you can switch if you want to use them as PTP or mass storage cameras. This article uses SUSE Linux 11.1 as example, but it should work same or similar on every Linux distribution.
+
This article is about how you can use digital cameras that have a USB connection with Linux. There are two types of digital cameras: mass storage cameras and PTP cameras. With mass storage devices you connect the camera via USB and can read the photographs as if the camera was a USB hard disk. With PTP cameras, you need software to read the pictures. On most cameras, you can switch if you want to use them as PTP or mass storage cameras. In both cases, you can pull out the storage chip and use it in e.g. and SD-card-reader which will behave like a USB disk. This article uses SUSE Linux 11.1 as example, but it should work same or similar on every Linux distribution.
  
 
= Find out what you have =
 
= Find out what you have =

Revision as of 08:59, 12 April 2009

This article is about how you can use digital cameras that have a USB connection with Linux. There are two types of digital cameras: mass storage cameras and PTP cameras. With mass storage devices you connect the camera via USB and can read the photographs as if the camera was a USB hard disk. With PTP cameras, you need software to read the pictures. On most cameras, you can switch if you want to use them as PTP or mass storage cameras. In both cases, you can pull out the storage chip and use it in e.g. and SD-card-reader which will behave like a USB disk. This article uses SUSE Linux 11.1 as example, but it should work same or similar on every Linux distribution.

Find out what you have

In your digital camera's menu, try to find the menu item that makes the distinction between your camera acting as mass storage USB device and PTP device. Set it to the mass storage option. If you do not find the item and are still unsure which type of camera you have, you will have to try both options, PTP and mass storage.

Mass storage cameras

Make sure your system log is empty. open a console and type

dmesg -c

Now switch on and connect your camera to a USB port. Then type

dmesg

At the end of dmesg you should see something like

usb 8-3: new high speed USB device using ehci_hcd and address 3
usb 8-3: configuration #1 chosen from 1 choice
scsi5 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usb 8-3: New USB device found, idVendor=054c, idProduct=0010
usb 8-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 8-3: Product: Sony DSC
usb 8-3: Manufacturer: Sony
scsi 5:0:0:0: Direct-Access     Sony     Sony DSC         6.00 PQ: 0 ANSI: 0 CCS
sd 5:0:0:0: [sdc] 1953792 512-byte hardware sectors: (1000MB/954MiB)
sd 5:0:0:0: [sdc] Write Protect is off
sd 5:0:0:0: [sdc] Mode Sense: 00 00 00 00
sd 5:0:0:0: [sdc] Assuming drive cache: write through
sd 5:0:0:0: [sdc] 1953792 512-byte hardware sectors: (1000MB/954MiB)
sd 5:0:0:0: [sdc] Write Protect is off
sd 5:0:0:0: [sdc] Mode Sense: 00 00 00 00
sd 5:0:0:0: [sdc] Assuming drive cache: write through
 sdc: sdc1
sd 5:0:0:0: [sdc] Attached SCSI removable disk
sd 5:0:0:0: Attached scsi generic sg4 type 0
usb-storage: device scan complete

That means your camera's pictures are available on device /dev/sdc1. If you are flooded by dmesg's messages, you can also look at it using

# hwinfo --block --short
disk:
  /dev/sda             SAMSUNG HD103UJ
  /dev/sdb             WDC WD3200AAKS-7
  /dev/sdc             Sony DSC
partition:
  /dev/sda1            Partition
  /dev/sdb1            Partition
  /dev/sdb2            Partition
  /dev/sdc1            Partition
cdrom:
  /dev/sr0             HL-DT-ST DVD-ROM GDRH20N
  /dev/sr1             TSSTcorp DVD+-RW TS-H653B

PTP cameras

If you have a PTP USB digital camera, you can get all its pictures transferred with gphoto2. To install and run it, open a console and type

mkdir photos
cd photos
sudo yast -i gphoto2
gphoto2 --get-all-files