gphoto / gphoto2

The gphoto2 commandline tool for accessing and controlling digital cameras.
GNU General Public License v2.0
682 stars 118 forks source link

Gphoto2 hangs on call to capture image with Sony A6000 #109

Open DarkmatterVale opened 6 years ago

DarkmatterVale commented 6 years ago

Hi,

Thank you for the incredible work on such a great library!

I've noticed a random hang issue with my Sony A6000 whenever I attempt to capture a series of photos in a row. After a random duration of time during which I call the camera to take pictures and download them to my computer, the following piece of code hangs:

gphoto2 --capture-image-and-download --filename image-number.jpg

It appears to occur randomly, and if I stop taking pictures and run gphoto2 --reset, the issue disappears (temporarily).

Is there any simple fix for this issue?

duichan commented 6 years ago

I was having exactly this same problem with a Sony A5100 (a very similar camera) and a Raspberry Pi. gphoto2 works fine with a Nikon and the Pi, and the Sony works fine with their own software under MS Windows.

After two frustrating weeks bug hunting I think I have stumbled on a solution. I had originally installed gphoto2 using gonzalo's script gphoto2-updater.sh on GitHub. Running gphoto2 -- version gave:

libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

I then reinstalled libgphoto2_port using the Pi's Add / Remove software utility. gphoto2 --version now reports:

libgphoto2_port 0.12.0 gcc, ltdl, USB, serial without locking

Now everything appears to be working as it should. I need to test further, but I have run the camera for 12 hours, taking one exposure every minute, without mishap: something which I could never achieve before.

I don't have an explanation, and I would like to know if it works for you too.

duichan commented 6 years ago

I spoke too soon! Although the method detailed in my earlier post has significantly improved the mean-time-between-failure, it has not eliminated failures altogether.

BTW I think Issue 111 and Issue 80 are also referring to this same problem.

aprentis commented 5 years ago

Hi, I have similar problem. My Sony a6000 has latest firmware 3.21. with gphoto2 --capture-image --interval 3 command it works great, but only for first 15 shots. At 16-th image it freezes. If i press the button on camera manually it takes several extra images but with big latency(much more then 3 seconds). Camera is in "remote PC" mode. Any ideas?

luzpaz commented 12 months ago

Needs sony label