gphoto / gphoto2

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

every alternate capture request fails - Nikon D5500 #164

Open buch11 opened 6 years ago

buch11 commented 6 years ago

Hi!

I am using gphoto CLI on ubuntu with Nikon D5500.

I am trying to test timelapse my alternate images are failing with below error. I have seen many posts about this error but my debug log shows something else.

root@lolalol-lin-bl:/home/lolalol# gphoto2 --debug --capture-image -F 2 -I 5 --debug-logfile=debug.log Time-lapse mode enabled (interval: 5s).
Capturing frame #1/2... New file is in location /capt0000.jpg on the camera
Waiting for next capture slot 0 seconds... Capturing frame #2/2... ERROR: Could not capture image. ERROR: Could not capture.

And after first image is written to LRU FSCACHE, i am seeing below error so many times in debug logs :

5.812481 camera_nikon_capture (2): event.Code is 4006 / param d10b 5.812491 camera_nikon_capture (2): UNHANDLED event.Code is 4006 / param d10b, DEFER

And after a few times of above lines a final error :

6.367946 ptp_usb_getresp [usb.c:428] (0): PTP_OC 0x1008 receiving resp failed: PTP Invalid Object Handle (0x2009) 6.367959 camera_nikon_capture library.c:2962: 'ptp_getobjectinfo (params, newobject, &oi)' failed: PTP Invalid Object Handle (0x2009) 6.367973 gp_camera_capture gphoto2-camera.c:1032: 'camera->functions->capture (camera, type, path, context)' failed: -1 6.368029 camera_wait_for_event (2): waiting for events timeout 3000 ms 6.368044 ptp_usb_sendreq (2): Sending PTP_OC 0x90c7 (PTP_OC_NIKON_CheckEvent) request... 6.368053 gp_port_write (3): Writing 12 = 0xc bytes to port... 6.368152 gp_port_write (3): Wrote 12 = 0xc bytes to port: (hexdump of 12 bytes) 0000 0c 00 00 00 01 00 c7 90-35 00 00 00 ........5...

I tried googling event code 4006 but nothing comes up. Attaching full debug log as well. debug.log

Let me know if any more details are needed.

msmeissn commented 6 years ago

event 4006 is a property change, this is harmless and unrelated

msmeissn commented 6 years ago

the 1008 getobjecthandle is the real error as you write . It is weird, we get told that the new object is there via the c101 event, but it does not seem to be there :/ here is the second occurence: 6.366640 camera_nikon_capture (2): event.Code is c101 / param 2b000001 6.366650 camera_nikon_capture (2): event.Code is c102 / param d10b 6.366658 camera_nikon_capture (2): event.Code is 4006 / param d10b

buch11 commented 5 years ago

Oh, right! My wild guess would be maybe cache is not being overwritten fast-enough?

so how do we proceed on this? Is there is a nikon specific guide of some sort that talks about the events and how to handle them?