gphoto / gphoto2

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

Unable to set new eosremoterelease EOS 500D #261

Open LukasP46 opened 5 years ago

LukasP46 commented 5 years ago

If I try to capture a long exposure picture, I can't get the camera to stop the exposure. My goal is to capture a lot of images, but now it fails after the third one.

Hardware: Raspberry Pi 3 B+ Canon EOS 500D usb:001,004

gphoto2         2.5.23 gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2      2.5.23 all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

Normaly I use one command gphoto2 --debug --debug-logfile gphoto2_debug_2.log --debug-loglevel error --set-config eosremoterelease=Immediate --wait-event=600s --set-config eosremoterelease="Release Full" --wait-event-and-download="CAPTURECOMPLETE" --skip-existing --filename "test.%C"

To find the bug a split may be better: gphoto2 --debug --debug-logfile gphoto2_debug.log --debug-loglevel error --set-config eosremoterelease=Immediate Debug:

0.531275 ptp_usb_getresp [usb.c:514] (0): PTP_OC 0x9160 receiving resp failed: PTP Device Busy (0x2019)
0.533453 ptp_usb_getresp [usb.c:514] (0): PTP_OC 0x911c receiving resp failed: PTP Device Busy (0x2019)
0.533491 camera_unprepare_canon_eos_capture [config.c:559](0): 'ptp_canon_eos_resetuilock (params)' failed: PTP Device Busy (0x2019)

And then the release: gphoto2 --debug --debug-logfile gphoto2_debug_release.log --debug-loglevel error --set-config eosremoterelease="Release Full" --filename "test.%C" Debug:

0.228495 ptp_usb_getresp [usb.c:514] (0): PTP_OC 0x9110 receiving resp failed: PTP Device Busy (0x2019)
0.228618 camera_canon_eos_update_capture_target [config.c:344](0): 'ptp_canon_eos_setdevicepropvalue (params, PTP_DPC_CANON_EOS_CaptureDestination, &ct_val, PTP_DTC_UINT32)' failed: setdevicepropvalue of capturetarget to 0x4 failed (0x2019: PTP Device Busy)
0.228659 camera_prepare_canon_eos_capture [config.c:435](0): 'camera_canon_eos_update_capture_target( camera, context, -1 )' failed: 'Unknown error' (-110)
0.294722 ptp_usb_getresp [usb.c:514] (0): PTP_OC 0x9110 receiving resp failed: PTP Device Busy (0x2019)
0.294786 camera_canon_eos_update_capture_target [config.c:344](0): 'ptp_canon_eos_setdevicepropvalue (params, PTP_DPC_CANON_EOS_CaptureDestination, &ct_val, PTP_DTC_UINT32)' failed: setdevicepropvalue of capturetarget to 0x4 failed (0x2019: PTP Device Busy)
0.294816 camera_prepare_canon_eos_capture [config.c:435](0): 'camera_canon_eos_update_capture_target( camera, context, -1 )' failed: 'Unknown error' (-110)
0.300692 ptp_usb_getresp [usb.c:514] (0): PTP_OC 0x9110 receiving resp failed: PTP Device Busy (0x2019)
0.300727 camera_canon_eos_update_capture_target [config.c:344](0): 'ptp_canon_eos_setdevicepropvalue (params, PTP_DPC_CANON_EOS_CaptureDestination, &ct_val, PTP_DTC_UINT32)' failed: setdevicepropvalue of capturetarget to 0x4 failed (0x2019: PTP Device Busy)
0.300754 _put_Canon_EOS_RemoteRelease [config.c:5944](0): 'camera_canon_eos_update_capture_target( camera, context, -1 )' failed: 'Unknown error' (-110)
0.300780 gp_camera_set_single_config [gphoto2-camera.c:1145](0): 'camera->functions->set_single_config ( camera, name, widget, context)' failed: -110
0.300812 gp_context_error            (0): Failed to set new configuration value Release Full for configuration entry eosremoterelease.

The strange thing is, that this has worked for a year, when I used the old version of the Debian repository, but now it doesn't, even with the old or new version.

PS: If you want to more about my project: https://www.schuelerlabor-astronomie.de/meteorkamera/ (it is in German though)

LukasP46 commented 5 years ago

When I should provide more information, please let me know.

msmeissn commented 4 years ago

device busy usually means we did not fetch image data or missed other acrtions, this will make the camera get stucjk on busy mode.

I do not see anything problematic, also currently no other reports of the EOS500D having issues.

Is the SD Card plugged in? What is capturetarget set to?

can you try libgphoto2 2.5.25 :/

LukasP46 commented 4 years ago

It is working now with version 2.5.22. Im am now using Dietpi instead of Raspbian. Sometimes gphoto2 still does not work, but it is because the kernel reinitialize the usb device: (...) kernel: usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 (...) kernel: usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800, bcdDevice= 3.00 Then I have to reboot the machine because often the camera is then often stuck with the same error as above: 285.869108 ptp_usb_getresp [usb.c:514] (0): PTP_OC 0x911c receiving resp failed: PTP Device Busy (0x2019) 285.869137 camera_unprepare_canon_eos_capture [config.c:545](0): 'ptp_canon_eos_resetuilock (params)' failed: PTP Device Busy (0x2019) So maybe it was the kernel from the beginning and Dietpi is just a bit more stable, but I really can not explain myself why it was able to proceed to the third picture back than...

Now I have to work on a script that detects these kernel issue and reboots the machine, not ideal...

I do not have an SD Card plugged in, should I?