Using A Kodak DC3400 Digital Camera With Linux

Author: David Taylor
Contact: knet@mailandnews.com
Version: 1185
Date: 2003-05-18

Configuration

kernel

Ensure you are running a kernel with USB support, either compiled into the kernel or loaded as separate modules. On my workstation, I have compiled the USB support as modules because I only require it occasionally.

I have the following in /etc/modules.conf:

alias usbdevfs usbcore
alias usb-controller usb-uhci

There are different USB controllers available. You may require usb-ohci.

Also, you will need dc2xx support, either compiled into the kernel or as a separate module. I have mine compiled as a module with the following in /etc/modules.conf:

above usb-uhci dc2xx

usbdevfs

We will now create the USB devices filesystem (usbdevfs).

Add the following line to /etc/fstab:

none  /proc/bus/usb  usbdevfs  defaults  0  0

Assuming you have the correct USB support configured for use with the kernel you should be able to mount the filesystem:

[root@joshua /root]# mount /proc/bus/usb
[root@joshua /root]#

You can now extract USB device information from /proc/bus/usb/devices.

Ensure the camera is connected to your computer using the supplied USB cable. Turn the "dial" on the back of your camera to connect. Now switch the camera on.

Once that is done, check /proc/bus/usb/devices. If everything is working you will see something like the following:

[root@joshua /root]# cat /proc/bus/usb/devices
. . . . .
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=040a ProdID=0132 Rev= 1.00
S:  Manufacturer=Eastman Kodak Company
S:  Product=KODAK DC3400 ZOOM Digital Camera
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=dc2xx
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
. . . . .
[root@joshua /root]#

Among many other things, the output of dmesg should show something similar to the following:

[root@joshua /root]# dmesg
. . . . .
hub.c: USB new device connect on bus1/2, assigned device number 9
usb.c: kmalloc IF ccf238e0, numif 1
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
usb.c: USB device number 9 default language ID 0x409
Manufacturer: Eastman Kodak Company
Product: KODAK DC3400 ZOOM Digital Camera
usb.c: unhandled interfaces on device
usb.c: USB device 9 (vend/prod 0x40a/0x132) is not claimed by any active driver.
  Length              = 18
  DescriptorType      = 01
  USB version         = 1.00
  Vendor:Product      = 040a:0132
  MaxPacketSize0      = 8
  NumConfigurations   = 1
  Device version      = 1.00
  Device Class:SubClass:Protocol = 00:00:00
    Per-interface classes
Configuration:
  bLength             =    9
  bDescriptorType     =   02
  wTotalLength        = 0020
  bNumInterfaces      =   01
  bConfigurationValue =   01
  iConfiguration      =   00
  bmAttributes        =   40
  MaxPower            =    2mA

  Interface: 0
  Alternate Setting:  0
    bLength             =    9
    bDescriptorType     =   04
    bInterfaceNumber    =   00
    bAlternateSetting   =   00
    bNumEndpoints       =   02
    bInterface Class:SubClass:Protocol =   ff:00:00
    iInterface          =   00
    Endpoint:
      bLength             =    7
      bDescriptorType     =   05
      bEndpointAddress    =   01 (out)
      bmAttributes        =   02 (Bulk)
      wMaxPacketSize      = 0040
      bInterval           =   00
    Endpoint:
      bLength             =    7
      bDescriptorType     =   05
      bEndpointAddress    =   82 (in)
      bmAttributes        =   02 (Bulk)
      wMaxPacketSize      = 0040
      bInterval           =   00
. . . . .
[root@joshua /root]#

Use

If you compiled dc2xx support as a separate, loadable kernel module you will first need to load it before you can manipulate the camera:

[root@joshua root]# modprobe dc2xx
[root@joshua root]#

gphoto

Go to "Configure->Select Port-Camera Model". From there, select the Kodak DC280, select other and tell it to use /dev/usb/dc2xx0.

../../images/writing/articles/gphotoselect.jpg

Then, once you've done that, go to "Camera->Download Index->Thumbnails". If all goes well, you should see something like the following:

../../images/writing/articles/gphoto.jpg

Note: gphoto does not check for the pre-existence of files. If you download images with the prefix photo and you already have photo-001.jpg and photo-002.jpg they may well be overwritten. I found this out the hard way.