Tagged: GX7 linux
- This topic has 13 replies, 3 voices, and was last updated 4 years, 12 months ago by
kjwiik.
-
AuthorPosts
-
June 14, 2017 at 11:01 am #738
skyking
ParticipantSince Adam doesn’t seem to check in here any more, I’m hoping someone in the community can assist. I have never been able to get my G7X to connect, always get the ‘rejecting GUID’ message.
openConnection(): Attempting connection to 192.168.1.14:15740
Connection established to 192.168.1.14:15740
sendInitCmdReq(): Sending MTP_TCPIP_REQ_INIT_CMD_REQ
0000: 01 00 00 00 00 00 00 00 – 00 00 00 00 ff ff 00 1a …….. – ……..
0010: 7d da 71 13 41 00 53 00 – 55 00 53 00 2d 00 47 00 }.q.A.S. – U.S.-.G.
0020: 37 00 35 00 00 00 00 00 – 01 00 7.5….. – ..
sendInitCmdReq() response:
0000: 05 00 00 00 01 00 00 00 – …….. –So, I booted up my Win7 partition, installed WireShark to capture packets between Camera and Desktop, and installed Canon’s CameraWindow app. Capturing revealed the GUID that CameraWindow was sending to the Camera as 0000000000000000-ffff001a7dda7113
I run the cmdline with:
–ipaddress 192.168.1.14 –action listfiles –initcmdreq_guid 0x0000000000000000-0x1371da7d1a00ffff –logginglevel debugand it still gets rejected. Tried Printer, SmartPhone, Computer all same result. Has anyone ever connected to a G7X? Sending a recognized GUID to camera should work but doesn’t.
I even downloaded the source code and hard coded in the GUID and hostname.
I’ve wasted hours on this but am determined to get it working (if possible).
Thanks all
June 15, 2017 at 1:55 pm #739Adam
ParticipantI’m still around, just been busy with some other projects 🙂
Can you post your wireshark captures of both Canon App -> Camera and Airnef -> Camera sessions (Airnef using your patched GUI).
-
This reply was modified 5 years, 9 months ago by
Adam.
June 15, 2017 at 3:05 pm #741skyking
ParticipantHi Adam, thanks for responding.
First, I looked at the WireShark capature running Canon CameraWindow on Win7. There’s a lot going on before the Init Command Request.
No upnp broadcast from camera that I thought would be there with camera in Connect to Computer mode
PC sends SSDP
Camera does HTTP GET /upnphost/udhisapi.dll?content-uuid:xxxxx-xxxx-xxx-xx
PC Sends HTTP XML
PC sends SSDP
PC does HTTP GET /upnp/CameraDevDesc.xml
Camera Sends HTTP XML
Now finally PC sends Init Command Req and Camera replies with ConnectionHere is the capture running linux and airnef using the GUID that the PC sent the camera in Win7 CameraWindow: (camera is in ‘Searching for Computer’ mode)
6 0.005998507 192.168.1.12 192.168.1.14 PTP/IP 96 Init Command Request GUID: 0000000000000000ffff50465dde4363 Name: airnef
0000 d8 49 2f 56 a8 a3 50 46 5d de 43 63 08 00 45 00 .I/V..PF].Cc..E.
0010 00 52 62 a1 40 00 40 06 54 9a c0 a8 01 0c c0 a8 .Rb.@.@.T…….
0020 01 0e d0 1c 3d 7c 9e 18 b9 0a 00 01 5e 01 50 18 ….=|……^.P.
0030 72 10 83 af 00 00 2a 00 00 00 01 00 00 00 00 00 r…..*………
0040 00 00 00 00 00 00 ff ff 50 46 5d de 43 63 61 00 ……..PF].Cca.
0050 69 00 72 00 6e 00 65 00 66 00 00 00 00 00 01 00 i.r.n.e.f…….8 0.008276946 192.168.1.14 192.168.1.12 PTP/IP 66 Picture Transfer Protocol
0000 50 46 5d de 43 63 d8 49 2f 56 a8 a3 08 00 45 00 PF].Cc.I/V….E.
0010 00 34 77 d6 00 00 40 06 7f 83 c0 a8 01 0e c0 a8 .4w…@………
0020 01 0c 3d 7c d0 1c 00 01 5e 01 9e 18 b9 34 50 18 ..=|….^….4P.
0030 80 00 d7 6c 00 00 0c 00 00 00 05 00 00 00 01 00 …l…………
0040 00 00 ..Camera always returns 05 Init Failed
Not sure how much of the Win7 capture to send…
I did run across some gphoto2 stuff in searching for solutions. Here’s one:
https://github.com/falk0069/sony-pm-alt
and this:
https://www.circuitsathome.com/using-ptp-library-with-canon-powershot-cameras/
June 15, 2017 at 4:20 pm #742skyking
Participant…so from reading about the sony-pm-alt it looks like on a Sony you select ‘Send to PC’ which would make sense that it’s broadcasting SSDP/uPnP to a listener on the PC side.
The Canon is ‘Searching’ for something on the PC side, so makes sense it is not broadcasting SSDP/uPnP.
I also assume tha all of the HTTP GET from both Camera and PC are just pre-init setup stuff and not required for actual PTP/IP commands.?
June 15, 2017 at 4:20 pm #743skyking
ParticipantWin7 WireShark capture of just PTP/IP:
-
This reply was modified 5 years, 9 months ago by
skyking.
June 15, 2017 at 4:43 pm #745skyking
ParticipantCrappy WP – can’t edit my own posts…here’s a new one with capture:
33 97.155587 192.168.1.12 192.168.1.14 PTP/IP 100 Init Command Request GUID: 0000000000000000ffff001a7dda7113 Name: ASUS-G75
0000 d8 49 2f 56 a8 a3 50 46 5d de 43 63 08 00 45 00 .I/V..PF].Cc..E.
0010 00 56 0b 58 40 00 80 06 00 00 c0 a8 01 0c c0 a8 .V.X@………..
0020 01 0e c1 71 3d 7c a5 a2 47 47 00 3a 34 01 50 18 …q=|..GG.:4.P.
0030 fa f0 83 b3 00 00 2e 00 00 00 01 00 00 00 00 00 …………….
0040 00 00 00 00 00 00 ff ff 00 1a 7d da 71 13 41 00 ……….}.q.A.
0050 53 00 55 00 53 00 2d 00 47 00 37 00 35 00 00 00 S.U.S.-.G.7.5…
0060 00 00 01 00 ….35 97.158595 192.168.1.14 192.168.1.12 PTP/IP 128 Init Command Ack Connection #:11224 GUID: 7ac07bfaa194304a81cfba91303e6aaa Name: Canon PowerShot G7 X
0000 50 46 5d de 43 63 d8 49 2f 56 a8 a3 08 00 45 00 PF].Cc.I/V….E.
0010 00 72 7a 81 00 00 40 06 7c 9a c0 a8 01 0e c0 a8 .rz…@.|…….
0020 01 0c 3d 7c c1 71 00 3a 34 01 a5 a2 47 75 50 18 ..=|.q.:4…GuP.
0030 80 00 f6 bf 00 00 4a 00 00 00 02 00 00 00 d8 2b ……J……..+
0040 00 00 7a c0 7b fa a1 94 30 4a 81 cf ba 91 30 3e ..z.{…0J….0>
0050 6a aa 43 00 61 00 6e 00 6f 00 6e 00 20 00 50 00 j.C.a.n.o.n. .P.
0060 6f 00 77 00 65 00 72 00 53 00 68 00 6f 00 74 00 o.w.e.r.S.h.o.t.
0070 20 00 47 00 37 00 20 00 58 00 00 00 00 00 01 00 .G.7. .X….Â…June 15, 2017 at 4:45 pm #746skyking
ParticipantGUID 4 posts back from capture is wrong – I tried it with the correct one
0000000000000000ffff001a7dda7113
June 15, 2017 at 4:51 pm #747skyking
Participant6 0.008519062 192.168.1.12 192.168.1.14 PTP/IP 96 Init Command Request GUID: 0000000000000000ffff001a7dda7113 Name: airnef
0000 d8 49 2f 56 a8 a3 50 46 5d de 43 63 08 00 45 00 .I/V..PF].Cc..E.
0010 00 52 9c c7 40 00 40 06 1a 74 c0 a8 01 0c c0 a8 .R..@.@..t……
0020 01 0e 81 26 3d 7c be e9 b4 9f 00 02 26 01 50 18 …&=|……&.P.
0030 72 10 83 af 00 00 2a 00 00 00 01 00 00 00 00 00 r…..*………
0040 00 00 00 00 00 00 ff ff 00 1a 7d da 71 13 61 00 ……….}.q.a.
0050 69 00 72 00 6e 00 65 00 66 00 00 00 00 00 01 00 i.r.n.e.f…….June 15, 2017 at 4:56 pm #748skyking
ParticipantBytes in Win7 and airnef Init Cmd before GUID and hostname don’t match?
June 15, 2017 at 5:10 pm #749skyking
ParticipantI did notice that the Canon sets up a Device (as in ASUS-G75) using the SSDP and HTTP GET first, then you have to select the device for it to continue to ‘Searching’. No PTP/IP takes place until camera is Searching. You can also add a device and it will search for a new device but doesn’t use PTP/IP.
June 15, 2017 at 5:46 pm #750skyking
ParticipantIf you need to see the entire Win7/CameraWindow WS capture (with all initial SSDP and HTML), PM me and send me an address where I can email the entire capture file as an attachment.
June 15, 2017 at 6:14 pm #751Adam
ParticipantCan you upload both the Canon App and Airnef captures (using the correct GUID) and then email me the links? You can use airnef@hotmail.com. Thanks.
June 18, 2017 at 2:56 pm #752skyking
ParticipantAfter wasting over 4 days of my time, I have abandoned my efforts with this. The G7X seems to be customized to communicate only with Windows or OSX (sends mDNS requests after not getting SSDP response).
A Win7 capture shows at least three separate HTTP GETS using various .dll?content= <different values> with HTTP xml returns, all before the first PTP/IP Init.
I have tried using both linux ushare and ssdpd daemons that accept SSDP requests and return SSDP location for camera to do HTTP GET where location is IP/description.xml and the camera never seems to accept the HTTP response so never initiates an HTTP GET. I have the computer hostname as the <friendlyname> tag in xml and this is what shows up on the camera as a Device in the list to connect to.
If I want airnef to work I’ll have to trade the G7X for a Sony RX100M2.
March 24, 2018 at 12:42 pm #8024kjwiik
ParticipantFor the record, it seems that using ‘Connect to smartphone’ works with airnef if you comment out line 1137 of airnefcmd.py, see
I have Canon PowerShot SX620 HS & Ubuntu 16.04LTS (and GUID problem when using ‘Connect to computer’).
HTH, Kaj
-
This reply was modified 5 years, 9 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.