M5 + Linux

Started Feb 23, 2017 | Discussions
xsnrg
xsnrg Forum Member • Posts: 67
M5 + Linux
2

Hi friends, if you run Linux instead of MacOS or Windows, keep reading.

Historically, I have had a conundrum to deal with. I am a Linux user, and have been for 20+ years. I am also very fond of Canon equipment. This has been a good bit painful, as you could imagine. Canon really has no direct support for anything Linux.

Tonight I set out to connect to my M5 with my Fedora laptop. My goal, to use wifi to download all pictures to the laptop. I am here to report success.

There is an application that was written to work with DSLRs from Canon, Nikon, and Sony, and it can be found here: airnef . Yes, it also works with Mac and Windows. It does not work out of the box, or at least I was not able to get it to work. I did a bit more digging and found a change that was needed to remove a probe command. The change is to v1.1 of airnefcmd.py. Comment out the line so that it looks like this:

# mtpwifi.sendProbeRequest(g.socketEvents)

Proper credit found in this thread: http://testcams.com/blog/forums/topic/canon-eos-m5-connection-refused/

Once that is changed, here is the commandline I use:

./airnefcmd.py --ipaddress <M5 IP> --outputdir ~/Pictures/

It downloads full size images on my wifi at about 4M/sec.  There are many options to download different sizes, just certain types, certain date ranges, etc.

No more removing from scope, tripod, SDcard wear, etc.  Enjoy!

 xsnrg's gear list:xsnrg's gear list
Canon EOS M5 Canon EF-M 22mm f/2 STM Canon EF-M 28mm F3.5 Macro IS STM Canon 70-300 F4-5.6 IS II Canon EF-M 18-150mm F3.5-6.3 IS STM +1 more
Nikon 1 V1
If you believe there are incorrect tags, please send us this post using our feedback form.
Alan Sh Senior Member • Posts: 2,374
Re: M5 + Linux

Thanks - very useful. Now, I just need it to work with the Windows image. I dnon't suupose you have the tools to fix that, do you?

Alan

 Alan Sh's gear list:Alan Sh's gear list
Canon EOS 6D Canon EOS M5 Canon EF-M 55-200mm f/4.5-6.3 IS STM Panasonic Lumix DMC-ZS40 (TZ60) Canon EOS M100 +14 more
xsnrg
OP xsnrg Forum Member • Posts: 67
Re: M5 + Linux

The same should apply.  Download the source, edit the line, and install python 2.7 for windows to run it

 xsnrg's gear list:xsnrg's gear list
Canon EOS M5 Canon EF-M 22mm f/2 STM Canon EF-M 28mm F3.5 Macro IS STM Canon 70-300 F4-5.6 IS II Canon EF-M 18-150mm F3.5-6.3 IS STM +1 more
Alan Sh Senior Member • Posts: 2,374
Re: M5 + Linux

I've edited the line, installed Python 2.7 and tried to install Py2exe - which fails because it is asking for Python 2.5.

I am grappling in the dark here.

Alan

 Alan Sh's gear list:Alan Sh's gear list
Canon EOS 6D Canon EOS M5 Canon EF-M 55-200mm f/4.5-6.3 IS STM Panasonic Lumix DMC-ZS40 (TZ60) Canon EOS M100 +14 more
xsnrg
OP xsnrg Forum Member • Posts: 67
Re: M5 + Linux

you could try python 2.5 then, but if you downloaded the source, there won't be an exe.  You would run python.exe with the airnefcmd.py at a command prompt.  I dont have a windows box here, but imagine it would look something like:

c:> python airnefcmd.py --ipaddress <ip>

On the camera, you need to start the connection with the connect to mobile device option

 xsnrg's gear list:xsnrg's gear list
Canon EOS M5 Canon EF-M 22mm f/2 STM Canon EF-M 28mm F3.5 Macro IS STM Canon 70-300 F4-5.6 IS II Canon EF-M 18-150mm F3.5-6.3 IS STM +1 more
Alan Sh Senior Member • Posts: 2,374
Re: M5 + Linux

I finally got python installed. V2.5 wouldn't run the app (got syntax errors). 2.7 runs it but I get

Camera's date/time set to 02/23/17 01:17:24 PM
Camera reports no user-selected images/movies to transfer or not-supported

There are images to transfer - I selected "All images" when asked.

So, maybe this isn't for me.

Alan

 Alan Sh's gear list:Alan Sh's gear list
Canon EOS 6D Canon EOS M5 Canon EF-M 55-200mm f/4.5-6.3 IS STM Panasonic Lumix DMC-ZS40 (TZ60) Canon EOS M100 +14 more
xsnrg
OP xsnrg Forum Member • Posts: 67
Re: M5 + Linux

You are actually really close then.  When I got to that part, I had to add a flag for it to ignore the dates on the files.  Maybe it has to do that the first time.  If you run it with just -h you can see all the options.  One of them is for it to ignore the dates.  Give that a go.

 xsnrg's gear list:xsnrg's gear list
Canon EOS M5 Canon EF-M 22mm f/2 STM Canon EF-M 28mm F3.5 Macro IS STM Canon 70-300 F4-5.6 IS II Canon EF-M 18-150mm F3.5-6.3 IS STM +1 more
Alan Sh Senior Member • Posts: 2,374
Re: M5 + Linux

Wow - got it. I used "Select on Computer" rather than "Select in Camera" and it started downloading (1595 files - so I did abort it).

Thanks for your help on this

Alan

 Alan Sh's gear list:Alan Sh's gear list
Canon EOS 6D Canon EOS M5 Canon EF-M 55-200mm f/4.5-6.3 IS STM Panasonic Lumix DMC-ZS40 (TZ60) Canon EOS M100 +14 more
xsnrg
OP xsnrg Forum Member • Posts: 67
Re: M5 + Linux

Good work, so now we have a way to download from Linux and Windows directly.  Not sure why Canon didn't give us software for that in the first place.

 xsnrg's gear list:xsnrg's gear list
Canon EOS M5 Canon EF-M 22mm f/2 STM Canon EF-M 28mm F3.5 Macro IS STM Canon 70-300 F4-5.6 IS II Canon EF-M 18-150mm F3.5-6.3 IS STM +1 more
EmBeeWee New Member • Posts: 3
Re: M5 + Linux

I can't get it connected to my M6, I'm on windows 10 with latest python (3.7.4) and I put the camera in 'connect to smartphone' mode. I can ping the camera at 192.168.0.1. Any ideas?

73Instamatic
73Instamatic Regular Member • Posts: 408
Re: M5 + Linux

xsnrg wrote:

Good work, so now we have a way to download from Linux and Windows directly. Not sure why Canon didn't give us software for that in the first place.

It should get easier in the future. Canon is switching over to a different API (CCAPI) over WiFi. The RP is one of the first to support it. The just announced M6 II should as well.

The protocol is a REST-ful API run over HTTP, which is 100% OS agnostic.

Tutorial Introduction to Canon’s Camera Control API

You could even take some of the samples written in C# and run them using Mono on Linux.

Keyboard shortcuts:
FForum MMy threads