It's strange that on your G7X at least the port isn't open. Maybe run a portscan on the camera's IP and see if the port is open or not (or if there are other opened ports). I mean, the mobile app must connect somehow to it.
I didn't port scan yet, but packet capture shows the camera sends a bunch of mDNS and SSDP chatter. The normal "computer" connection flow also does this. My impression is the mDNS stuff was used in the computer option to support Mac, but the Mac side support was dropped many MacOS versions ago.
I haven't compared the traffic in detail, but one obvious difference is the SSDP MSEARCH is for "ST: urn:schemas-canon-com:service:MobileConnectedCameraService:1" rather than "upnp:rootdevice" as in the computer case. So I strongly suspect Canon's app previously sent a response for one of those like the "computer" flow does, and at some point they decided the firmware code didn't need to care about it.
1. Can you check to make really sure you got the IP right for the cameras that won't accept connections?
Yes, I'm very sure:
___> c -h=x.x.x.103
initializing command channel
initializing event channel
opening session
connected: Canon PowerShot G7 X, max packet size 0
con 1> dis
___> c -h=x.x.x.103
connect failed: 111 Connection refused
ERROR: connection failed
The first is going through the PC connect flow with my UPnP helper running.
The second is going through the mobile flow.
The "connection refused" is in response to an RST from the camera, as seen in tcpdump.
Additionally, SX710 exhibits the same behavior as G7 X and Elph 130.
As for the crashes while setting that prop, which PTP command did you use to set it? It must be set with #define PTP_OC_CANON_EOS_SetDevicePropValueEx 0x9110 using a special protocol, not #define PTP_OC_GetDevicePropValue 0x1015
Yes, I was trying to use regular SetDevicePropValue, and had some other bugs in my code

However, I'm not able to get CANON_EOS_SetDevicePropValueEx to do anything useful, so perhaps you can say more about the special protocol?
Looking at
https://julianschroden.com/post/2023-05-28-controlling-properties-using-ptp-ip-on-canon-eos-cameras/ it appears it should be a simple send data transaction, with 8 bytes of data consisting of two 32 bit values PropertyID, value.
Attempting this results in a General Error (0x2002) response code for values in the range 0-8.
However, looking at the firmware code (sx730 100d around fc151162) it appears to actually expect the parameters in the reverse order (value, PropertyID). This "succeeds" (returning 0x2001) for values I tried in the range 0-8 but has no visible effect on the camera and does not change the returned value of prop 0xd1b0. Edit: this was not entirely correct, it actually expected 3 words, see later post:
https://chdk.setepontos.com/index.php?topic=14822.msg150158#msg150158The fact that 0-8 wouldn't be valid property IDs gives me some confidence my understanding of the order is correct. (edit: Though
https://github.com/raduprv/esp32_macro_rail/blob/master/src/macro_slider.cpp#L360C1-L361C41 looks like PropertyID, Value)
con 1> !local val = lbuf.new(8) val:set_u32(0,8,ptp.CANON.DPC.EOS_EVFOutputDevice) con:ptp_txn(ptp.CANON.OC.EOS_SetDevicePropValueEx,{data=val})
con 1> dptpgetprop 0xd1b0
DPC: 0xd1b0 CANON.EOS_EVFOutputDevice
datatype: 0x0002 u8
RW: 1
factory: 0x0 0
current: 0x0 0
form: 0 simple
___> !printf('ptp.CANON.OC.EOS_SetDevicePropValueEx = 0x%x, ptp.CANON.DPC.EOS_EVFOutputDevice = 0x%x\n',ptp.CANON.OC.EOS_SetDevicePropValueEx, ptp.CANON.DPC.EOS_EVFOutputDevice)
ptp.CANON.OC.EOS_SetDevicePropValueEx = 0x9110, ptp.CANON.DPC.EOS_EVFOutputDevice = 0xd1b0
2. Are they running chdk when you do the tests? If so, can you try without chdk?
Previous tests were with CHDK, but as expected, behavior is the same without.
3. If all else fails, can you install and try the Canon Camera Connect app, and see if it works?
Well I've gotten this far without agreeing to any Canon EULAs…
