DrStrangeLv has asked for the wisdom of the Perl Monks concerning the following question:
I have a cgi script to control my dslr camera
On my server the app that sends commands to the camera is gphoto2
Running under Debian on a Linksys NSLU2.
I'm using tthtp and pearl.
My problem is that I'm not able to get the cgi to send the command to the server.
I'm no expert on cgi.
What I need to know is what cgi command can pass the server command.
Here is a more detail explanation:
When login using putty under ssh to server as root
This command works fine
gphoto2 --set-config capture=on --set-config capturetarget=1 --set-config capture=on --set-config eos-shutterspeed=35 --set-config eos-iso=0 --set-config capture=off --capture-image
But when I attempt it from within a cgi script using this command
system("gphoto2 --set-config capture=on --set-config capturetarget=1 --set-config capture=on --set-config eos-shutterspeed=35 --set-config eos-iso=0 --set-config capture=off --capture-image");
I get this error back
*** 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 *** 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 *** 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 *** 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 *** 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 *** 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 *** 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: Could not capture. *** 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 , please run gphoto2 as follows: env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --set-config capture=on --set-config capturetarget=1 --set-config capture=on --set-config eos-shutterspeed=35 --set-config eos-iso=0 --set-config capture=off --capture-image Please make sure there is sufficient quoting around the arguments.
|
|---|