Differences between version 7 and predecessor to the previous major change of DigitalCameraSetup.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
| Newer page: | version 7 | Last edited on Thursday, May 20, 2004 10:47:35 am | by JohnMcPherson | Revert |
| Older page: | version 5 | Last edited on Tuesday, April 27, 2004 1:33:53 pm | by SharthSharth | Revert |
@@ -4,86 +4,78 @@
I found some good info about digital cameras at http://www.teaser.fr/~hfiguiere/linux/digicam.html - zcat(1)
See also [HowToKodakDigitalcamHOWTO] and [HowToUSBDigitalCameraHOWTO].
----
+
!Software
-Linux software for transfering pictures off cameras:
+Linux Frontend
software for transfering pictures off cameras:
* [gphoto2|http://gphoto.sourceforge.net/] (the "main" software, it has all the low-level libraries and a CLI)
* gtkam ([GNOME] or [GTK]-only front-end to the gphoto2 libraries)
+* [gthumb|http://gthumb.sourceforge.net/] - a GNOME thumbnail previewer that has the ability to import photos (using the gphoto2 libraries)
* kamera ([KDE] front-end to gphoto2, also allows you to use a camera:// URI in konqueror)
* [GIMP] 1.2 and later - if gphoto2 is installed (or the more specifically the gphoto gimp-plugin), you can use File -> Acquire
These programs have [Debian] packages of the same name - I would guess [RPM]-based distros do too.
+
+You can also "mount" many cameras onto your filesystem, so that the contents look like a normal directory. See the "mass-storage" notes below.
----
!Notes/Trouble-shooting
* Almost all "recent" cameras use [USB], so make sure you have the correct USB support in your kernel (this seems fairly likely).
* Also, many "recent" cameras (such as the Kodak DX series) use the Picture Transfer Protocol (PTP), which gphoto2 supports. Some other cameras might require kernel support for their own protocols.
* See HotPlug for information on setting up using [USB] devices with linux.
-The Kodak DX3900, unlike all
the other DX cameras, doesn
't allow uploading files from your computer to the camera - you get a write error.
-(see [kodak.broaddaylight
.com|http://kodak
.broaddaylight
.com/kodak
/dml_fetch.pl?CompanyID=697
&ContentID=9708
&FaqID=4104
])
+The Kodak DX3900 and DX4900
, unlike the other DX cameras, don
't allow uploading files from your computer to the camera - you get a write error.
+(see [faq item1|http://faqs.
kodak.com/Digital_Cameras_English/dml_fetch.pl?CompanyID=101&ContentID=9708&FaqID=4104] and
+[faq item2
|http://faqs
.kodak
.com/Digital_Cameras_English
/dml_fetch.pl?CompanyID=101
&ContentID=19957
&FaqID=8248
].
)
----
-
-Here is how I got my brand new __Samsung Digimax V4__ digital camera working in Linux.
-
-By 'working' I mean, the files on the Secure Digital card
are readable while the camera is connected
to my PC via USB.
-
-First of all, I am using Linux 2.4.21 on Gentoo
(2003-07-18
), with an Asus A7V8X motherboard
(hence KT400 chipset
).
-
-I have
a CD burner so I already have the SCSI emulation compiled into my kernel (
or as modules). The only extra SCSI module I needed is
the SCSI Disk driver (sd_mod.o). I also had Mass Storage support (usb-storage.o) and the USB virtual
filesystem support.
-
-After connecting my camera to the USBus,
a quick 'dmesg' showed that the camera had been detected. I loaded the usb
-storage driver and the SCSI disk driver. I confirmed that it had been picked up as an emulated SCSI
device by:
-
- $ cat /proc/scsi/usb-storage-/1
- Host scsi1: usb-storage
- Vendor: SAMSUNG
- Product: DIGIMAX V4
- Serial Number: None
- Protocol: 8070i
- Transport: Bulk
- GUID: 083910090000000000000000
- Attached: Yes
-
-Also, /dev/sda1 appeared.
-
-To mount the filesystem on the camera's SD card, I simply:
-
- $ mount -t msdos /dev/sda1 /mnt/usbfs
-
-And voila!
-
-I think that was all. The hardest part was working out what drivers I needed
.
-
+There
are two main ways
to read
(and write
) files from
(and to
) a digital camera: using __gphoto2__,
or accessing
the raw
filesystem as
a __mass
-storage__
device.
----
-! Gphoto2
+!!GPhoto2
These are pretty generic instructions, using a __Kodak CX4230__ as an example).
You need to load the USB modules (not sure which ones, I have them built in), assuming you have a USB camera, of course.
Under Debian, you can
- apt-get install gphoto2.
+ apt-get install gphoto2
-You then want
to run:
- gphoto2 --port "usb:" --camera "Kodak CX4230" -P
+Note that you will either need
to run these commands as root, or (preferably) set
+your system up so that non-root users have read (and write) access to the correct
+devices. Debian users should read /usr/share/doc/libgphoto2-2/README.Debian for
+information on how to use gphoto2 as a non-root user (which is contained within the
+libgphoto2-2 package). (There should be a similar file in the gphoto2 or libgphoto2
+package on rpm based systems). The HotPlug page also briefly describes how to set up
+scripts to set the permissions on the USB port.
+
+After gphoto2 is installed,
run:
+ gphoto2 --port "usb:" --camera "Kodak CX4230" --get-all-files
This will detect the camera plugged into the USB port.
And with any luck you will have your photos downloaded to $PWD, otherwise you can use the "--get-all-files" argument to gphoto2.
+
+(Note: It is not strictly necessary to specify the port and camera model, since gphoto2 will scan them, and will also store these settings in the $HOME/.gphoto/settings file. Just doing
+ gphoto2 --get-all-files
+should be enough if everything goes well. "-P" is a short-cut option for "--get-all-files")
After you're done, you can erase the pictures from the camera with
- gphoto2 --port "usb:" --camera "Kodak CX4230" -D
+ gphoto2 --port "usb:" --camera "Kodak CX4230" --delete-all-files
+
+(
"-D" is a shortened option for "--delete-all-files". Again, the --port and --camera aren't really necessary if the
+gphoto libraries successfully automatically detect the camera type - it will use stored settings.)
+
+If you don't want to use the command-line, you can use one of the graphical front-ends mentioned earlier up the page.
-It is not strictly necessary to specify the port and camera model, since gphoto2 will scan them, and will also store these settings in the $HOME/.gphoto/settings file.
-For information on how to use gphoto2 as a non-root user, read __/usr/share/doc/libgphoto2-2/README.Debian__ which is contained within the __libgphoto2-2__ package (for Debian. It may be in the gphoto2 or libgphoto2 on rpm based systems).
----
+!!Mass-Storage device
-If you have a camera not supported by gphoto, you can probably still mount it as a USB drive.
-Under a stock RedHat just plug it in check what it got detected as;
+If you have a camera not supported by gphoto, you can probably still mount it as a USB drive. (Note that in Linux, the USB Mass storage support also requires SCSI emulation support.)
+
+Under a stock RedHat just plug it in and
check what it got detected as;
#dmesg
~~~
USB Mass Storage device found at 4
@@ -95,10 +87,12 @@
~~~
0,0,0 0) 'CONCORD ' 'DIGITAL CAMERA ' '1.00' Removable Disk
~~~
-then mount it;
+then mount it (make sure the /mnt/usbfs directory or whereever you decide to mount it exists):
#mount /dev/sda1 /mnt/usbfs
+
+(A good place to mount the device would be the /media/camera directory, although you will need to create the directory if it isn't already there).
Your piccies will appear somewhere under this directory and you can copy, move, delete them like any other filesystem.
/mnt/usbfs/dcim/100duopl:
@@ -106,4 +100,39 @@
The same steps should work for any other Linux distro, although you might need to manually load modules for USB and USB filesystem support.
The procedure was almost identical under FreeBSD, but I've forgotten exactly what I did. I'll wiki that up some other time.
+
+----
+
+Here is how I got my brand new __Samsung Digimax V4__ digital camera working in Linux.
+
+By 'working' I mean, the files on the Secure Digital card are readable while the camera is connected to my PC via USB.
+
+First of all, I am using Linux 2.4.21 on Gentoo (2003-07-18), with an Asus A7V8X motherboard (hence KT400 chipset).
+
+I have a CD burner so I already have the SCSI emulation compiled into my kernel (or as modules). The only extra SCSI module I needed is the SCSI Disk driver (sd_mod.o). I also had Mass Storage support (usb-storage.o) and the USB virtual filesystem support.
+
+After connecting my camera to the USBus, a quick 'dmesg' showed that the camera had been detected. I loaded the usb-storage driver and the SCSI disk driver. I confirmed that it had been picked up as an emulated SCSI device by:
+
+ $ cat /proc/scsi/usb-storage-0/1
+ Host scsi1: usb-storage
+ Vendor: SAMSUNG
+ Product: DIGIMAX V4
+ Serial Number: None
+ Protocol: 8070i
+ Transport: Bulk
+ GUID: 083910090000000000000000
+ Attached: Yes
+
+Also, /dev/sda1 appeared.
+
+To mount the filesystem on the camera's SD card, I simply:
+
+ $ mount -t msdos /dev/sda1 /mnt/usbfs
+
+And voila!
+
+I think that was all. The hardest part was working out what drivers I needed.
+----
+
+Under Gentoo with my Sony 5MP camera, I did all of the above and also added a /etc/fstab entry to use Supermount to automatically mount /dev/sda1 to /mnt/camera this works really well as now I can just plug and unplug the camera as I please and it automatically mounts and unmounts it. It also even shows a purty little icon on your Gnome desktop.
