gphoto / gphoto2

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

Is there any improvement on Sony cameras? #192

Open minw428 opened 5 years ago

minw428 commented 5 years ago

I read all thread related to Sony. I'm facing a same problem that the capture command is suspended after taking some shots.

As I know there are a few way to exit that state.

  1. kill the process. You can see using 'ps aux' or Ctrl - c
  2. take a shot manually using button of the camera --> this is not working.. :(

Is there any improvement on this? I'm using RX100M4 and it is hard to complete a timelapse.

msmeissn commented 5 years ago

"some shots" is how many usually?

this should not happen though, but I did not work on this as I was not fully aware of it.

Is it possible to capture a debug trace?

Use --debug-level=debug to not include data in the logfile

minw428 commented 5 years ago

Sometimes over 100 shots, sometimes under 30 shots.

I think that there are some missing(or ignored by camera) command. Because when it happens if I press a shot button of camera then the suspended status is cleared.

msmeissn commented 5 years ago

yeah, likely a missed event or similar :/

minw428 commented 5 years ago

I just plan to test with a simple way.

do { // full press propval.u16 = 2; C_PTP (ptp_sony_setdevicecontrolvalueb (params, PTP_DPC_SONY_Capture, &propval, PTP_DTC_UINT16));

// delay about 200ms

// release press propval.u16 = 1; C_PTP (ptp_sony_setdevicecontrolvalueb (params, PTP_DPC_SONY_Capture, &propval, PTP_DTC_UINT16));

// delay about 1000ms

C_PTP (ptp_sony_getalldevicepropdesc (params)); / avoid caching / C_PTP (ptp_generic_getdevicepropdesc (params, PTP_DPC_SONY_ObjectInMemory, &dpd));

if (dpd.CurrentValue.u16 > 0x8000) { GP_LOG_D ("SONY ObjectInMemory count change seen, ending wait"); break; } } while (time_since (event_start) < 10000);

  1. Can I get the button status? If so, I can remove some delay. press button -> check button pressed -> release button -> check button released -> check image.

  2. half press is mandatory? I'm using manual focus.

minw428 commented 5 years ago

Same result... :( Can you recommend a flawless camera model?

I tried using my android phones(galaxy s3 note4 s6 s8).. all were auto detected but failed to capture image.

msmeissn commented 5 years ago

can you try this patch... it enabled the event handling again, which should report on added images

reason it was disabled is that it was unstable on some models though

patch.txt

msmeissn commented 5 years ago

The Nikon DSLR/Z and Canon EOS DSLR / R are more reliable FWIW

minw428 commented 5 years ago

can you try this patch... it enabled the event handling again, which should report on added images

reason it was disabled is that it was unstable on some models though

patch.txt

  1. compile error due to the "dual" variable. if (dual) ptp_add_event (params, &event);

what "dual" should be?

  1. If I block above line, I meet runtime error. gphoto2: symbol lookup error: /usr/local/lib/libgphoto2/2.5.20/ptp2.so: undefined symbol: ptp_check_queue
msmeissn commented 5 years ago

it is ptp_check_event_queue in the patch, did oyu mistype it?

minw428 commented 5 years ago

it is ptp_check_event_queue in the patch, did oyu mistype it?

sorry :)

What should I do for "dual"? https://github.com/gphoto/libgphoto2/blob/412ef5ef34afb59a921d1033825867e72b0e1b21/camlibs/ptp2/library.c#L4197

I tried with if(dual) was commented but I met following situations

  1. Error (-60: 'Could not lock the device')
  2. Error: No camera found.

It seems this patch works not.

maxbcn commented 5 years ago

Hello Marcus, I had two cameras a5000 doing time-lapse and discover that the setting on the camera sould be on " PC REMOTE " not in ptp. With this setting it did work for me for a few days in one of the cameras, but now both cameras not doing nothing. I can send you one of my cameras for you to test if you need it and resolve this issue more deeply. Doing " lsusb " it appears the sony camera but is not working at all. Can you help us?

Marcos

msmeissn commented 5 years ago

if it survives several days of shooting this will be very hard to debug. :/

jhas it totally stopped working?

maxbcn commented 5 years ago

Yes , stopped with not reason aparenly

maxbcn commented 5 years ago

I restart the camera and did only one picture and stop all. Attached log file debug my-logfile.txt

On "lsusb" I can see the camera.

Thank you

Brechtjeu commented 5 years ago

Hi,

I have something, that is not really a permanent or pretty solution but rather a hot fix. I opened issue #216, about the same problem, where I'm using python. At this time I can recover from this by executing

kill -9 ps aux | grep gphoto | grep -v grep | awk '{print $2}'

each time the capture process takes longer than 6-7 seconds to terminate. (using multiprocessing in python)

it ain't pretty but it works...