December 22, 2003
linux + digicam info (link)
http://leo.physics.usyd.edu.au/~andrewn/camera.html (dead link)
http://216.239.39.104/search?q=cache:52berwsEYdYJ:leo.physics.usyd.edu.au/~andrewn/camera.html+&hl=en
how to get a usb mass storage device camera to work with linux (page content mirrored below)
How to use the Konica KD-400Z digital camera with Linux
This page explains how I got my camera working with Linux.
It may be of some use to someone. My guess is that this will work for just about
any mass-storage camera since nothing here is specific to the KD-400Z.
[ I'd be interested to hear from anyone who has got the KD-400Z going on RedHat 9
--- maybe it works now, but the RH9 kernel had a USB bug. It didn't want
to know about the KD-400Z. The work-around was to use a USB SD-card reader instead
of reading the memory card while still inside the camera.]
Usage
As far as Linux is concerned, the camera is just a scsi disk drive
with .jpg files on it (USB Mass Storage). You can't control the camera
in any way (for example I don't think gphoto
can be used with mass storage cameras, other than to just browse a directory
of .jpg files). I use gqview to browse my .jpg files.
This is what I do to download the *.jpg files from the camera into the existing
directory [DIR] on hard disk:
-
Connect camera and computer with the provided USB cable.
I do this with the camera "off", meaning the lens cover is shut.
There is no need to open it. The camera wakes up by itself.
It makes music, flashes lights and displays "Konica". You could hardly miss it.
cp_pics [DIR]
Example:
mkdir my_new_photos
cp_pics my_new_photos
Disconnect the camera after being prompted to do so (the camera battery is being
used while its connected).
To download all files from the camera might take a minute or two.
In the above, cp_pics is the file name of a small
shell script. Use the link to either cut and paste it or to download it.
The script mounts the camera as a scsi drive, copies the files to [DIR],
then un-mounts the camera.
The line starting with "rm" will clear out the camera memory after the download, but it might be
best to leave this line commented out and clear the camera memory manually,
since the script does not bother to check that the file transfer was ok.
Setting it up
To get the script to work, you need to create (as root) a directory
on which to mount the mass storage camera
su
cd /mnt
mkdir camera_kd400z
To be able to run the script as an ordinary user (not root), you'll need
to edit /etc/fstab, adding to the end of that file a line like
/dev/sdb1 /mnt/camera_kd400z vfat noauto,user,rw 0 0
The first item in the above line will be specific to your setup. I have a scsi hard disk
already, that's why my entry is /dev/sdb1 (not /dev/sda1).
To find out what yours should be, connect the camera then list the
disk partitions using
sfdisk -l
TAKE CARE --- no typos ! --- it is possible to trash
your entire hard disk my messing about with sfdisk.
Check out the man page for sfdisk.
From the above command I get the following partition listing for the
mass storage camera
Disk /dev/sdb: 453 cylinders, 2 heads, 32 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 0+ 454 455- 14531+ 1 FAT12
/dev/sdb2 0 - 0 0 0 Empty
/dev/sdb3 0 - 0 0 0 Empty
/dev/sdb4 0 - 0 0 0 Empty
This listing is for the KD-400Z as purchased (ie., with a 16MB SD Memory card).
Save the cp_pics script somewhere in your search path (eg. ~/bin) and set it to
be executable
chmod +x cp_pics
Thats it.
Other info
The above was figured out reading the document by Brad Hards,
The Linux USB
sub-system.
Some things to look at after first connecting the camera,
to see if it is being recognized
more /var/log/messages
more /proc/bus/usb/drivers
more /proc/bus/usb/devices
more /proc/scsi/scsi
See also
man mount
man fstab
man sfdisk
Oh well, better late than never. These links might have saved me some effort
Digital Photography and Linux
Using Digital Still Photography Devices with GNU/Linux
Author: Andrew Norton, 14 August 2002. Last change, 29 July 2003.
My home page:
http://leo.physics.usyd.edu.au/~andrewn/
Posted by yargevad at December 22, 2003 01:45 PM