Re: Connecting via Wifi to a Canon EOS77D works, but gphoto2 fails

Marcus Meissner <[email protected]> Sat, 26 Dec 2020 14:46:14 +0100
Newsgroups gmane.comp.multimedia.gphoto.user
Message-ID <X+c+pqnBugOBw/[email protected]>
On Sat, Dec 26, 2020 at 02:29:51PM +0100, Matthias Apitz wrote:
> El día Saturday, December 26, 2020 a las 01:57:06PM +0100, Marcus Meissner escribió:
> 
> > libgphoto2 as client needs to authenticate to the camera, via a 16 byte GUID we need to send.
> > 
> > Reply type 5 usually means what we sent does not match with what the camera expects.
> > 
> > If it was paired with another device before, you might have chance of just resetting the
> > camera connection settings.
> 
> Thanks! This worked and I could sent the following two commands:
> 
> $ gphoto2 --debug --debug-logfile=/tmp/l1 --port ptpip:192.168.1.2 --storage-info > o1
> $ cat o1
> [Storage 0]
> description=SD
> basedir=/store_00020001
> access=0 Read-Write
> type=4 Removable RAM
> fstype=4 Camera layout (DCIM)
> totalcapacity=15549952 KB
> free=15489824 KB
> 
> $ gphoto2 --debug --debug-logfile=/tmp/l2 --port ptpip:192.168.1.2 -L > o2
> $ cat o2
> There is no file in folder '/'.
> There is no file in folder '/store_00020001'.
> There is no file in folder '/store_00020001/DCIM'.
> There are 6 files in folder '/store_00020001/DCIM/100JLCAM'.
> #1     IMG_0328.CR2               rd 24850 KB image/x-canon-cr2
> #2     IMG_0532.JPG               rd  8287 KB image/jpeg
> #3     IMG_0533.JPG               rd  7900 KB image/jpeg
> #4     IMG_0534.JPG               rd  8179 KB image/jpeg
> #5     IMG_0535.JPG               rd  5016 KB image/jpeg
> #6     IMG_0536.JPG               rd  5547 KB image/jpeg
> There is no file in folder '/store_00020001/MISC'.
> 
> The problem is, that after each command the cam disconnects from the
> Wifi and the laptop must search again for the interface.
> 
> I'm attaching also the debug output files /tmp/l1 and /tmp/l2 from the above tests.

The instant disconnect is sadly something I also observe and currently
have no good workaround.

As one workaround you can run a single gphoto2 session using:

	gphoto2 --port ptpip:192.168.1.2 --shell

and run your commands in there until you are finished and exit the shell, but it might not be that useful. :/

Ciao, amrcus