gphoto2 icon indicating copy to clipboard operation
gphoto2 copied to clipboard

Canon PowerShot G7 X Mark III Issues with lens extending/retracting and setting zoom

Open cstaton-ftlg opened this issue 1 year ago • 0 comments

This is something I started to describe in https://github.com/gphoto/gphoto2/issues/501 but I think it is a different issue.

gphoto2 2.5.27 gcc, popt(m), exif, cdk, aa, jpeg, readline libgphoto2 2.5.27 standard camlibs, gcc, ltdl, EXIF libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking Manufacturer: Canon.Inc Model: Canon PowerShot G7 X Mark III Version: 3-1.1.0

This may be two issues or two symptoms of one issue, not sure. First symptom (excessive extending/retracting of the lens) I will explain with a sequence of events:

  1. Camera powered on, lens extended, LCD showing viewfinder, plugged into USB
  2. gphoto2 --auto-detect -no change
  3. gphoto2 --set-config capturetarget=card --set-config zoomspeed=10 --set-config evfmode=0 -lens retracts, dust cover closes -LCD shows black screen with battery level and PC icon
  4. gphoto2 --trigger-capture -lens extends, dust cover opens -takes picture (only if evfmode=0, else Error (-110: 'I/O in progress')) -lens remains extended
  5. gphoto2 --trigger-capture (again) -lens retracts, dust cover closes -lens extends, dust cover opens -takes picture -lens remains extended
  6. From here, any --trigger-capture or --set-config or pretty much anything else, will result in the lens retracting and extending again (or not, depending on command, it may remain retracted).
  7. From here, if I send --set-config zoom=101: -*** Error *** The property 'Zoom' / 0xd055 was not set (0x2019: PTP Device Busy) -*** Error *** Failed to set new configuration value 101 for configuration entry zoom *** Error (-110: 'I/O in progress') *** -zoom level does not change -lens retracts, dust cover closes
  8. If I send --set-config zoom=101 --trigger-capture it will give the same error, but take a picture, then retract.

I came to suspect that the issue is manifest only when the lens is retracted, actively extending, or actively retracting (which is practically almost always). So I tried for a way to "trick" the camera into going into a state, other than extending, retracting, or retracted, where it is ready to receive a zoom command. This is what I came up with:

gphoto2 --set-config eosremoterelease=1 --set-config eosremoterelease=4 --set-config zoom=101 --wait-event=5s --trigger-capture

This simulates a quick half-press to wake the camera from its home position and extend the lens. Then it sets the zoom level to max, waits 5 seconds for the lens to arrive at max position, then takes a picture. This works. I still get this error but it does actually zoom in:

*** Error ***
The property 'Zoom' / 0xd055 was not set (0x2019: PTP Device Busy). *** Error ***
Failed to set new configuration value 101 for configuration entry zoom.

This works only if you do the whole thing in one command just like I pasted above. If you do gphoto2 --set-config eosremoterelease=1 --set-config eosremoterelease=4 --set-config zoom=101 --wait-event=5s followed by gphoto 2 --trigger-capture It will do the zooming in, then retract and close, then open again and take a picture at 0 zoom.

I suspect there is an issue with setting the zoom level and then reading it back immediately, without giving the lens time to get to its new position and that is the cause of "Failed to set new configuration value" for zoom. Then there is the issue of always retracting for no apparent reason.

Am I correct in assuming that the way this should work is that the camera will remain open/extended at all times and not require a return to home/retracted position at the start of every gphoto2 call?

debug.log

cstaton-ftlg avatar May 02 '23 19:05 cstaton-ftlg