On Wednesday 19 June 2002 11:34 am, Sean 'Shaleh' Perry wrote:
> On 19-Jun-2002 David Richmond wrote:
> > Hello!
> >
> > Having just switched to Debian (woody) from SuSE 7.3, I recall that,
> > under SuSE, I had to download and compile the CVS snapshot of the gphoto2
> > digital camera library to get my Canon PowerShot A40 digital camera
> > recognizable under Linux.  The version of gphoto2 that ships with SuSE
> > 7.3 was an older one that did not support the A40.  The version of
> > gphoto2 in woody, not surprisingly, also does not include support for the
> > A40.  The version in unstable doesn't either.
> >
> > How can I download the gphoto2 source from CVS
> > (cvs.gphoto.sourceforge.net), compile, and debianize it so that it can
> > then be installed by the packaging system?
> >
> > Thanks!
>
> apt-get source gphoto2
> then grab the source from the upstream.  Untar the new source, copy the
> debian/ dir over.  Edit debian/changelog to reflect the new version number.
>  Then do dpkg-buildpackage -rfakeroot -us -uc.

Well, I did get gphoto2 to recognize my Canon PowerShot A40, but not by 
compiling the CVS version.  The CVS version wouldn't package, I think because 
of problems with the Debian changelog; the CVS snapshot of gphoto2 doesn't 
appear to have a real version number as far as I can tell.  Instead, I hacked 
the Debian source of the Canon driver, and then packaged it as per Sean 
Perry's recommendation.  At this point I'll go back to the beginning; several 
others have posted to the list about digital cameras, and since I've been 
"around the block" a couple of times with my digital camera under GNU/Linux, 
I figure I'll add to the collective wisdom such as I can.... ;)

I guess there are several ways to get digital cameras recognized under 
GNU/Linux.  Many cameras are supported by gPhoto 0.4.3, a GUI program with 
integrated camera drivers.  You can check on the gPhoto website 
(http://gphoto.org/cameras-04.html) to see if your camera is supported, but 
it does not include USB support _at all_.  USB support is provided by the 
newer and more actively developed gphoto2 (list of supported cameras at 
http://gphoto.org/cameras.html), which lives at gphoto.org with gphoto 0.4.3. 
 gphoto2 is a command line interface program to communicate with cameras.  It 
has multiple GUI front ends; I know for certain that gtkam (a standalone GUI 
program built on GTK+) and kamera (integrates with KDE/Konqueror, browse 
camera photos by typing camera:// URL into Konqueror) are in the Debian 
package archives.  Finally, the USB-Digital Camera HOWTO from the Linux 
Documentation Project describes accessing the camera as a USB mass storage 
device, and as Craig Dickson mentioned, one can always buy a flash card 
reader if nothing else seems to work.... :)

My experience lies with using gphoto2 and a USB camera (Canon A40 as 
mentioned previously).  Although it's not a dependency of gphoto2, you'll 
probably need the hotplug package, if you don't already have it.  Then 
apt-get install gphoto2, and gtkam and/or kamera if you want them.  If your 
camera is on the list of supported cameras for gphoto2, you're almost ready 
to party, but the device permissions are probably root only.  Craig, I had 
the same error as you - kernel finds device, but gphoto2 complains.  In 
/usr/share/doc/gphoto2/linux-hotplug, you'll find a couple of scripts that 
you can use or modify to set the permissions correctly on the camera device 
when it's plugged in.  Follow the instructions in 
/usr/share/doc/gphoto2/gphoto2.txt to get the hotplug scripts to run your 
script when the camera gets plugged in, changing the permissions so you can 
access the camera.  I had better luck when I rewrote the script to use chown, 
but YMMV.  It's kind of strange that the debian package doesn't this all up 
for you......oh well.

Now for how I got my A40 working.  Manufacturers seem not to change their 
internal camera software much from model to model :) so a driver written for 
an older model of a line will quite possibly work with a newer one.  But with 
USB, the device has a specific USB device ID that has to get recognized by 
the gphoto2 driver, making a bit of hacking required to get newer models 
recognized.  If you want to try this with the A40 or some other camera, grab 
the debian source package, find the driver you want to change (in directory 
camlibs in the source tree), and hack it.  For reference, what I did on the 
canon driver was:

canon.c : add line {"Canon PowerShot A40", CANON_PS_A40, 0x04A9, 0x3058, 0, 
S10M, S32K}, to the canonCamModelData structure....it's pretty hard to miss 
:).  the 0x04A9 and 0x3058 are device identifiers, you'll have to get them 
from somewhere, possibly from the kernel USB subsystem (?).  I got the ID 
for the A40 from the gphoto2 mailing list archives.

canon.h : add line CANON_PS_A40, to the "typedef enum {" near the top of the 
file.  You'll notice this matches the second entry in the line added to 
canon.c.

Then I compiled gphoto2 (dpkg-buildpackage -rfakeroot -us -uc, thanks Sean), 
and it works!

If you have success getting a supposedly "non supported" camera working in 
this manner, you may want to drop the gphoto2 developers a line so they can 
incorporate support for that camera :).  Also, I wonder if it would be 
possible to add support for some of these "non supported in name only" 
cameras into the debian version of gphoto2.  The A40 has been supported in 
CVS for several months, but no gphoto2 release seems imminent.....many other 
cameras may have similar status.  Maybe into the unstable package or 
something?  Just a thought.

Regards,
David Richmond
Beaverton, OR
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to