Re: Gphoto2: Could not claim the USB device

2004-08-17 Conversa Albert Sellarès

> He obert Gtkam com a root (tot i que a la web de Gphoto diuen que millor 
> no utilitzar el superusuari) i finalment m'ha funcionat i he pogut 
> baixar les fotos.
> 
> Ara el que no sé es si ha funcionat per què sí o per l'script d'en 
> muzzol...  ;)

Dons el q et passa és cosa de permisos.

Si has d'executar com a root el gtkap o el gphoto com a root per a poder
agafar les fotos, és q l'script no t'ha anat :_ (O potser no has seguit
bé el passos...) 

(És possible q no inguis el hotplug? no és necessari tenir-lo, i llavors
l'script segur q no et funcionaria)


Però la millor solució és la k et diu el muzzol, crear un grup usb,
canviar el grup dels dispositius usb, i afegir els ususaris q vols
permretre l'accès, al grup usb.


Sort!







signature.asc
Description: This is a digitally signed message part


Re: Gphoto2: Could not claim the USB device

2004-08-17 Conversa Quim Gil

Eureka (a mitges)

He obert Gtkam com a root (tot i que a la web de Gphoto diuen que millor 
no utilitzar el superusuari) i finalment m'ha funcionat i he pogut 
baixar les fotos.


Ara el que no sé es si ha funcionat per què sí o per l'script d'en 
muzzol...  ;)


Quim


signature.asc
Description: OpenPGP digital signature


Re: Gphoto2: Could not claim the USB device

2004-08-17 Conversa Quim Gil
muzzol, moltes gràcies i ets un fiera però... segueix donant els 
mateixos errors.  :)




hauries de crear un grup usb (si no el tens ja) i afegir-hi els usuaris
que vulguis que puguin accedir a la càmera


fet


després crea aquest script:


creat



el deses com a usbcam al directori que he dit abans


fet

però res...

Una altra cosa que em passa pel cap és si tot usuari amb una càmara com 
la meva (un model ben popular) i un hotplug instal·lat ha de saber d'on 
treure un script per a que la cosa rutlli...  :/


Quim


signature.asc
Description: OpenPGP digital signature


Re: Gphoto2: Could not claim the USB device

2004-08-17 Conversa muzzol
bones!

crec que el problema que tens està relacionat amb la manera com hotplug
tracta els dispositius que hi vas afegint. cada vegada que endolles la
càmera ell crea un directori de nom aleatori on ell gestiona el
dispositiu. llavors el que s'ha de fer és un petit script que doni
permisos sobre aquest directori, aquests scripts es fican a
/etc/hotplug/usb

hauries de crear un grup usb (si no el tens ja) i afegir-hi els usuaris
que vulguis que puguin accedir a la càmera. després crea aquest script:

===8<=

#!/bin/bash 
# http://www.gphoto.org/doc/manual/permissions-usb.html 
# afegeix el grup usb si no existeix!!! 
case $ACTION in
add)
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
chgrp usb "${DEVICE}"
chmod g+rw "${DEVICE}"
fi
echo "camara endollada"
ogg123 /home/muzzol/confs/sons/on01.ogg
;;
remove)
echo "camera desendollada"
ogg123 /home/muzzol/confs/sons/off.ogg
;;
esac

===8<=

el deses com a usbcam al directori que he dit abans. pots comentar o
canviar el so, jo ho trobo bastant útil perqué així saps si realment ha
pillat la càmera o no. una vegada fet això no hauries de tenir cap
problema.

fins ara

muzzol

Quim Gil, vares dir:

>He provat de resoldre això amb l'extensa documentació de gphoto.org, 
>però res. A veure si alguna ànima caritativa d'aquesta llista...
>
>- Tinc gphoto i gtkam en les sevs versions d'unstable.
>
>- Tinc una càmera digital Sony Cybershot DSC-P31 que figura entre les 
>càmeres reconegudes per Gphoto.
>
>- Tinc el mòdul usb-storage muntat i el paquet hotplug instal·lat.
>
>Si obro amb Gtkam d'entrada no em surt res. Vaig a "add camera", faig 
>autodetect i gairebé me la troba (diu que tinc una Sony DSC-F707V) però 
>tant si selecciono aquesta com el meu model diu que "Could not 
>initialize camera".
>
>Llavors vaig a la consola seguint els passos recomanats a les FAQ de 
>Gphoto.
>
>1. Fent "gphoto2 --list-ports" troba l'usb.
>
>2. Fent l'autodetect troba una càmera:
>
>[EMAIL PROTECTED]:~$ gphoto2 --auto-detect
>Model  Port
>--
>Sony DSC-F707V (PTP mode)  usb:
>
>3. Fent --summary o --list-files surt l'error 'Could not claim the USB 
>device'  (adjunto al final missatges amb debug).
>
>4. Vaig a 
>http://www.gphoto.org/doc/manual/FAQ.html#FAQ-could-not-claim-USB i 
>d'allà a http://www.gphoto.org/doc/manual/permissions-usb.html per a 
>veure si sóc capaç de veure què falla amb els permisos però la resposta 
>que em trobo ve a dir que si he instal·lat un paquet pre-built i/o 
>utilitzo hotplug això dels permisos ja estarà configurat. I no és el
>cas...
>
>
>A veure si això té solució, que fins ara feia la trampa descarregant les 
>fotos al WinXP però ara que es veu que me l'he carregat...  :)
>
>Gràcies.
>
>Quim
>PS: els debug
>
>[EMAIL PROTECTED]:~$ gphoto2 --list-files
>
>*** Error ***
>An error occurred in the io-library ('Could not claim the USB device'): 
>Could not claim interface 0 (L'operació no és permesa). Make sure no 
>other program or kernel module (e.g. dc2xx or stv680) 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 <[EMAIL PROTECTED]>, please run
>gphoto2 as follows:
>
> env LANG=C gphoto2 --debug --list-files
>
>Please make sure there is sufficient quoting around the arguments.
>
>[EMAIL PROTECTED]:~$ env LANG=C gphoto2 --debug --list-files
>0.49 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG 
>MESSAGES TO THE MAILING LIST:
>0.000438 main(2): gphoto2 2.1.4
>0.000530 main(2): gphoto2 has been compiled with the following options:
>0.000619 main(2):  + gcc (C compiler used)
>0.000706 main(2):  + no popt (for handling command-line parameters)
>0.000821 main(2):  + exif (for displaying EXIF information)
>0.000910 main(2):  + cdk (for accessing configuration options)
>0.000997 main(2):  + no aa (for displaying live previews)
>0.001085 main(2):  + jpeg (for displaying live previews in JPEG format)
>0.001172 main(2):  + readline (for easy navigation in the shell)
>0.001272 main(2): libgphoto2 2.1.4
>0.054676 main(2): libgphoto2 has been compiled with the following
>options: 0.054807 main(2):  + gcc (C compiler used)
>0.054899 main(2):  + EXIF (for special handling of EXIF files)
>0.054988 main(2):  + no ltdl (working around buggy libltdl, eh? :-)
>0.055077 main(2):  + /proc/meminfo (adapts cache size to memory
>available) 0.055210 main(

Gphoto2: Could not claim the USB device

2004-08-17 Conversa Quim Gil
He provat de resoldre això amb l'extensa documentació de gphoto.org, 
però res. A veure si alguna ànima caritativa d'aquesta llista...


- Tinc gphoto i gtkam en les sevs versions d'unstable.

- Tinc una càmera digital Sony Cybershot DSC-P31 que figura entre les 
càmeres reconegudes per Gphoto.


- Tinc el mòdul usb-storage muntat i el paquet hotplug instal·lat.

Si obro amb Gtkam d'entrada no em surt res. Vaig a "add camera", faig 
autodetect i gairebé me la troba (diu que tinc una Sony DSC-F707V) però 
tant si selecciono aquesta com el meu model diu que "Could not 
initialize camera".


Llavors vaig a la consola seguint els passos recomanats a les FAQ de 
Gphoto.


1. Fent "gphoto2 --list-ports" troba l'usb.

2. Fent l'autodetect troba una càmera:

[EMAIL PROTECTED]:~$ gphoto2 --auto-detect
Model  Port
--
Sony DSC-F707V (PTP mode)  usb:

3. Fent --summary o --list-files surt l'error 'Could not claim the USB 
device'  (adjunto al final missatges amb debug).


4. Vaig a 
http://www.gphoto.org/doc/manual/FAQ.html#FAQ-could-not-claim-USB i 
d'allà a http://www.gphoto.org/doc/manual/permissions-usb.html per a 
veure si sóc capaç de veure què falla amb els permisos però la resposta 
que em trobo ve a dir que si he instal·lat un paquet pre-built i/o 
utilitzo hotplug això dels permisos ja estarà configurat. I no és el cas...



A veure si això té solució, que fins ara feia la trampa descarregant les 
fotos al WinXP però ara que es veu que me l'he carregat...  :)


Gràcies.

Quim
PS: els debug

[EMAIL PROTECTED]:~$ gphoto2 --list-files

*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): 
Could not claim interface 0 (L'operació no és permesa). Make sure no 
other program or kernel module (e.g. dc2xx or stv680) 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 <[EMAIL PROTECTED]>, please run
gphoto2 as follows:

env LANG=C gphoto2 --debug --list-files

Please make sure there is sufficient quoting around the arguments.

[EMAIL PROTECTED]:~$ env LANG=C gphoto2 --debug --list-files
0.49 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG 
MESSAGES TO THE MAILING LIST:

0.000438 main(2): gphoto2 2.1.4
0.000530 main(2): gphoto2 has been compiled with the following options:
0.000619 main(2):  + gcc (C compiler used)
0.000706 main(2):  + no popt (for handling command-line parameters)
0.000821 main(2):  + exif (for displaying EXIF information)
0.000910 main(2):  + cdk (for accessing configuration options)
0.000997 main(2):  + no aa (for displaying live previews)
0.001085 main(2):  + jpeg (for displaying live previews in JPEG format)
0.001172 main(2):  + readline (for easy navigation in the shell)
0.001272 main(2): libgphoto2 2.1.4
0.054676 main(2): libgphoto2 has been compiled with the following options:
0.054807 main(2):  + gcc (C compiler used)
0.054899 main(2):  + EXIF (for special handling of EXIF files)
0.054988 main(2):  + no ltdl (working around buggy libltdl, eh? :-)
0.055077 main(2):  + /proc/meminfo (adapts cache size to memory available)
0.055210 main(2): libgphoto2_port 0.5.1
0.055301 main(2): libgphoto2_port has been compiled with the following 
options:

0.055389 main(2):  + gcc (C compiler used)
0.055477 main(2):  + USB (for USB cameras)
0.113981 main(2):  + serial (for serial cameras)
0.114226 main(2):  + no resmgr (serial port access and locking)
0.114316 main(2):  + no baudboy (serial port locking)
0.114404 main(2):  + no ttylock (serial port locking)
0.114491 main(2):  + no lockdev (serial port locking)
0.114579 main(2):  + no ltdl (working around buggy libltdl, eh? :-)
0.114677 foreach(2): Executing action 'List Files' for folder '/'.
0.171704 gphoto2-camera(2): Listing files in '/'...
0.172165 gphoto2-camera(2): Initializing camera...
0.172294 gphoto2-port-usb(1): Looking for USB device (vendor 0x54c, 
product 0x4e)... found.
0.172398 gphoto2-port-usb(1): Detected defaults: config 1, interface 0, 
altsetting 0, inep 82, outep 01, intep 83, class 06, subclass 01
0.172495 gphoto2-camera(2): Loading 
'/usr/lib/gphoto2/2.1.4/libgphoto2_ptp2.so'...

0.173096 gphoto2-port(2): Opening USB port...
0.227459 gphoto2-port(0): Could not claim interface 0 (Operation not 
permitted). Make sure no other program or kernel module (e.g. dc2xx or 
stv680) is using the device and you have read/write access to the device.
0.227888 context(0): 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 (e.g. dc2xx or 
stv680) is using the device and you have read/write access to the device.


*** Error