Discussion:
[Gphoto-user] gphoto2: Error (-53: 'Could not claim the USB device')
Alfred Chung
2011-07-23 19:47:16 UTC
Permalink
From: Alfred Chung <***@gmail.com>
To: gphoto-user-***@lists.sourceforge.net
Date: Sat, 23 Jul 2011 15:41:18 -0400
Subject: gphoto2: Error (-53: 'Could not claim the USB device')
Hi,
I am new to gphoto2. I would like to control a Canon Rebel XS camera
remotely.

I am following this tutorial:
http://www.gphoto.org/doc/manual/using-gphoto2.html

I am successful to this step
$ gphoto2 --auto-detect
odel Port

----------------------------------------------------------
Canon EOS 1000D usb:253,003


However, fail in
$ gphoto2 --summary

*** Error ***
An error occurred in the io-library ('Could not claim the USB device'):
Could not claim interface 0 (m). 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-***@lists.sourceforge.net>, please run
gphoto2 as follows:

env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --summary

Please make sure there is sufficient quoting around the arguments.


Can some one tell me what to do?

Thanks!
Alfred
Francois Gerthoffert
2011-07-23 19:53:20 UTC
Permalink
Hi,

there are two things you could try:
- capture without sd card within the camera
- run capture as root.

Francois
Date: Sat, 23 Jul 2011 15:41:18 -0400Subject: gphoto2: Error (-53: 'Could not claim the USB device')Hi,I am new to gphoto2. I would like to control a Canon Rebel XS camera remotely.
I am following this tutorial:http://www.gphoto.org/doc/manual/using-gphoto2.html
I am successful to this step
$ gphoto2 --auto-detectodel                          Port                                            ----------------------------------------------------------Canon EOS 1000D                usb:253,003
However, fail in $ gphoto2 --summary
*** Error ***              An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (m). 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.
    env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --summary
Please make sure there is sufficient quoting around the arguments.
Can some one tell me what to do?
Thanks!Alfred
Hubert Figuière
2011-07-23 20:36:39 UTC
Permalink
Post by Alfred Chung
However, fail in
$ gphoto2 --summary
*** Error ***
Could not claim interface 0 (m). Make sure no other program or kernel module
(such as sdc2xx, stv680, spca50x) is using the device and you have
This means that somebody else is using the camera.

If the camera is mounted on the desktop (because you use Gnome) then
eject it from the file manager.

Of course you can file a bug against Gnome has this has been a know
issue for a while.

If you don't use Gnome then you might need to figure out who is locking
the camera.

Hub
Alfred Chung
2011-07-23 21:49:24 UTC
Permalink
OK, all,
I solved the problem.

Need to kill Mac OS X PTP daemon. It claims the camera.

/System/Library/Image
Capture/Devices/PTPCamera.app/Contents/MacOS/PTPCamera

sudo kill -9 <the pid of it>

Now the capture works magically.

I found the clew from this awesome blog post after a hard search.
blog.dcclark.net/2009/05/how-to-gphoto-primer.html


Thanks,
Alfred
Post by Alfred Chung
Date: Sat, 23 Jul 2011 15:41:18 -0400
Subject: gphoto2: Error (-53: 'Could not claim the USB device')
Hi,
I am new to gphoto2. I would like to control a Canon Rebel XS camera
remotely.
http://www.gphoto.org/doc/manual/using-gphoto2.html
I am successful to this step
$ gphoto2 --auto-detect
odel Port
----------------------------------------------------------
Canon EOS 1000D usb:253,003
However, fail in
$ gphoto2 --summary
*** Error ***
Could not claim interface 0 (m). 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
env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --summary
Please make sure there is sufficient quoting around the arguments.
Can some one tell me what to do?
Thanks!
Alfred
David Clark
2011-07-23 22:10:44 UTC
Permalink
Hi all,

While I see that the issue is solved, I did want to mention a slightly faster way to kill the PTP daemon and release the camera:

killall PTPCamera

will do it quite nicely... no need for pids!

David
Post by Alfred Chung
OK, all,
I solved the problem.
Need to kill Mac OS X PTP daemon. It claims the camera.
/System/Library/Image Capture/Devices/PTPCamera.app/Contents/MacOS/PTPCamera
sudo kill -9 <the pid of it>
Now the capture works magically.
I found the clew from this awesome blog post after a hard search.
blog.dcclark.net/2009/05/how-to-gphoto-primer.html
Thanks,
Alfred
Date: Sat, 23 Jul 2011 15:41:18 -0400
Subject: gphoto2: Error (-53: 'Could not claim the USB device')
Hi,
I am new to gphoto2. I would like to control a Canon Rebel XS camera remotely.
http://www.gphoto.org/doc/manual/using-gphoto2.html
I am successful to this step
$ gphoto2 --auto-detect
odel Port
----------------------------------------------------------
Canon EOS 1000D usb:253,003
However, fail in
$ gphoto2 --summary
*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (m). 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
env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --summary
Please make sure there is sufficient quoting around the arguments.
Can some one tell me what to do?
Thanks!
Alfred
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide. Store less, Store more with what you own, Move data to
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/_______________________________________________
Gphoto-user mailing list
https://lists.sourceforge.net/lists/listinfo/gphoto-user
------------------------------------
David Clark
***@gmail.com
http://www.dcclark.net/
------------------------------------
Theodore Kilgore
2011-07-23 23:36:45 UTC
Permalink
Message: 8
Date: Sat, 23 Jul 2011 15:47:16 -0400
Subject: [Gphoto-user] gphoto2: Error (-53: 'Could not claim the USB
device')
Content-Type: text/plain; charset="iso-8859-1"
Date: Sat, 23 Jul 2011 15:41:18 -0400
Subject: gphoto2: Error (-53: 'Could not claim the USB device')
Hi,
I am new to gphoto2. I would like to control a Canon Rebel XS camera
remotely.
http://www.gphoto.org/doc/manual/using-gphoto2.html
I am successful to this step
$ gphoto2 --auto-detect
odel Port
----------------------------------------------------------
Canon EOS 1000D usb:253,003
However, fail in
$ gphoto2 --summary
*** Error ***
Could not claim interface 0 (m). 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
env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --summary
Please make sure there is sufficient quoting around the arguments.
Can some one tell me what to do?
Thanks!
Alfred
-------------- next part --------------
An HTML attachment was scrubbed...
Alfred,

The most usual cause of this problem is difficulties with permissions. A
good test whether or not you have this problem is to test by using gphoto2
as root instead of as an ordinary user. If that works when it does not
work for you as a user, then it is indeed a permissions problem.

It is not clear to me from your message above, whether you are using a
stock distro-packaged gpnoto2, or whether you compiled it and installed it
yourself. Assuming that you compiled and installed yourself, you have to
set up the udev file which specifies the permissions for the various
supported cameras. Instructions are found in the source directory
libgphoto2/packaging/generic. If you got it from a distro, then it may be
a distro problem.

However, you can check whether or not you have a file with a name
something like 90-libgphoto2.rules (the number in front indicates
something about order of checking the file and may be different from 90).
This file ought to be found either in /lib/udev/rules.d or in
/etc/udev/rules.d. If you find it, you can check whether or not your
camera is listed there(by its USB Vendor:Product number). You can also
check whether or not you need to add yourself to some kind of group such
as "plugdev" or similar. For, it might be that you have the rules file and
the permissions are set up only to allow such a group to access the camera
and you are not in the group. If you do not have that file or if your
camera is not listed in it then you do need to create the file (see above
directions) and put it where it belongs, then re-start udevd (or reboot,
which will re-start udev automatically, of course).

Hope this helps.

Theodore Kilgore

Loading...