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

Marcus Meissner <[email protected]> Sat, 26 Dec 2020 13:57:06 +0100
Newsgroups gmane.comp.multimedia.gphoto.user
Message-ID <[email protected]>
Hi,

On Sat, Dec 26, 2020 at 11:27:03AM +0100, Matthias Apitz wrote:
> 
> Hello,
> 
> Me and my sons own a brand new Canon EOS77D and of course it works from an
> Android phone to connect and control the shutter, for example. 
> 
> I want to do it with gphoto2 from our FreeBSD laptops too and figured
> out how to connect to the cam via Wifi. I followed this (German, but with
> pictures) document: 
> https://www.multimedia4linux.de/index.php/canon-dslr-wiki/wlan-wi-fi-mit-gphoto2-nutzen
> 
> The Wifi works pretty much straight forward and the cam acts as an AP
> with IP addr 192.168.1.2 and gives my laptop and IP addr to as 192.168.1.10
> Also routing is fine and I can PING the cam fine.
> 
> But when I connect with gphoto2 to the cam with this command:
> 
> $ env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port ptpip:192.168.1.2 --storage-info
> 
> the cam closes the connection with some message in its LCD about "device
> not found". I'm attaching the log file my-logfile.txt.
> 
> What do I wrong?

> 0.118121 ptp_ptpip_connect           (2): connecting to ptpip:192.168.1.2.
> 0.119975 ptp_ptpip_init_command_request(3): ptpip/init_cmd data: (hexdump of 54 bytes)
> 0000  36 00 00 00 01 00 00 00-7f 4a 6d d9 e6 ca bb b4  6........Jm.....
> 0010  33 19 23 b6 54 26 bb 67-63 00 37 00 32 00 30 00  3.#.T&.gc.7.2.0.

camera guid 7f 4a 6d d9 e6 ca bb b4 33 19 23 b6 54 26 bb 67

your machine name 63 00 37 00 32 00 30 00 2d 00 72 00 33 00 36 00-38 00 31 00 36 00 36 00 (gc720-r368166)

> 0020  2d 00 72 00 33 00 36 00-38 00 31 00 36 00 36 00  -.r.3.6.8.1.6.6.
> 0030  00 00 00 00 01 00      -                         ......          
> 
> 0.120208 ptp_ptpip_init_command_request [ptpip.c:472](0): return 54 / len 54
> 0.122156 ptp_ptpip_generic_read      (3): ptpip/generic_read header: (hexdump of 8 bytes)
> 0000  0c 00 00 00 05 00 00 00-                         ........        
> 
> 0.122193 ptp_ptpip_generic_read      (3): ptpip/generic_read data: (hexdump of 4 bytes)
> 0000  01 00 00 00            -                         ....            

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.

Ciao, Marcus