Canon EOS M5: connection refused

Home Forums Canon EOS M5: connection refused

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #680
    Kai
    Participant

    Hello,

    I would love to be able to download images from my Canon EOS M5. My setup is as follows:

    • WiFi router
    • Desktop PC (Linux) – connected to router via Ethernet cable
    • EOS M5 – connected to router via WiFi

    The M5 gets an IP address (192.168.1.4) assigned via DHCP. The program output is as follows:

    kai@blackbox:~/apps/airnef$ ./airnefcmd --ipaddress 192.168.1.4 --action getfiles --logginglevel debug
    
    airnef v1.1 - Wireless transfer of images/movies for Nikon cameras [GPL v3]
    Copyright (c) TestCams.com, Time: 12/19/16 19:42:02, Py: 2.7.9, OS: Linux
    
    [...]
    
    A device at 192.168.1.4 responded but the connection was refused.
    This is likely because you are connected to a normal Wifi network instead
    of your camera's network. Please confirm that your camera's Wifi is enabled
    and that your computer is connected to its network.

    Any thoughts about that?

    Regards
    Kai

    #681
    Adam
    Participant

    Hi Kai,

    It sounds like the camera is in one of the image transfer modes that isn’t specific to sending images to the computer, which means it’ll refuse the PTP-IP connection that Airnef is attempting to establish. I looked through the M5 manual and it has a ton of connection options and it’s not clear exactly which you need to use – I don’t have my 6D anymore so I don’t recall which I used on that body with Airnef. Can you try the various methods and see if any work and report back? Thanks!

    #682
    Kai
    Participant

    Hi Adam,

    thanks for your reply. I re-read the manual and I think that the only valid mode to connect to airnef is the strangely labeled mode “Smartphone”. The other modes are “Web service” (i.e. Canon Image Gateway), “Media player” (i.e. DLNA), “Printer”, and “Another camera”.

    Ok, so I tried to create a new “Smartphone” connection using the previously configured WiFi-router as access point. What happens is this:

    – Camera successfully connects to airnef and shows “airnef” on the display
    – Camera asks for permission to serve images (all images, today’s images, …). I select all images.
    – Camera shows “Connection failed” and airnef shows the debug oputput below.

    
    Connection established to 192.168.1.4:15740                                   
    sendInitCmdReq(): Sending MTP_TCPIP_REQ_INIT_CMD_REQ
    0000: 01 00 00 00 00 11 22 33 - 44 55 66 77 88 99 00 00 ......"3 - DUfw....
    0010: 00 00 00 00 61 00 69 00 - 72 00 6e 00 65 00 66 00 ....a.i. - r.n.e.f.
    0020: 00 00 00 00 01 00                                 ......
    sendInitCmdReq() response:
    0000: 02 00 00 00 6a 5a 00 00 - 5c d6 d3 0a 46 e4 56 7a ....jZ.. - \...F.Vz
    0010: 15 43 3b a5 ad c8 46 25 - 43 00 61 00 6e 00 6f 00 .C;...F% - C.a.n.o.
    0020: 6e 00 20 00 45 00 4f 00 - 53 00 20 00 4d 00 35 00 n. .E.O. - S. .M.5.
    0030: 00 00 00 00 01 00                                 ......
    Session ID = 0x00005a6a
    openConnection(): Attempting connection to 192.168.1.4:15740
    sendInitEvents(): Sending MTP_TCPIP_REQ_INIT_EVENTS                           
    0000: 03 00 00 00 6a 5a 00 00 -                         ....jZ.. - 
    sendInitEvents() response:
    0000: 04 00 00 00                                       ....
    sendProbeRequest(): Sending probe request
    0000: 0d 00 00 00                                       ....
    Socket Error: timed out
    
    openConnection(): Attempting connection to 192.168.1.4:15740                  
    >> Connection Failed <<                                                       
    
    There was no response at 192.168.1.4. Please confirm that your camera's
    Wifi is enabled and that you have specified the correct IP address.
    

    Regards
    Kai

    #683
    Adam
    Participant

    Thanks Kai. Based on the log the camera is either rejecting/not-supporting the ‘Send probe request’ or is the point at which further PTP-IP communication fails, with that being the first command. One thing we can try is to disable that specific command and see if Airnef gets further. If your comfortable with a bit of tech the easiest way to do this would be to download the source and modify it, then run it under the Python runtime which is also available online for free.

    Here’s the link to the Airnef 1.1 source and the Python runtime (I would use the latest 2.7.x release):
    Airnef v1.1 source
    Python download

    To disable the ‘Send Probe’ command, just insert a # in column 1 of line 1137 of the source you downloaded, so that it looks like this:

    # mtpwifi.sendProbeRequest(g.socketEvents)

    You can then run Airnef from your downloaded+modified source copy by either double clicking on the airnef.pyw file or by entering a command window and typing ‘python airnef.pyw’

    • This reply was modified 6 years, 3 months ago by Adam.
    #685
    Kai
    Participant

    Hello Adam,

    commenting out the probe request did the trick! The process went on and the images were downloaded successfully.

    Here is the log of the successful process.

    Regards
    Kai

    
    openConnection(): Attempting connection to 192.168.1.4:15740                  
    Connection established to 192.168.1.4:15740                                   
    sendInitCmdReq(): Sending MTP_TCPIP_REQ_INIT_CMD_REQ
    0000: 01 00 00 00 00 11 22 33 - 44 55 66 77 88 99 00 00 ......"3 - DUfw....
    0010: 00 00 00 00 61 00 69 00 - 72 00 6e 00 65 00 66 00 ....a.i. - r.n.e.f.
    0020: 00 00 00 00 01 00                                 ......
    sendInitCmdReq() response:
    0000: 02 00 00 00 bb 62 00 00 - 5c d6 d3 0a 46 e4 56 7a .....b.. - \...F.Vz
    0010: 15 43 3b a5 ad c8 46 25 - 43 00 61 00 6e 00 6f 00 .C;...F% - C.a.n.o.
    0020: 6e 00 20 00 45 00 4f 00 - 53 00 20 00 4d 00 35 00 n. .E.O. - S. .M.5.
    0030: 00 00 00 00 01 00                                 ......
    Session ID = 0x000062bb
    openConnection(): Attempting connection to 192.168.1.4:15740
    sendInitEvents(): Sending MTP_TCPIP_REQ_INIT_EVENTS                           
    0000: 03 00 00 00 bb 62 00 00 -                         .....b.. - 
    sendInitEvents() response:
    0000: 04 00 00 00                                       ....
    execMtpOp: MTP_OP_GetDeviceInfo - CmdReq payload:
    0000: 06 00 00 00 01 00 00 00 - 01 10 01 00 00 00       ........ - ......
    execMtpOp: MTP_OP_GetDeviceInfo - DataStart payload [expected data bytes is 0x1dd]
    0000: 09 00 00 00 01 00 00 00 - dd 01 00 00 00 00 00 00 ........ - ........
    execMtpOp: MTP_OP_GetDeviceInfo - Data payload [ID c] (0x000001e5 bytes):
    0000: 0c 00 00 00 01 00 00 00 - 64 00 06 00 00 00 64 00 ........ - d.....d.
    0010: 00 00 00 64 00 00 00 14 - 10 15 10 16 10 17 10 01 ...d.... - ........
    0020: 10 02 10 03 10 13 90 5c - 90 5d 90 1f 90 04 10 05 .......\ - .]......
    0030: 10 06 10 07 10 08 10 09 - 10 0a 10 1b 10 0c 10 0d ........ - ........
    0040: 10 0b 10 0f 10 12 10 01 - 90 21 90 1b 90 1e 90 19 ........ - .!......
    0050: 90 06 90 1c 90 02 90 4c - 90 24 90 25 90 38 90 39 .......L - .$.%.8.9
    0060: 90 3a 90 3b 90 4b 90 60 - 90 62 90 01 98 02 98 03 .:.;.K.

    – .b……
    0070: 98 04 98 05 98 16 91 01 – 91 02 91 03 91 05 91 06 …….. – ……..
    0080: 91 07 91 09 91 0a 91 0c – 91 17 91 18 91 2c 91 32 …….. – …..,.2
    0090: 91 35 91 40 91 82 91 83 – 91 84 91 85 91 41 91 43 .5.@…. – …..A.C
    00a0: 91 75 90 76 90 1a 91 3f – 91 15 91 1b 91 1c 91 1d .u.v…? – ……..
    00b0: 91 3d 91 33 90 36 91 37 – 91 14 91 53 91 28 91 29 .=.3.6.7 – …S.(.)
    00c0: 91 58 91 59 91 54 91 60 – 91 55 91 5b 91 2f 90 10 .X.Y.T.` – .U.[./..
    00d0: 91 27 91 6c 90 6d 90 6e – 90 6f 90 50 90 51 90 11 .’.l.m.n – .o.P.Q..
    00e0: 00 00 00 01 40 02 40 03 – 40 04 40 05 40 06 40 07 ….@.@. – @.@.@.@.
    00f0: 40 08 40 09 40 0a 40 0b – 40 0c 40 0e 40 01 c0 05 @.@.@.@. – @.@.@…
    0100: c0 0a c0 01 c1 19 00 00 – 00 45 d0 4a d0 2e d0 2f …….. – .E.J…/
    0110: d0 01 50 02 d0 03 d0 34 – d0 47 d0 46 d0 30 d0 49 ..P….4 – .G.F.0.I
    0120: d0 32 d0 33 d0 31 d0 50 – d0 51 d0 52 d0 53 d0 54 .2.3.1.P – .Q.R.S.T
    0130: d0 57 d0 02 d4 06 d4 07 – d4 03 d3 01 00 00 00 01 .W…… – ……..
    0140: 38 0a 00 00 00 01 30 02 – 30 06 30 08 30 01 38 00 8…..0. – 0.0.0.8.
    0150: 38 03 b1 82 b9 05 b1 01 – bf 0b 43 00 61 00 6e 00 8……. – ..C.a.n.
    0160: 6f 00 6e 00 20 00 49 00 – 6e 00 63 00 2e 00 00 00 o.n. .I. – n.c…..
    0170: 0d 43 00 61 00 6e 00 6f – 00 6e 00 20 00 45 00 4f .C.a.n.o – .n. .E.O
    0180: 00 53 00 20 00 4d 00 35 – 00 00 00 0b 33 00 2d 00 .S. .M.5 – ….3.-.
    0190: 31 00 35 00 2e 00 30 00 – 2e 00 31 00 2e 00 30 00 1.5…0. – ..1…0.
    01a0: 00 00 21 35 00 43 00 44 – 00 36 00 44 00 33 00 30 ..!5.C.D – .6.D.3.0
    01b0: 00 41 00 35 00 36 00 37 – 00 41 00 34 00 36 00 45 .A.5.6.7 – .A.4.6.E
    01c0: 00 34 00 41 00 35 00 33 – 00 42 00 34 00 33 00 31 .4.A.5.3 – .B.4.3.1
    01d0: 00 35 00 32 00 35 00 34 – 00 36 00 43 00 38 00 41 .5.2.5.4 – .6.C.8.A
    01e0: 00 44 00 00 00 .D…
    execMtpOp: MTP_OP_GetDeviceInfo – CmdResponse payload (resp=”MTP_RESP_Ok”):
    0000: 07 00 00 00 01 20 01 00 – 00 00 ….. .. – ..
    MtpDeviceInfoTuple(standardVersion=100, vendorExtensionID=6, vendorExtensionVersion=100, vendorExtensionDescStr=”, operationsSupportedSet=set([4097, 4098, 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4111, 4114, 36883, 4116, 4117, 4118, 4119, 36889, 4123, 36892, 36894, 36895, 36897, 36900, 36870, 36911, 36915, 36920, 36921, 36922, 36923, 36939, 36940, 36944, 36945, 36956, 36957, 36960, 36962, 36972, 36973, 36974, 36975, 36981, 36982, 36891, 36865, 36866, 37122, 36901, 38913, 37121, 38914, 37123, 37125, 37126, 37127, 37129, 37130, 37132, 37136, 37140, 37141, 37142, 37143, 37144, 37146, 37147, 37148, 37149, 38915, 37159, 37160, 37161, 37164, 37170, 37173, 37174, 37175, 37181, 38916, 37183, 37184, 37185, 37187, 37203, 37204, 37205, 37208, 37209, 37211, 38917, 37216, 37250, 37251, 37252, 37253]), eventsSupportedSet=set([16385, 16386, 16387, 16388, 16389, 16390, 16391, 16392, 16393, 16394, 16395, 16396, 49409, 16398, 49153, 49162, 49157]), devicePropertiesSupportedSet=set([20481, 54274, 53251, 54278, 54279, 53250, 54019, 53294, 53295, 53296, 53297, 53298, 53299, 53300, 53317, 53318, 53319, 53321, 53322, 53328, 53329, 53330, 53331, 53332, 53335]), captureFormatsSupportedSet=set([14337]), imageFormatsSupportedSet=set([14336, 12289, 12290, 45315, 45317, 12294, 14337, 12296, 47490, 48897]), manufacturerStr=u’Canon Inc.’, modelStr=u’Canon EOS M5′, deviceVersionStr=u’3-15.0.1.0′, serialNumberStr=u’5CD6D30A567A46E4A53B43152546C8AD’)
    Camera Model “Canon EOS M5”, S/N “5CD6D30A567A46E4A53B43152546C8AD”

    [… skipping lines …]

    6 files downloaded in 14.74 seconds (Average Rate = 2.99 MB/s)
    execMtpOp: MTP_OP_CloseSession – CmdReq payload:
    0000: 06 00 00 00 01 00 00 00 – 03 10 3e 00 00 00 …….. – ..>…
    execMtpOp: MTP_OP_CloseSession – CmdResponse payload (resp=”MTP_RESP_Ok”):
    0000: 07 00 00 00 01 20 3e 00 – 00 00 ….. >. – ..
    `

    #686
    Adam
    Participant

    Hi Kai,

    Thanks for going through the effort to try it. Glad it worked!

    #700
    Alan Sharkey
    Participant

    I’ve got the same issue with the Windows image. Not having any sort of compiler, could someone do the same fix and post the Windows .EXE please?
    [Or tell me how I can do it?]
    Many thanks

    Alan

    #701
    Alan Sharkey
    Participant

    OK – Update. I managed to get it to work with Python – but I still can’t get a compiled version – py2exe won’t run on my system.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.