# Camera Issues (gphoto2, 2.6.16 Kernel) Even as Root

## Kenji Miyamoto

I can't seem to use gphoto2 to connect to my camera.  It is a Kodak EasyShare CX7430.  I've downgraded libgphoto2 to 2.5.15, and have applied the groups fix for /etc/hotplug/usb/usbcam (and have added my user to camera, even though I'm on a 2.6.16 kernel), and have run /usr/lib/libgphoto2/print-usb-usermap >> /etc/hotplug/usb/usermap.  I've also written this udev rule in 10-local.rules:

```
BUS=="usb", SYSFS{manufacturer}=="Eastman Kodak Company", MODE="0666",GROUP=camera, PROGRAM="/bin/sh -c echo Kodak EasyShare CX7430 added"
```

Despite all of this work, I keep getting this:

```
$ LANG=C gphoto2 --auto-detect --config

Model                          Port

----------------------------------------------------------

Kodak CX7430                   usb:

*** Error ***

An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.

*** Error (-53: 'Could not claim the USB device') ***

For debugging messages, please use the --debug option.

Debugging messages may help finding a solution to your problem.

If you intend to send any error or debug messages to the gphoto

developer mailing list <gphoto-devel@lists.sourceforge.net>, please run

gphoto2 as follows:

    env LANG=C gphoto2 --debug --auto-detect --config

Please make sure there is sufficient quoting around the arguments.
```

Is there actually a way to connect to the camera as a user?

EDIT: Even with a blunt # chmod aug+rwx -R /proc/bus/usb , it still doesn't work.

When trying to download files from the camera, I get the following error:[codeModel                          Port

----------------------------------------------------------

Kodak CX7430                   usb:

0.708615 gphoto2-camera(2): Listing files in '/'...

0.708813 gphoto2-camera(2): Initializing camera...

0.708956 gphoto2-port-usb(1): Looking for USB device (vendor 0x40a, product 0x57b)... found.

0.709174 gphoto2-port-usb(1): Detected defaults: config 1, interface 0, altsetting 0, inep 81, outep 01, intep 82, class 06, subclass 01

0.709310 gphoto2-camera(2): Loading '/usr/lib/gphoto2/2.1.5/libgphoto2_ptp2.so'...

0.709732 gphoto2-port(2): Opening USB port...

0.710089 gphoto2-port(0): Could not query kernel driver of device.

0.710269 gphoto2-port(2): Setting timeout to 8000 millisecond(s)...

0.710420 ptp(2): PTP: Opening session

0.710560 gphoto2-port(2): Writing 16=0x10 byte(s) to port...

0.710699 gphoto2-port(3): Hexdump of 16 = 0x10 bytes follows:

0000  10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00  ................

gp_port_write: Resource temporarily unavailable

8.712485 PTP2/library.c(2): PTP: gp_port_* function returned 0xffffffdd -35

8.712512 ptp(2): PTP: Opening session

8.712525 gphoto2-port(2): Writing 16=0x10 byte(s) to port...

8.712540 gphoto2-port(3): Hexdump of 16 = 0x10 bytes follows:

0000  10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00  ................

gp_port_write: Resource temporarily unavailable

16.713447 PTP2/library.c(2): PTP: gp_port_* function returned 0xffffffdd -35

16.713474 ptp(2): PTP: Opening session

16.713488 gphoto2-port(2): Writing 16=0x10 byte(s) to port...

16.713503 gphoto2-port(3): Hexdump of 16 = 0x10 bytes follows:

0000  10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00  ................

gp_port_write: Resource temporarily unavailable

24.715530 PTP2/library.c(2): PTP: gp_port_* function returned 0xffffffdd -35

24.715615 context(0): PTP I/O error

*** Error ***

PTP I/O error

24.715649 gphoto2-port(2): Closing port...

24.716551 context(0): An error occurred in the io-library ('Unspecified error'): Could not query kernel driver of device.

*** Error ***

An error occurred in the io-library ('Unspecified error'): Could not query kernel driver of device.

*** Error (-1: 'Unspecified error') ***

For debugging messages, please use the --debug option.

Debugging messages may help finding a solution to your problem.

If you intend to send any error or debug messages to the gphoto

developer mailing list <gphoto-devel@lists.sourceforge.net>, please run

gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug --auto-detect --get-all-files

Please make sure there is sufficient quoting around the arguments.

24.716769 gp-camera(2): Freeing camera...

24.716782 gphoto2-port(2): Freeing port...

24.716794 gphoto2-port(2): Closing port...

24.716845 libgphoto2/gphoto2-filesys.c(2): Clearing fscache LRU list...

24.716858 libgphoto2/gphoto2-filesys.c(2): fscache LRU list already empty

24.716871 gphoto2-filesystem(2): Internally deleting all folders from '/'...

[/code]

----------

## Kabuto

Are you a member of plugdev?

What does ls -l /proc/bus/usb/xxx (where xxx is the correct bus) say?

lsusb will tell you what busses are being used.

----------

## Kenji Miyamoto

Yes; I've been a member of plugdev.

lsusb for proper device:

```
Bus 003 Device 002: ID 040a:057b Kodak Co.

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0

  bDeviceProtocol         0

  bMaxPacketSize0         8

  idVendor           0x040a Kodak Co.

  idProduct          0x057b

  bcdDevice            1.00

  iManufacturer           1 Eastman Kodak Company

  iProduct                2 KODAK EasyShare CX7430 Zoom Digital Camera

  iSerial                 3 KCKCY41700223

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           39

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          0

    bmAttributes         0xc0

      Self Powered

    MaxPower                2mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           3

      bInterfaceClass         6 Imaging

      bInterfaceSubClass      1 Still Image Capture

      bInterfaceProtocol      1 Picture Transfer Protocol (PIMA 15470)

      iInterface              0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x01  EP 1 OUT

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0040  1x 64 bytes

        bInterval               0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0040  1x 64 bytes

        bInterval               0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x82  EP 2 IN

        bmAttributes            3

          Transfer Type            Interrupt

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0008  1x 8 bytes

        bInterval              16
```

ls /proc and so on:

```
ls -l /proc/bus/usb/003

total 0

-rw-rw-r-- 1 root usb 43 2006-05-17 07:29 001

-rw-rw-r-- 1 root usb 57 2006-05-17 07:34 002
```

Note: my user is also a member of usb.

----------

## dsd

post /proc/bus/usb/devices contents after plugging the device in

----------

## Kenji Miyamoto

```
T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 4

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.16-suspend2-r5 ohci_hcd

S:  Product=OHCI Host Controller

S:  SerialNumber=0000:00:13.1

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0

D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=040a ProdID=057b Rev= 1.00

S:  Manufacturer=Eastman Kodak Company

S:  Product=KODAK EasyShare CX7430 Zoom Digital Camera

S:  SerialNumber=KCKCY41700223

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:  If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=(none)

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=16ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 4

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.16-suspend2-r5 ohci_hcd

S:  Product=OHCI Host Controller

S:  SerialNumber=0000:00:13.0

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8

B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.16-suspend2-r5 ehci_hcd

S:  Product=EHCI Host Controller

S:  SerialNumber=0000:00:13.2

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms
```

----------

## dsd

i was just checking that no driver has claimed the device, and that is the case. the problem must be elsewhere

----------

## Kabuto

Do you have the usb file system in the kernel (usbfs)?

Ignore: Stupid question since it creates the proc stuff.Last edited by Kabuto on Wed May 17, 2006 8:05 pm; edited 1 time in total

----------

## subik

I've got very similar problem too. My PTP camera (Canon IXUS 40) cannot be "connected" via gphoto2/digikam.

I'm member of the right group, /proc/bus/usb/* has right rights, dmesg/log contains note about successful connection of the new USB device. Only Driver=(none) looks strange. I can connect any other USB devices (storages/modem/mouse etc.) with no problem.

```
mojo-jojo subzero # cat /proc/bus/usb/devices |grep Driver

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

I:  If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=(none)      <<<<<<< WTF?!

I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic

I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic

I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

```

There is anther strange issue - I used the same camera 2-3 months ago with no problem. Unfortunatelly I cannot remember what I've upgraded.

I'm very near to give up this problem

----------

## dsd

driver=none is fine - these devices are not claimed by any kernel driver, because they are operated completely from userspace using gphoto and libusb

----------

## chovy

I have a similar problem, just got a new camera and it isn't showing up as /dev/sda1 as the old one did:

$mount /dev/sda1 /mnt/usb

 *Quote:*   

> mount: special device /dev/sda1 does not exist

 

$less /proc/bus/usb/devices

 *Quote:*   

> T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 13 Spd=480 MxCh= 0
> 
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> 
> P:  Vendor=04a9 ProdID=3116 Rev= 0.02
> ...

 

could it be /dev/<??> instead?

----------

## dsd

this thread is about cameras that must be accessed using libgphoto2. cameras that appear as storage devices do not fall into this category, since you can just mount them to get the photos. it may well be that your new camera needs something like gphoto2 - have you searched on google for "linux canon <camera model>"?

----------

## Kabuto

Chovy:

I don't think Canon makes any Mass Storage cameras except maybe the high end SLRs.  I think they all use PTP for new cameras or the canon driver for the older models, so you would need gphoto2 to download the images or get a card reader.

Kenji Miyamoto:

I'm stumped.  I would have to say it is something with hotplug and rights getting messed up somewhere.

What files are in /etc/hotplug/usb?  What does /etc/hotplug/usb/usbcam look like?

----------

## chovy

thanks, you're right...i figured wrong that usb was mass storage on the canons.

I used "gphoto2 --auto-detect -P" (as root), and it pulled down all my images!

Is there a group I should add my under privileged user to, in order to access usb devices?

----------

## Kenji Miyamoto

 *Kabuto wrote:*   

> Chovy:
> 
> I don't think Canon makes any Mass Storage cameras except maybe the high end SLRs.  I think they all use PTP for new cameras or the canon driver for the older models, so you would need gphoto2 to download the images or get a card reader.
> 
> Kenji Miyamoto:
> ...

 

```
ls /etc/hotplug/usb

tascam_fpga  tascam_fw.usermap  usbcam-gphoto2.usermap  usermap

tascam_fw    usbcam             usbcam.old
```

```
$ cat /etc/hotplug/usb/usbcam

#!/bin/bash

# $Id: usbcam.group,v 1.3 2003/09/16 16:42:44 hun Exp $

#

# /etc/hotplug/usb/usbcam

#

# Sets up newly plugged in USB camera so that only members of the

# group

GROUP=camera

# can access it from user space. (Replace camera with the name of the

# group you want to have access to the cameras.)

#

# Note that for this script to work, you'll need all of the following:

# a) a line in the file /etc/hotplug/usermap that corresponds to the

#    camera you are using. You can get the correct lines for all cameras

#    supported by libgphoto2 by running "print-usb-usermap".

# b) a group "camera" where all users allowed access to the

#    camera are listed

# c) a Linux kernel supporting hotplug and usbdevfs

# d) the hotplug package (http://linux-hotplug.sourceforge.net/)

#

# In the usermap file, the first field "usb module" should be named

# "usbcam" like this script.

#

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]

then

    chmod o-rwx "${DEVICE}"

    chgrp "${GROUP}" "${DEVICE}"

    chmod g+rw "${DEVICE}"

fi
```

The thing is, I have a 2.6.16 kernel, which doesn't use hotplug.

----------

## Kenji Miyamoto

Does anyone have an idea for a udev rule, or any other solution?

----------

## konrad_ha

I have a similiar problem here.

My Camera (Canon Ixus iV) use dto work nicely until I reinstalled my system.

I followed the usual guides pretty closely (I wrangeled with the permissions-problems before) and now the device just shows up correctly. Yet I can't access my cam with gtkam. Here are some excerpts from my system:

The guide I followed for setting up hotplug correctly: http://www.gphoto.org/doc/manual/permissions-usb.html

my proc/bus/usb section (check for the right permissions on the 003/005 device)

```
konrad@localhost ~ $ ls -lR /proc/bus/usb/003

/proc/bus/usb/003:

total 0

-rw-rw-r-- 1 root usb     43 Jun 28 10:17 001

-rw-rw-r-- 1 root usb     77 Jun 28 10:17 002

-rw-rw-r-- 1 root usb     52 Jun 28 10:17 003

-rw-rw---- 1 root plugdev 57 Jun 28 10:54 005

```

and my id:

```
konrad@localhost ~ $ id

uid=1000(konrad) gid=100(users) groups=10(wheel),18(audio),35(games),85(usb),100(users),409(plugdev),412(camera)

```

And here's what gtkam has to say about my camera:

```
gphoto2-port: Creating new device...

gphoto2-camera: Setting abilities ('Canon Digital IXUS v')...

gphoto2-port-info-list: Looking for path 'usb:' (6 entries available)...

gphoto2-port-info-list: Getting info of entry 0 (6 available)...

gphoto2-camera: Setting port info for port 'Universal Serial Bus' at 'usb:'...

gphoto2-port: Setting timeout to 5000 millisecond(s)...

gphoto2-port: Setting settings...

gphoto2-camera: Initializing camera...

gphoto2-port-usb: Looking for USB device (vendor 0x4a9, product 0x3052)... found.

gphoto2-port-usb: Detected defaults: config 1, interface 0, altsetting 0, inep 81, outep 02, intep 83, class ff, subclass ff

gphoto2-camera: Loading '/usr/lib64/gphoto2/2.1.6/libgphoto2_canon.so'...

gphoto2-port: Opening USB port...

gphoto2-port: Could not query kernel driver of device.

gphoto2-port: Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.

gp-camera: Freeing camera...

gphoto2-port: Freeing port...

gphoto2-port: Closing port...

gphoto2-port: Could not release interface 0 (Operation not permitted).

libgphoto2/gphoto2-filesys.c: Clearing fscache LRU list...

libgphoto2/gphoto2-filesys.c: fscache LRU list already empty

gphoto2-filesystem: Internally deleting all folders from '/'...

```

It would seem everything worked fine until gphoto2 tries to "claim the interface". I just don't know what's going wrong.

I sure hope there's some solution to this.

----------

## warren64c

I am experiencing the same problem.  2.6.12 kernel worked fine.  Digikam stopped connecting with 2.6.16 and I have tried 2.6.17.5 and 2.6.18-rc2 with the same result.  Dmesg indicates the device connecting and gphoto2 initially identifies the camera (Canon EOS20D) but then it fails to load any images.  Digikam won't connect at all.

Any ideas?

----------

## Kenji Miyamoto

I believe this has something to do with the old ways of using Gphoto2 requiring hotplug, which was removed from udev for the 2.6.16 and newer kernels.  Now, it says "using netlink for hotplug".

----------

## Kabuto

warren64c:  Try this thread.  Kenji's problem was weird in that not even root would work.

----------

## warren64

I forgot to mention, I have the same problem.  It will not work as root.  I have encountered that problem and solution before though.

----------

## warren64

Any ideas how to solve this problem?  It is still unsolved.

----------

## warren64

Here is the ouptut from gphoto2 -autodetect (run as root):

[quote]

ehoward warren # env LANG=C gphoto2 --debug -autodetect

0.000026 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES

 TO THE MAILING LIST:

0.000468 main(2): gphoto2 2.2.0

0.000611 main(2): gphoto2 has been compiled with the following options:

0.000756 main(2):  + i686-pc-linux-gnu-gcc (C compiler used)

0.000898 main(2):  + popt (for handling command-line parameters)

0.001039 main(2):  + exif (for displaying EXIF information)

0.001178 main(2):  + cdk (for accessing configuration options)

0.001318 main(2):  + no aa (for displaying live previews)

0.001457 main(2):  + no jpeg (for displaying live previews in JPEG format)

0.001599 main(2):  + readline (for easy navigation in the shell)

0.001755 main(2): libgphoto2 2.2.1

0.001892 main(2): libgphoto2 has been compiled with the following options:

0.002035 main(2):  + i686-pc-linux-gnu-gcc (C compiler used)

0.002182 main(2):  + EXIF (for special handling of EXIF files)

0.002322 main(2):  + no /proc/meminfo (adapts cache size to memory available)

0.002471 main(2): libgphoto2_port 0.6.1

0.002610 main(2): libgphoto2_port has been compiled with the following options:

0.002754 main(2):  + i686-pc-linux-gnu-gcc (C compiler used)

0.002894 main(2):  + USB (libusb, for USB cameras)

0.003033 main(2):  + serial (for serial cameras)

0.003171 main(2):  + no resmgr (serial port access and locking)

0.003312 main(2):  + no baudboy (serial port locking)

0.003451 main(2):  + no ttylock (serial port locking)

0.004914 main(2):  + no lockdev (serial port locking)

0.005208 main(2): The user has not specified both a model and a port. Try to fig

ure them out.

0.005426 gphoto2-port-info-list(2): Using ltdl to load io-drivers from '/usr/lib

/libgphoto2_port/0.6.1'...

0.005738 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_por

t/0.6.1/disk'.

0.006757 gphoto2-port-info-list(2): Could not load port driver list: 'Unspecifie

d error'.

0.006955 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_por

t/0.6.1/ptpip'.

0.008373 gphoto2-port-info-list(2): Loaded 'PTP/IP Connection' ('ptpip:') from '

/usr/lib/libgphoto2_port/0.6.1/ptpip'.

0.008745 gphoto2-port-info-list(2): Loaded '' ('^ptpip') from '/usr/lib/libgphot

o2_port/0.6.1/ptpip'.

0.008920 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_por

t/0.6.1/serial'.

0.009446 gphoto2-port-serial(2): Trying to lock '/dev/tts/0'...

0.009845 gphoto2-port-serial(2): Trying to lock '/dev/tts/1'...

0.010127 gphoto2-port-serial(2): Trying to lock '/dev/tts/2'...

0.010309 gphoto2-port-serial(2): Trying to lock '/dev/tts/3'...

0.010630 gphoto2-port-info-list(2): Loaded 'Serial Port 0' ('serial:/dev/tts/0')

 from '/usr/lib/libgphoto2_port/0.6.1/serial'.

0.010814 gphoto2-port-info-list(2): Loaded 'Serial Port 1' ('serial:/dev/tts/1')

 from '/usr/lib/libgphoto2_port/0.6.1/serial'.

0.010987 gphoto2-port-info-list(2): Loaded 'Serial Port 2' ('serial:/dev/tts/2')

 from '/usr/lib/libgphoto2_port/0.6.1/serial'.

0.011159 gphoto2-port-info-list(2): Loaded 'Serial Port 3' ('serial:/dev/tts/3')

 from '/usr/lib/libgphoto2_port/0.6.1/serial'.

0.011332 gphoto2-port-info-list(2): Loaded '' ('^serial') from '/usr/lib/libgpho

to2_port/0.6.1/serial'.

0.011501 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_por

t/0.6.1/usb'.

0.012687 gphoto2-port-info-list(2): Loaded 'Universal Serial Bus' ('usb:') from

'/usr/lib/libgphoto2_port/0.6.1/usb'.

0.012915 gphoto2-port-info-list(2): Loaded '' ('^usb:') from '/usr/lib/libgphoto

2_port/0.6.1/usb'.

0.013763 gphoto2-port-info-list(2): Counting entries (10 available)...

0.013949 gphoto2-port-info-list(2): 6 regular entries available.

0.014097 gphoto2-port(2): Creating new device...

0.014252 gphoto2-port-info-list(2): Getting info of entry 0 (10 available)...

0.014800 gphoto2-port(2): Setting settings...

0.014959 gphoto2-port-info-list(2): Getting info of entry 1 (10 available)...

0.015356 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.015516 gphoto2-port(2): Setting settings...

0.015983 gphoto2-port-info-list(2): Getting info of entry 2 (10 available)...

0.016365 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.016523 gphoto2-port(2): Setting settings...

0.016669 gphoto2-port-info-list(2): Getting info of entry 3 (10 available)...

0.017015 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.017173 gphoto2-port(2): Setting settings...

0.017317 gphoto2-port-info-list(2): Getting info of entry 4 (10 available)...

0.017662 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.017830 gphoto2-port(2): Setting settings...

0.017975 gphoto2-port-info-list(2): Getting info of entry 5 (10 available)...

0.018804 gphoto2-port(2): Setting timeout to 5000 millisecond(s)...

0.019001 gphoto2-port(2): Setting settings...

0.019143 gphoto2-abilities-list.c(1): Auto-detecting USB cameras...

0.019314 gphoto2-port(0): Could not find USB device (vendor 0x553, product 0x202

). Make sure this device is connected to the computer.

0.019499 gphoto2-port(0): Could not find USB device (vendor 0x6bd, product 0x403

). Make sure this device is connected to the computer.

0.019795 gphoto2-port(0): Could not find USB device (vendor 0x6bd, product 0x404

). Make sure this device is connected to the computer.

0.019973 gphoto2-port(0): Could not find USB device (vendor 0x4fc, product 0x504

b). Make sure this device is connected to the computer.

0.020149 gphoto2-port(0): Could not find USB device (vendor 0x553, product 0x202

). Make sure this device is connected to the computer.

0.020326 gphoto2-port(0): Could not find USB device (vendor 0x4fc, product 0x504

a). Make sure this device is connected to the computer.

0.020502 gphoto2-port(0): Could not find USB device (vendor 0x553, product 0x202

). Make sure this device is connected to the computer.

0.020678 gphoto2-port(0): Could not find USB device (vendor 0x8ca, product 0x111

). Make sure this device is connected to the computer.

0.020854 gphoto2-port(0): Could not find USB device (vendor 0x4fc, product 0x504

a). Make sure this device is connected to the computer.

0.021030 gphoto2-port(0): Could not find USB device (vendor 0x4fc, product 0x504

b). Make sure this device is connected to the computer.

0.021207 gphoto2-port(0): Could not find USB device (vendor 0x553, product 0x202

). Make sure this device is connected to the computer.

0.021383 gphoto2-port(0): Could not find USB device (vendor 0x2770, product 0x91

20). Make sure this device is connected to the computer.

0.021559 gphoto2-port(0): Could not find USB device (vendor 0x93a, product 0x10f

). Make sure this device is connected to the computer.

0.021745 gphoto2-port(0): Could not find USB device (vendor 0x93a, product 0x10f

). Make sure this device is connected to the computer.

0.021921 gphoto2-port(0): Could not find USB device (vendor 0x2770, product 0x91

3c). Make sure this device is connected to the computer.

0.022097 gphoto2-port(0): Could not find USB device (vendor 0x919, product 0x100

). Make sure this device is connected to the computer.

0.022273 gphoto2-port(0): Could not find USB device (vendor 0x93a, product 0x10f

). Make sure this device is connected to the computer.

0.022450 gphoto2-port(0): Could not find USB device (vendor 0x4a5, product 0x300

3). Make sure this device is connected to the computer.

0.022626 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x304

7). Make sure this device is connected to the computer.

0.022800 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30c

0). Make sure this device is connected to the computer.

0.022978 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x304

d). Make sure this device is connected to the computer.

0.023154 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x306

6). Make sure this device is connected to the computer.

0.023330 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30b

f). Make sure this device is connected to the computer.

0.023506 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x307

5). Make sure this device is connected to the computer.

0.024110 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x307

5). Make sure this device is connected to the computer.

0.024287 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30b

a). Make sure this device is connected to the computer.

0.024463 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30b

a). Make sure this device is connected to the computer.

0.024639 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30c

1). Make sure this device is connected to the computer.

0.024815 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x310

e). Make sure this device is connected to the computer.

0.024992 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30b

4). Make sure this device is connected to the computer.

0.025168 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30b

4). Make sure this device is connected to the computer.

0.025342 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30f

f). Make sure this device is connected to the computer.

0.025518 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x311

c). Make sure this device is connected to the computer.

0.025693 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30f

2). Make sure this device is connected to the computer.

0.025876 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x311

6). Make sure this device is connected to the computer.

0.026051 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x311

9). Make sure this device is connected to the computer.

0.026226 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x309

b). Make sure this device is connected to the computer.

0.026411 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x309

b). Make sure this device is connected to the computer.

0.026588 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30c

4). Make sure this device is connected to the computer.

0.026764 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x307

2). Make sure this device is connected to the computer.

0.026939 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x307

2). Make sure this device is connected to the computer.

0.027115 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30b

6). Make sure this device is connected to the computer.

0.027289 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30b

6). Make sure this device is connected to the computer.

0.027472 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x305

2). Make sure this device is connected to the computer.

0.027652 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x306

5). Make sure this device is connected to the computer.

0.027828 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x307

0). Make sure this device is connected to the computer.

0.028003 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x307

1). Make sure this device is connected to the computer.

0.028184 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x306

a). Make sure this device is connected to the computer.

0.028361 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x308

8). Make sure this device is connected to the computer.

0.028537 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x308

7). Make sure this device is connected to the computer.

0.028712 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x308

3). Make sure this device is connected to the computer.

0.028888 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30e

a). Make sure this device is connected to the computer.

0.029066 gphoto2-port-usb(1): Looking for USB device (vendor 0x4a9, product 0x30

ec)... found.

0.029240 gphoto2-port-usb(1): Detected defaults: config 1, interface 0, altsetti

ng 0, inep 81, outep 02, intep 83, class 06, subclass 01

0.029415 gphoto2-abilities-list.c(2): Found 'Canon EOS 20D (PTP mode)' (0x4a9,0x

30ec)

0.029594 gphoto2-port(2): Freeing port...

0.029747 gphoto2-port(2): Closing port...

0.030037 gphoto2-camera(2): Setting abilities ('Canon EOS 20D (PTP mode)')...

0.030207 setting/gphoto2-setting.c(2): Creating $HOME/.gphoto

0.030505 setting/gphoto2-setting.c(2): Loading settings from file "/root/.gphoto

/settings"

0.031886 gphoto2-setting(2): Setting key 'model' to value 'Canon EOS 20D (PTP mo

de)' (gphoto2)

0.032076 gphoto2-setting(2): Saving 3 setting(s) to file "/root/.gphoto/settings

"

0.032509 gphoto2-port-info-list(2): Using ltdl to load io-drivers from '/usr/lib

/libgphoto2_port/0.6.1'...

0.032756 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_por

t/0.6.1/disk'.

0.033656 gphoto2-port-info-list(2): Could not load port driver list: 'Unspecifie

d error'.

0.033865 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_por

t/0.6.1/ptpip'.

0.034272 gphoto2-port-info-list(2): Loaded 'PTP/IP Connection' ('ptpip:') from '

/usr/lib/libgphoto2_port/0.6.1/ptpip'.

0.034461 gphoto2-port-info-list(2): Loaded '' ('^ptpip') from '/usr/lib/libgphot

o2_port/0.6.1/ptpip'.

0.034632 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_por

t/0.6.1/serial'.

0.035024 gphoto2-port-serial(2): Trying to lock '/dev/tts/0'...

0.035399 gphoto2-port-serial(2): Trying to lock '/dev/tts/1'...

0.036397 gphoto2-port-serial(2): Trying to lock '/dev/tts/2'...

0.036609 gphoto2-port-serial(2): Trying to lock '/dev/tts/3'...

0.036971 gphoto2-port-info-list(2): Loaded 'Serial Port 0' ('serial:/dev/tts/0')

 from '/usr/lib/libgphoto2_port/0.6.1/serial'.

0.037159 gphoto2-port-info-list(2): Loaded 'Serial Port 1' ('serial:/dev/tts/1')

 from '/usr/lib/libgphoto2_port/0.6.1/serial'.

0.037334 gphoto2-port-info-list(2): Loaded 'Serial Port 2' ('serial:/dev/tts/2')

 from '/usr/lib/libgphoto2_port/0.6.1/serial'.

0.037507 gphoto2-port-info-list(2): Loaded 'Serial Port 3' ('serial:/dev/tts/3')

 from '/usr/lib/libgphoto2_port/0.6.1/serial'.

0.037679 gphoto2-port-info-list(2): Loaded '' ('^serial') from '/usr/lib/libgpho

to2_port/0.6.1/serial'.

0.037859 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_por

t/0.6.1/usb'.

0.038877 gphoto2-port-info-list(2): Loaded 'Universal Serial Bus' ('usb:') from

'/usr/lib/libgphoto2_port/0.6.1/usb'.

0.039107 gphoto2-port-info-list(2): Loaded '' ('^usb:') from '/usr/lib/libgphoto

2_port/0.6.1/usb'.

0.039291 gphoto2-port-info-list(2): Counting entries (10 available)...

0.039440 gphoto2-port-info-list(2): 6 regular entries available.

0.039607 gphoto2-port-info-list(2): Looking for path 'usb:' (10 entries availabl

e)...

0.039790 gphoto2-port-info-list(2): Getting info of entry 5 (10 available)...

0.039950 gphoto2-camera(2): Setting port info for port 'Universal Serial Bus' at

 'usb:'...

0.040672 gphoto2-port(2): Setting timeout to 5000 millisecond(s)...

0.048736 gphoto2-port(2): Setting settings...

0.048896 gphoto2-setting(2): Setting key 'port' to value 'usb:' (gphoto2)

0.049054 gphoto2-setting(2): Saving 3 setting(s) to file "/root/.gphoto/settings

"

Abilities for camera             : Canon EOS 20D (PTP mode)

Serial port support              : no

USB support                      : yes

Capture choices                  :

                                 : Capture not supported by the driver

Configuration support            : yes

Delete selected files on camera  : yes

Delete all files on camera       : no

File preview (thumbnail) support : yes

File upload support              : yes

0.050317 main(2): Uploading file...

*** Error (-1: 'Unspecified error') ***

For debugging messages, please use the --debug option.

Debugging messages may help finding a solution to your problem.

If you intend to send any error or debug messages to the gphoto

developer mailing list <gphoto-devel@lists.sourceforge.net>, please run

gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug -autodetect

Please make sure there is sufficient quoting around the arguments.

0.051260 gp-camera(2): Freeing camera...

0.051407 gphoto2-port(2): Freeing port...

0.051548 gphoto2-port(2): Closing port...

0.051785 libgphoto2/gphoto2-filesys.c(2): Clearing fscache LRU list...

0.051938 libgphoto2/gphoto2-filesys.c(2): fscache LRU list already empty

0.052080 gphoto2-filesystem(2): Internally deleting all folders from '/'...

[/quote][/list]

Any ideas?

----------

## tom_bxl

I think libusb is the bad guy, see my post here. I get the same problem with the camera in PTP mode (using gphoto2 through libusb) but it works like a charm as mass storage (through the usb_storage kernel module).

I get same sort of errors with my scanner. I'm running gentoo-sources 2.6.17-r8 and libusb 0.1.12 (but all versions have the same problem). I'm just stuck   :Sad: 

Thomas

----------

## Summit

Hi guys.  I was having all the same problems, so I took the last poster's advice and downgraded from libusb 0.1.12 to 0.1.11 and now everything works again.  I also noted that emerge wanted to downgrade it... so somehow it got updated to an unstable version??

----------

## warren64

Downgrading libusb also fixed the problem for me.

----------

## stdPikachu

Same problem here, but a libusb downgrade hasn't fixed it. Confirmed not a permissions problem as it won't work as root either.

Any ideas? WAF is dropping to danferously low levels...!

----------

## xgregx

Was having problems with my Canon SD500 and digikam

Downgrade of libusb worked, fixed it for me.  (emerge =dev-libs/libusb-0.1.11)

Has anyone filed a bug report with libusb devs so they can address this issue?  Is it libusb's issue, or ghoto2 that is having problems with libusb?

Good find! Thanks for this post everyone.  I can now stop beating my head on the table!  :Smile: 

Greg

----------

## cfgauss

I have the same problem. As root

```
gphoto2 --auto-detect
```

 doesn't detect my camera any more and gtkam bombs with an error message about not being able to read the / directory. This all worked about a month ago so some emerge has broken it. I downgraded to libusb-0.1.11 but it didn't fix the problem. My camera is listed in /proc/bus/usb/devices and also when I libusb -v.

What else can I look at?

----------

## xgregx

It could be your version of gphoto2 or libgphoto2.  I'm not sure if those can cause a problem along with libusb.

----------

## cfgauss

 *xgregx wrote:*   

> It could be your version of gphoto2 or libgphoto2.  I'm not sure if those can cause a problem along with libusb.

 

I reinstalled all three to the latest stable version for my AMD64 architecture but I have the same behavior. Perhaps I need a testing version of one or more.

----------

## smypee

I had to add this line to /etc/udev/rules.d/99-libgphoto2.rules:

```
SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="30ee", MODE="0660", GROUP="plugdev"
```

The two values can be found with

```
# lsusb

Bus 001 Device 012: ID 04a9:30ee Canon, Inc. EOS 350D

```

I saw that the line for this product was already in the file, but with 

```
ATTR{idVendor}=="04a9", ATTR{idProduct}=="30ee", MODE="0660", GROUP="plugdev
```

Don't know why it is like that, but it solved the problem in my case.

----------

## cfgauss

 *smypee wrote:*   

> I had to add this line to /etc/udev/rules.d/99-libgphoto2.rules:
> 
> ```
> SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="30ee", MODE="0660", GROUP="plugdev"
> ```
> ...

 

I had many lines like the one above but did not have one with the correct idProduct so I added the SYSFS line but still had the same problem. I then added a line a line similar to the 104 existing ATTR lines but with the correct idProduct but that didn't fix it either.

When I launch gtkam as root I get this error:

```
An error occurred in the io-library ('Bad parameters'): The supplied vendor or product id (0x0,0x0) is not valid.
```

----------

## Kabuto

What camera? and list the current line in your UDEV rule that you added.

----------

## cfgauss

 *Kabuto wrote:*   

> What camera? and list the current line in your UDEV rule that you added.

 

Here's the tail of dmesg:

```
usb 1-8: new high speed USB device using ehci_hcd and address 2

usb 1-8: configuration #1 chosen from 1 choice
```

Here's the tail of cat /proc/bus/usb/devices:

```
T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=01 Dev#=  2 Spd=480 MxCh= 0

D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=04a9 ProdID=310e Rev= 0.02

S:  Manufacturer=Canon Inc.

S:  Product=Canon Digital Camera

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:  If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=(none)

E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=64ms

```

 The camera is a Canon PowerShot SD400.

Here are the lines added to /etc/udev/rules.d/99-libgphoto2.rules

```
SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="310e", MODE="660", GROUP="plugdev"

ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="310e", MODE="660", GROUP="plugdev"

```

 gphoto2 --auto-detect comes back with nothing.

gtkam and gphoto2 once did work with this camera so some upgrade has broken things. Any insight into what to do would be greatly appreciated.

----------

## Kabuto

Do you have the "CAMERAS" variable set?  The SD400 has two modes (PTP and Canon).  You are in the PTP (310e) mode so you must have PTP2 in the "CAMERAS" variable.  OR just take off the variable and libgphoto2 will build all drivers.

----------

## cfgauss

 *Kabuto wrote:*   

> Do you have the "CAMERAS" variable set?  The SD400 has two modes (PTP and Canon).  You are in the PTP (310e) mode so you must have PTP2 in the "CAMERAS" variable.  OR just take off the variable and libgphoto2 will build all drivers.

 

Many thanks! This worked.

I commented out this line in /etc/make.conf:

```
#CAMERAS="canon"
```

 Then I unmerged and re-emerged libgphoto2 and accepted the new /etc/udev/rules.d/99-libgphoto2.rules resulting from the emerge.

I can't use gtkam except as root but I don't care. Thanks again.   :Very Happy: 

----------

## slartibartfasz

 *Kabuto wrote:*   

> Do you have the "CAMERAS" variable set?  The SD400 has two modes (PTP and Canon).  You are in the PTP (310e) mode so you must have PTP2 in the "CAMERAS" variable.  OR just take off the variable and libgphoto2 will build all drivers.

 

Trick worked here with a Canon Ixus 60 - thx a lot dude, was about to get angry when I found your note.

----------

