libgphoto2 icon indicating copy to clipboard operation
libgphoto2 copied to clipboard

FujiFilm X-S10 fw: 2.0

Open ratcashdev opened this issue 2 years ago • 18 comments

Previously, my X-S10 was working fine with gphoto --capture-movie using the the patches like https://github.com/gphoto/libgphoto2/commit/118903d57192ec048b3b3dd4101aba5f0a264bf7 and increasing the tries to 20 or 30

However, after I have upgraded its firmare to 2.0 (adding full tethered shooting support), gphoto is not able to use it at all.

Using gphoto2 --camera="Fuji Fujifilm X-S10" --capture-movie --debug-logfile=capturepreview.log results in the following:

Capturing preview frames as movie to 'movie.mjpg'. Press Ctrl-C to abort.      
ERROR: Movie capture error... Exiting.
Movie capture finished (0 frames)

The log is attached.

capturepreview.log

ratcashdev avatar Oct 11 '21 18:10 ratcashdev

can you increae the tries again? or the wait time?

msmeissn avatar Oct 13 '21 09:10 msmeissn

current diff. What values should I try?

diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index bd8b3514f..ede030e9a 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -2568,7 +2568,7 @@ static struct {
        /* https://github.com/gphoto/libgphoto2/issues/505 */
        {"Fuji:Fujifilm X-T4",                  0x04cb, 0x02e6, PTP_CAP|PTP_CAP_PREVIEW},
        /* https://github.com/gphoto/libgphoto2/issues/603 */
-   {"Fuji:Fujifilm X-S10",                 0x04cb, 0x02ea, PTP_CAP_PREVIEW},       /* only webcam mode apparently */
+ {"Fuji:Fujifilm X-S10",                     0x04cb, 0x02ea, 0},     /* only webcam mode apparently */
 
        {"Ricoh:Caplio R5 (PTP mode)",          0x05ca, 0x0110, 0},
        {"Ricoh:Caplio GX (PTP mode)",          0x05ca, 0x0325, 0},
@@ -3624,7 +3624,7 @@ enable_liveview:
                PTPObjectInfo   oi;
                uint32_t        preview_object = 0x80000001; /* this is where the liveview image is accessed */
                unsigned char   *ximage = NULL;
-           int             tries = 10;
+         int         tries = 30;
 
                if (params->jpgfd) {
                        unsigned int i;

Edit: tried 60, result still the same.

ratcashdev avatar Oct 13 '21 09:10 ratcashdev

there is a tries = 5 around 25 lines lower, can you increase that a bit too?

msmeissn avatar Oct 14 '21 14:10 msmeissn

Increased both following tries to 60. The error shows up a bit later now, the captured movies is 0 bytes.

ratcashdev avatar Oct 14 '21 16:10 ratcashdev

FW version 2.10 - still the same. Attached a new debug log: capturepreview.log

keep saying PTP_OC 0x1008 receiving resp failed: PTP Invalid Object Handle (0x2009)

ratcashdev avatar Oct 27 '21 08:10 ratcashdev

thanks ... it seems the new firmware needs a bit different setup code than before.

Sadly my camera rental agency currently has no S10... does it happen for other Fujis too?

Or

Is someone able to capture a USB Trace of this in Windows? via usbpcap or simiklar tool?

msmeissn avatar Oct 31 '21 12:10 msmeissn

What kind of communication needs to be captured using usbpcap? What exactly needs to be done?

ratcashdev avatar Oct 31 '21 14:10 ratcashdev

basically from start of the tool / plugin of the camera to the start of the preview stream

msmeissn avatar Oct 31 '21 15:10 msmeissn

but what SW should I use to talk to the camera under windows?

ratcashdev avatar Oct 31 '21 17:10 ratcashdev

I have used usbpcap to capture using of X-S10 as a webcam on Windows (using the Fujifilm X Webcam 2 software). Camera firmware 2.10

In the pcap file, the camera is device 2.4.0/2.4.1 I have turned the camera on in the USB TETHER SHOOTING AUTO (there is no separate X-WEBCAM mode anymore), then started the webcam preview and saw the live image, then changed exposure compensation through X Webcam UI. compressed pcap file

Note that when turning the camera on in tethering mode, it is mounted in Windows with two folders inside: Still and Live. Whan I manually take a picture, a JPG files appears in the Still folder, the same both folders are also seen in the gphoto2 --summary

angryziber avatar Jan 29 '22 17:01 angryziber

Adding also logs files and summary from gphoto2, same camera and same laptop capture-image.txt config.txt summary.txt

Note that gphoto2 --capture-tethered doesn't fail and is able to save the first image that I capture with the camera manually. When pressing Ctrl+C, the "-1: Unspecified error" appears as well.

angryziber avatar Jan 29 '22 17:01 angryziber

first look at pcap dump ... can you try:

gphoto2 --set-config d21c=0 --capture-preview gphoto2 --set-config d21c=0 --capture-image-and-download ?

msmeissn avatar Feb 07 '22 16:02 msmeissn

Result of gphoto2 --set-config d21c=0 --capture-preview debug.log

Result of

gphoto2 --set-config d21c=0 --capture-image-and-download
                                                                               
*** Error ***              
PTP General Error
ERROR: Could not capture image.
ERROR: Could not capture.
New file is in location /store_10000001/DSCF0002.jpg on the camera
Saving file as DSCF0002.jpg
Deleting file /store_10000001/DSCF0002.jpg on the camera

it failed to capture the image automatically, but it downloaded the image when I hit the button manually.

ratcashdev avatar Feb 07 '22 18:02 ratcashdev

ok, but that was working before. can you try some other values besides 0 ( 1 - 14 ) althogu I think i need to dig deeper

sorry, i dont have much time currently ... i will check back occasionaly

msmeissn avatar Feb 10 '22 14:02 msmeissn

other values did not help, unfortunately.

ratcashdev avatar Mar 06 '22 22:03 ratcashdev

@msmeissn any chance of having a look at it this time?

ratcashdev avatar May 29 '22 22:05 ratcashdev

Darktable recognizes the device as a Fuji GFX 100S. When I click "Tethered shoot" and manually hit the button, I get the image to the PC. However, the led on the camera keeps blinking (as if transfer to PC was still ongoing). Subsequent attempts to capture all fail. If I disconnect the USB cable, the camera warns me, that it believes transfer is still ongoing, and gives me the possibility to cancel it.

The only solution to successfully repeat the capture is to disconnect the USB cable and reconnect it.

From a command line, gphoto2 --set-config d21c=0 --capture-image-and-download downloads a single image (but I need to hit the shutter manually). Repeated attempts fail, just like above.

ratcashdev avatar Jul 04 '22 22:07 ratcashdev

@ratcashdev @angryziber @msmeissn I have an X-S10 and can start reproing what's been tried in this thread. I'll also be referencing #653 as I believe the X-T4 and X-S10 use the same sensor.

mdietz avatar Jul 14 '22 17:07 mdietz