gphoto / gphoto2

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

random --wait-event issue with Nikon Z72 #642

Open Imothep44 opened 1 month ago

Imothep44 commented 1 month ago

the bug I have a bug with the --wait-event option command on Z72 and Raspberry pi 4. When I have a new fresh install of the os rasbian, all work fine. I run this command: gphoto2 --trigger-capture --wait-event=CAPTURECOMPLETE. But after a while of use (some days or +) or modification of the Nikon settings or whatever else, the --wait-event command gives me an error: Error PTP Device Prop Not Supported Error (-1: 'Unspecified error')

Name the camera Nikon Z7_2 usb:001,012

libgphoto2 and gphoto2 version gphoto2 2.5.28.1 libgphoto2 2.5.30 libgphoto2_port 0.12.1

To Reproduce That's the problem is that I don't know how to reproduce what causes this bug. Resetting all settings of the Nikon do not solve the issue. I can just say that if I reinstall raspbian everything will work again.

By advance: Thanks !

Imothep44 commented 1 month ago

it seems that modifying the "autofocus" setting causes the bug... It's very strange, when I change this setting the --wait-event setting works or doesn't work randomly... (Once it's ok with autofocus set to On, Once it's ok with Off...) It's a bug? Anyone can help me?

msmeissn commented 1 month ago

autofocus is not a setting, it is an action trigger ... setting it will be triggering the autofocus logic.

kind of weird, it should not cause problems.

that this only happens after days would lead me to suspect some camera firmware instability.

Imothep44 commented 3 weeks ago

The issue comes when I modify this setting: /main/settings/autofocus. Not when I try to do an autofocus drive (/main/actions/autofocusdrive). For now when I set /main/settings/autofocus=Off the gphoto2 --trigger-capture --wait-event=1s work fine but when I change this to: /main/settings/autofocus=On I have the error PTP Device Prop Not Supported.

Imothep44 commented 3 weeks ago

For more accuracy here is my test process: 1st test

  1. gphoto2 --set-config autofocus=On
  2. gphoto2 --trigger-capture --wait-event=1s
  3. Return of gphoto2: Error PTP Device Prop Not Supported Error (-1: 'Unspecified error') 2nd test:
  4. gphoto2 --set-config autofocus=Off
  5. gphoto2 --trigger-capture --wait-event=1s
  6. Return of gphoto2: no errors.

I precise that on my Nikon the setting autofocus change nothing on the focus, (AF-S)

msmeissn commented 3 weeks ago

the device prop not supportd bug is now fixed in master branch

Imothep44 commented 3 weeks ago

great ! Thanks