Hello libgphoto2 team,
First of all, thank you for your amazing work. I am developing an Android application using libgphoto2 (via JNI/C++) connected to a Fujifilm X-T3 via USB. I am facing a complex state-lock issue related to the LiveView and Capture flow.
Here are the two main issues I am experiencing:
Issue 1: Parameter changes are silently ignored after LiveView starts/stops
- Initial connection: I initialize the camera. I can successfully change parameters (ISO, Aperture, Shutter Speed) using
gp_widget_set_value and gp_camera_set_config.
- Start LiveView: I start a loop calling
gp_camera_capture_preview(). It works perfectly.
- Stop LiveView: I break the loop to change a parameter.
- The Bug: If I try to change a parameter now,
gp_camera_set_config returns GP_OK (0), but the camera silently ignores it (if I read the config back immediately, the value hasn't changed).
- What I've tried: I attempted to manually turn off the viewfinder using the Fujifilm vendor opcode
500b (set_config("500b", 0)), but the camera seems to ignore this opcode via USB. I also added gp_camera_get_summary() to force a state refresh, but the camera remains "locked" against parameter changes.
Issue 2: Post-Capture PTP_BUSY state anomaly
Following the LiveView issue, if I proceed to take a picture:
- I stop the LiveView loop.
- I call
gp_camera_capture().
- The image is captured and downloaded successfully, but the camera enters a "Busy" state (LED blinking green/orange) and gets stuck there.
- The anomaly: Curiously, while in this stuck/busy state, parameter changes (ISO, Shutter) suddenly start working again. However, because it is stuck, I can no longer restart LiveView or take another picture.
- What I've tried: I implemented a robust event-draining loop (
gp_camera_wait_for_event), capturing GP_EVENT_FILE_ADDED, doing gp_camera_file_get (to satisfy Fuji's buffer) and gp_camera_file_delete. Even with this, the camera struggles to return to a clean idle state to resume LiveView.
Environment Details:
- Camera: Fujifilm X-T3 (Firmware: 5.11)
- Connection: USB Tethering Auto / USB to Android device.
- libgphoto2 version: 2.5.33
- OS: Android (using NDK/C++)
Is there a specific sequence of commands or PTP vendor extensions required for the X-T3 to properly exit the LiveView state and accept config changes? Also, how can I cleanly clear the PTP_BUSY state after a capture so LiveView can be resumed?
Any guidance or workarounds would be deeply appreciated. Thank you!
Hello libgphoto2 team,
First of all, thank you for your amazing work. I am developing an Android application using
libgphoto2(via JNI/C++) connected to a Fujifilm X-T3 via USB. I am facing a complex state-lock issue related to the LiveView and Capture flow.Here are the two main issues I am experiencing:
Issue 1: Parameter changes are silently ignored after LiveView starts/stops
gp_widget_set_valueandgp_camera_set_config.gp_camera_capture_preview(). It works perfectly.gp_camera_set_configreturnsGP_OK(0), but the camera silently ignores it (if I read the config back immediately, the value hasn't changed).500b(set_config("500b", 0)), but the camera seems to ignore this opcode via USB. I also addedgp_camera_get_summary()to force a state refresh, but the camera remains "locked" against parameter changes.Issue 2: Post-Capture PTP_BUSY state anomaly
Following the LiveView issue, if I proceed to take a picture:
gp_camera_capture().gp_camera_wait_for_event), capturingGP_EVENT_FILE_ADDED, doinggp_camera_file_get(to satisfy Fuji's buffer) andgp_camera_file_delete. Even with this, the camera struggles to return to a clean idle state to resume LiveView.Environment Details:
Is there a specific sequence of commands or PTP vendor extensions required for the X-T3 to properly exit the LiveView state and accept config changes? Also, how can I cleanly clear the PTP_BUSY state after a capture so LiveView can be resumed?
Any guidance or workarounds would be deeply appreciated. Thank you!