Canon G2 and Linux

Here is how i get Canon G2 to work with RedHat 7.3 via USB cable.

G2 has USB port so you need USB support for kernel, most distros have it, if you compile kernel yourself make sure to add:

 [M] Support for USB
 [*]   USB device filesystem
 [M]   UHCI HCD (most Intel and VIA) support

When booted with USB enabled kernel, load modules like this, order of command are important! at least on 2.5.25

insmod usbcore
mount -t usbdevfs -o devmode=0666 none /proc/bus/usb
insmod uhci-hcd  # 2.5.x
insmod usb-uhci  # 2.4.x

This way you normal users can access USB devices (Dangerouns in multiuser enviroments! user only in single user machines.

After loading modules you should see dmesg output:

usb.c: registered new driver usbfs
usb.c: registered new driver hub
uhci-hcd.c: USB Universal Host Controller Interface driver v2.0

Now you can plug G2 to USB cable, after plugin you should see dmesg:

hub.c: new USB device 00:07.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x4a9/0x3055) is not claimed by any active driver.

Now you could test camera with gphoto. Version 2.0 works ok. Gphoto nees libusb, redhat comes with libusb-0.1.5-3, that works.

%> gphoto2 --summary
Detected a 'Canon PowerShot G2'.                                               
Camera Summary:

Camera identification:
  Model: Canon PowerShot G2
  Owner: 

Power status: on battery (power OK)

Flash disk information:
  Drive D:
   31'950'848 bytes total
   24'236'032 bytes available

Time: 2002-07-17 22:39:09 (host time +31 seconds)

Tomi Leppikangas 17.7.2002