falk0069 / sony-pm-alt

Transfer pictures wirelessly for a Sony camera without using Playmemories (Sony PM Alternative)
268 stars 43 forks source link

gphoto2 error: PTP Sequence number mismatch #10

Open emanjavacas opened 6 years ago

emanjavacas commented 6 years ago

Hi, I am trying to connect my A6000 with a raspberry pi (I tried before on my ubuntu 16.04 machine, and it worked fine), but I am stuck with an error that seems to come from gphoto2. Camera seems to connect properly but there seems to be an error in the transmission:

2017-12-24 10:36:13,118 [INFO ] Server starting
2017-12-24 10:36:13,118 [INFO ] Setting download dir [PHOTO_DIR] to: /media/MEDIA/Sony/
2017-12-24 10:36:13,118 [INFO ] Setting LD_LIBRARY_PATH to: /usr/local/lib
2017-12-24 10:36:13,119 [DEBUG] BCAST_IP set to: 239.255.255.250
2017-12-24 10:36:13,119 [DEBUG] UPNP_PORT set to: 1900
2017-12-24 10:36:13,119 [DEBUG] GPHOTO_SETTINGS set to: /home/volumio/.gphoto/settings
2017-12-24 10:36:13,119 [DEBUG] PTP_GUID set to: ff:ff:52:54:00:b6:fd:a9:ff:ff:52:3c:28:07:a9:3a
2017-12-24 10:36:13,119 [DEBUG] GPHOTO_CMD_ARGS set to: ['/usr/bin/gphoto2', '-P', '--skip-existing']

2017-12-24 10:36:16,677 [INFO ] received MtpNullService from ('192.168.178.71', 1900)
2017-12-24 10:36:16,677 [DEBUG]  data:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
NT: urn:microsoft-com:service:MtpNullService:1
NTS: ssdp:byebye
USN: uuid:00000000-0001-0010-8000-d8c46ad71d7d::urn:microsoft-com:service:MtpNullService:1
2017-12-24 10:36:16,678 [DEBUG] ----------------------
2017-12-24 10:36:16,678 [DEBUG]   
2017-12-24 10:36:16,895 [INFO ] received MtpNullService from ('192.168.178.71', 1900)
2017-12-24 10:36:16,895 [DEBUG]  data:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
NT: urn:microsoft-com:service:MtpNullService:1
NTS: ssdp:byebye
USN: uuid:00000000-0001-0010-8000-d8c46ad71d7d::urn:microsoft-com:service:MtpNullService:1
2017-12-24 10:36:16,895 [DEBUG] ----------------------
2017-12-24 10:36:16,896 [DEBUG]   
2017-12-24 10:36:16,967 [INFO ] received MtpNullService from ('192.168.178.71', 1900)
2017-12-24 10:36:16,968 [DEBUG]  data:
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.178.71:1900/DeviceDescription.xml
NT: urn:microsoft-com:service:MtpNullService:1
NTS: ssdp:alive
SERVER: FedoraCore/2 UPnP/1.0 MINT-X/1.8.1
USN: uuid:00000000-0001-0010-8000-d8c46ad71d7d::urn:microsoft-com:service:MtpNullService:1
2017-12-24 10:36:16,976 [DEBUG] Starting new HTTP connection (1): 192.168.178.71
2017-12-24 10:36:17,057 [DEBUG] http://192.168.178.71:1900 "GET /DeviceDescription.xml HTTP/1.1" 200 1367
2017-12-24 10:36:17,059 [DEBUG] Got XML - verify if our camera
2017-12-24 10:36:17,060 [DEBUG] Camera Found...starting gphoto
2017-12-24 10:36:17,060 [DEBUG] Current settings in /home/volumio/.gphoto/settings
----------
gphoto2=port=ptpip:192.168.178.71
gphoto2=model=PTP/IP Camera
ptp2_ip=guid=ff:ff:52:54:00:b6:fd:a9:ff:ff:52:3c:28:07:a9:3a
----------
2017-12-24 10:36:17,061 [DEBUG] Updating command to include: --port ptpip:192.168.178.71
2017-12-24 10:36:17,061 [DEBUG] Executing: ['/usr/bin/gphoto2', '--port', 'ptpip:192.168.178.71', '-P', '--skip-existing']
2017-12-24 10:36:17,066 [DEBUG] ----------------------
2017-12-24 10:36:17,067 [DEBUG]   

*** Error ***              
PTP: Sequence number mismatch 1502609408 vs expected 1.

*** Error ***              
PTP Error: bad parameter

*** Error ***              
An error occurred in the io-library ('Bad parameters'): No error description available
*** Error (-2: 'Bad parameters') ***       

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port ptpip:192.168.178.71 -P --skip-existing

Please make sure there is sufficient quoting around the arguments.

I followed the instructions except for when running the sony-guid-setter that I had to run with sudo rights because I was getting a Permission Denied error on the /dev/bus/usb otherwise.

Do you have any ideas? thanks in advance!

falk0069 commented 6 years ago

Sorry, I missed the notification for this. Did you figure anything out? I recall seeing that same error when using an older version of ghoto2 with my A5000. What version are you running? You can check by running gphoto2 -v. The version I'm using right now is gphoto2 2.5.9.1.

emanjavacas commented 6 years ago

I was using 2.5.4 which is the one in debian jessie. I am gonna try to build a newer one from source and see what happens. Will keep posted, thanks!

emanjavacas commented 6 years ago

Hi, I can confirm that it was an issue with 2.5.4,

I compiled both gphoto2 and libgphoto2 from the current source and now everything works fine.

Here is the versions being used for the record:

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.15.1       gcc, popt(m), exif, no cdk, no aa, jpeg, no readline
libgphoto2      2.5.16.1       all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking