Open wvh opened 5 years ago
Following the flow in camlibs/ptp2/library.c
, function get_file_func()
gets the image size from the PTPObject
:
size=ob->oi.ObjectCompressedSize;
The reported size in the debugging output for that file name matches the actual size of the JPG picture, so I'm not sure why the reading loop would hang expecting more output. It would probably help to log how much data was read or was remaining if the transaction times out, to see if there's a discrepancy between what gphoto is expecting and what the device actual sends.
Hello,
I've been using Digikam/libgphoto2 to import the pictures on my Sony Xperia X phone running Sailfish OS (Jolla) on to an up-to-date Arch Linux system running KDE and gphoto version 2.5.23.
The last month or so I've been getting IO errors. I checked the debugging output, and it seems the individual pictures are transferred completely, but gphoto2 keeps waiting in the read loop and then times out after 20 seconds. I've compared the debugging hex output with some of the pictures I've transferred before and it seems the full picture has been transferred, but for some reason gphoto2 hangs waiting for more data. I don't know if the miscommunication is on Sailfish's or gphoto2's side.
This is how it looks when I get one picture file from the device with debugging output enabled:
I don't seem to have a problem transferring music files in KDE (MTP via kio?) and I've tried different USB cables and ports so I don't think this is a hardware problem.