[Linux] Digikam picture import error

Ray Racine linux@flux.org
Sun, 18 Mar 2007 12:07:28 -0400


On Sun, 2007-03-18 at 08:09 -0600, Steven Benmosh wrote:
> In the past, I have used digikam to download images from my Canon
> PowerShot A610 to my ubuntu box without problems.
> 
> Recently, I have installed a number of GPS related programs (GPSD,
> GPSMAN, GPSBABEL), and also other programs as well. Now I get the
> following error message, and I can not import the images: 
> 
> "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." 
> 
> lsusb shows Bus 003 Device 011: ID 04a9:30fd Canon, Inc.
> 
> dmesg|grep usb shows: [18298574.868000] usb 3-7: new high speed USB
> device using ehci_hcd and address 11
> [18298575.028000] usb 3-7: configuration #1 chosen from 1 choice 
> 

Have you tried putting in a udev rule?
Something like in /etc/udev/rules.d/...

BUS=="usb", SYSFS{idProduct}=="020b", SYSFS{idVendor}=="067c",
MODE="0660", GROUP="cameradev", SYMLINK+="my_digikam"

Get the idXXXs from the lsusb if thats what you are familiar with.

The SYMLINK is pretty nice as it will create a symlink
in /dev/sony_reader its true location in the /dev tree.  

That will solve the "how do I find it problem."

Lots of stuff in google on udev, udev rules, and all that.

If necessary use chmod or chgrp manually on the in the /dev tree or log
in as root to determine if its permission or something has claimed the
interface.

Its not uncommon for a device to support several interfaces / endpoints
but we shouldn't have to go there and a lot would depend on the software
itself that your using.

> I tried updating the configuration file as recommended for other
> cameras generating the same bugs (sorry, don't remember the
> configuration file name). Maybe I did not do it correctly, but either
> way, it did not help. 
> 
> So here is the questions:
> 
> 1. How do I find out which program and/or kernel module is using the
> device, if any?
> 2. How do I find whether I have read/write access to the device (whice
> device, btw, I do not seem to have any /dev/usbxx listed (I ran
> ls /dev|grep usb, grep us, grep sb), my gps is serial) 
> 3. How do I enable access to the device once I find out the culprit?
> 
> Thanks,
> 
> Z.
> 
>