gphoto / libgphoto2

The libgphoto2 camera access and control library.
GNU Lesser General Public License v2.1
989 stars 316 forks source link

OM Systems OM-1 Mark II - not able to download #969

Open coldfire22x opened 3 months ago

coldfire22x commented 3 months ago

I'm able to capture and save to the SD card but not download the captured images.

I've built libgphoto2 from 5f9f6c8 and gphoto2 from v2.5.8. Not 100% sure if #967 should be enough for download to work? No issues with my E-M1 Mark III's and I don't have an OM-1 Mark I to test with.

Olympus OM-1MarkII             usb:002,002
gphoto2         2.5.28         gcc, popt(m), exif, no cdk, no aa, jpeg, no readline
libgphoto2      2.5.31.1       standard camlibs, gcc, no ltdl, EXIF
libgphoto2_port 0.12.2         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, no ltdl, EXIF, USB, serial without locking
$ gphoto2 --summary > gphoto2-summary.txt
$ gphoto2 --capture-image-and-download --debug --debug-logfile=capture-image-and-download.log
ERROR: Could not capture image.
ERROR: Could not capture.

gphoto2-summary.txt capture-image-and-download.log

coldfire22x commented 3 months ago

I think I missed this yesterday because I always started my tests with some sort of gphoto2 command unrelated to capture (auto-detect, summary, etc.). It seems that capture and download DOES work, but only on the first attempt.

Toward the end of the first capture and download there is an error:

ptp_usb_getresp [usb.c:516] (0): PTP_OC 0x1016 receiving resp failed: PTP General Error (0x2002)

Then near the beginning of subsequent attempts, a different error:

ptp_usb_getresp [usb.c:516] (0): PTP_OC 0x1016 receiving resp failed: PTP Device Busy (0x2019)

Logs generated from the following commands are attached.

$ gphoto2 --capture-image-and-download --debug --debug-loglevel=debug --debug-logfile=capture1.log
New file is in location /store_00020001/DCIM/100OMSYS/OM120011.ORF on the camera
Saving file as OM120011.ORF
Deleting file /store_00020001/DCIM/100OMSYS/OM120011.ORF on the camera

$ ls OM120011.ORF
OM120011.ORF

$ gphoto2 --capture-image-and-download --debug --debug-loglevel=debug --debug-logfile=capture2.log
ERROR: Could not capture image.
ERROR: Could not capture.

capture1.log capture2.log

msmeissn commented 2 months ago

one thing would be to try to comment out this line: (line 3267 in library.c)

                    CR (ptp_setdevicepropvalue (params, 0xD052, &propval, PTP_DTC_UINT16));

and see if that helps.

Also is this a dual image capture (raw+jpg)? if yes, try single-jpg or single-raw first if that works better?

coldfire22x commented 2 months ago

It was set to single-raw .. I'll play with that setting on the camera with and without that line you mentioned, thanks!

-Abe

On Sat, Apr 27, 2024 at 2:32 AM Marcus Meissner @.***> wrote:

one thing would be to try to comment out this line: (line 3267 in library.c)

                CR (ptp_setdevicepropvalue (params, 0xD052, &propval, PTP_DTC_UINT16));

and see if that helps.

Also is this a dual image capture (raw+jpg)? if yes, try single-jpg or single-raw first if that works better?

— Reply to this email directly, view it on GitHub https://github.com/gphoto/libgphoto2/issues/969#issuecomment-2080430962, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJV2FEC3K73N5KEW6EHW5DY7NWDRAVCNFSM6AAAAABFKIQR3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBQGQZTAOJWGI . You are receiving this because you authored the thread.Message ID: @.***>

coldfire22x commented 2 months ago

@msmeissn Preliminary testing looks good on x86_64. The first two logs are with 0697bb0 (not working) and the last two are with the line you mentioned commented out.

1-capture-image.log 2-capture-image.log 3-commented-out-capture-image.log 4-commented-out-capture-image.log

coldfire22x commented 2 months ago

Flipped the camera to RAW and plugged into an Orange Pi 5B. Looks like commenting out that line also works on aarch64:

arm64-commented-out-capture-image-raw1.log arm64-commented-out-capture-image-raw2.log arm64-commented-out-capture-image-raw3.log