From: SCOTT B. <bro...@gm...> - 2008-09-11 22:00:00
|
Hi, I have a Canon PowerShot A640 and I have found an error while capturing images with gphoto. If I put gphoto into a loop taking only 2 pictures and I check what files are listed using the gphoto --list-files command there always ends up being 3 pictures taken instead of two. For some reason an error appears during the second shot. It doesn't matter if you take 50 pictures in a loop or 2, there always is one extra picture. Here is a mock script file; --------------------------------------------------------------------------------------------------------------------------------------- #myscript.txt #!/bin/sh i=0 while [ $i -lt 2 ] do gphoto2 --capture-image if [ "$?" -ne "1" ]; then echo "Picture taken sucessfully" i=`expr $i + 1` else echo "Picture unsuccessfull" fi done -------------------------------------------------------------------------------------------------------------------------------------------------- Here is the displayed output when the program is ran: root@gumstix-custom-verdex:~$ ./test.txt New file is in location /store_00010001/IMG_0001.JPG on the camera Picture taken sucessfully ERROR: Could not capture. *** Error (-10: 'Timeout reading from or writing to the port') *** 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 <gph...@li...>, please run gphoto2 as follows: env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --capture-image Please make sure there is sufficient quoting around the arguments. Picture unsuccessfull New file is in location /store_00010001/DCIM/100CANON/IMG_0002.JPG on the camera Picture taken sucessfully root@gumstix-custom-verdex:~$ ----------------------------------------------------------------------------------------------------------------------------------------------- here is the camera files listed: root@gumstix-custom-verdex:~$ gphoto2 --list-files There is no file in folder '/'. There is no file in folder '/store_00010001'. There is no file in folder '/store_00010001/DCIM'. There are 3 files in folder '/store_00010001/DCIM/100CANON'. #1 IMG_0001.JPG 2177 KB 3648x2736 image/jpeg #2 IMG_0002.JPG 2165 KB 3648x2736 image/jpeg #3 IMG_0003.JPG 2200 KB 3648x2736 image/jpeg There is no file in folder '/store_00010001/MISC'. ------------------------------------------------------------------------------------------------------------------------------------------------ Anyone have any ideas on how to fix the error occuring? I am trying link each picture with a program created text file and currently I am not able to with the double picture being taken after the second picture. I have tried to slow down gphoto using sleep commands and there still always is an error with the second picture being taken for some reason. Thanks, Scott Brown |