ML USB Controller

6,316 views
Skip to first unread message

"Sztupák Sz. Zsolt"

unread,
Mar 2, 2012, 9:44:35 PM3/2/12
to ml-d...@googlegroups.com
Hi!

There was a thread a long time ago where I mentioned to be working on a
way to control our Canons with an external Android device. Since then a
lot of time has passed, and someone else (Chainfire) has already made it
possible with his app: DSLR Controller.

This hasn't stopped me though :), so today I release a very initial
release of ML Controller (with version number 0.0), that is already able
to do a few things on it's own:

* Continuous LiveView, even while recording
* Controlling the menus of Magic Lantern.

This is not too much, so consider this application nothing much than an
very initial proof-of-concept release. I do plan on improving it of
course, and while doing that I also want your opinions on what features
you's like to have in it. While DSLR Controller is mainly aimed at
photographers, I mainly plan on supporting movie making functions, and
ML integration. I'm eager to hear what features you'd like to have
(ideas like: GPS geotagging, or wirelessly controlling multiple cameras
at once)

Currently you can use it as an "external monitor", if you don't mind the
low FPS count and the slight lag (my initial testing shows 5 FPS and a
lag of 1/5 seconds in the optimal case).

Here is a small video demonstrating it:
http://www.youtube.com/watch?v=7w9dFvIDOYw

The Tablet I use is a cheap 7' Android tablet from China. You can get
one of these from around 120$/90€ incl. shipping, exl. taxes, which is
cheaper than most (if not all) small HDMI monitors. Though you won't get
the same performance for sure. I did try to use both, and it's working,
so it's possible you both use a HDMI monitor and this application side
by side. The image you get from the USB is not really high resolution
(720x480), but it's uncompressed and not an overlay, which might come in
handy sometime.

If you don't have an Android device with USB host support I tested the
app with the latest Android-x86 build inside VMWare Player and it works,
so you might try that. And I also added a few simple ruby scripts to the
source you can use on both Windows and Linux (and probably OS X) with
libusb-0.1 to control ML. They don't have liveview support though. For
Windows folks I made a zip including everything needed (except
libusb-win32):
http://android.sztupy.hu/dl/mlcontroller/MLctrl_shoes_windows.zip

Downloads / links:
ML with USB-PTP additions
Source: http://bitbucket.org/sztupy/magic-lantern
Binary:
http://android.sztupy.hu/dl/mlcontroller/magiclantern-2012Mar3.usb.sztupy.zip
(You currently need to use this version of ML. It is based on the latest
code of alex)

MLController:
from Market:
https://market.android.com/details?id=hu.sztupy.android.mlcontroller
from the Web: http://android.sztupy.hu/dl/mlcontroller/MLController-0.0.apk

MLController forum at XDA:
http://forum.xda-developers.com/showthread.php?t=1527773

Feel free to ask me here and/or the XDA thread.

Development notices:

To add the ML features I made the following changes to the source code:
- Added a new field to the menu and menu_entry structs called .id. It is
filled in with auto-incremented values by default, but one can set them
to a fixed value (so some commands can be "pinned" by a fixed ID, so
they won't change in subsequent ML updates)
- Split the ptp* files into three parts: ptp.[ch] contains the base ptp
stuff, ptp-chdk.[ch] contains a PTP handler for chdk (operation 0x9999)
and ptp-ml.[ch] contains a PTP handler for ML (operation 0xA1E8 = alex
:) ). They are separate, so adding commands to one won't interfere with
the other.
- The few commands I added to the ML PTP handler are used to query the
menu structure of ML. If you try out the app you wil see that most of
the times this is not enough, as a lot of menu entries have special
"display" codes, that will display the correct value of that menu entry
to the screen. (That's why you get a lot of "-1" values currently in ML
Controller, that don't change, but if you check on the camera they do
change when you click on the button) The current menu API of ML doesn't
allow one to query this as string, so for external applications this
needs a bit changing. There are multiple ways to do it (I thought about
at least 4 ways), but each one means modifying most of the codebase, so
I don't want to start it without talking to alex first. Some additional
commands like querying all possible values might be also useful.

I hope my changes will get upstream :) If yes there is one more note: I
also added some bootstrap commands that will enable anyone with Ubuntu
11.10 to bootstrap a working build machine (including document
creation). For this to work I made some changes to the mkdoc.py for them
to use the base ubuntu packages instead of the python packages. This is
a spearate commit that doesn't need to be added though.

SztupY

xaos

unread,
Mar 2, 2012, 10:12:05 PM3/2/12
to ml-d...@googlegroups.com
Looks great on Xoom (nightly EOS rom/ICS 4.0.3) and 60D. 7D, of
course, without menu, but LV while recording look also fine :)

> --
> http://magiclantern.wikia.com/
>
> To post to this group, send email to ml-d...@googlegroups.com
> To unsubscribe from this group, send email to
> ml-devel+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ml-devel?hl=en

Danne

unread,
Mar 3, 2012, 5:04:55 AM3/3/12
to Magic Lantern firmware development
Really good work!
Is this concept likely to work on an iphone aswell? I really like the
idea to have a swift solution when working with a jib for instance.
//D

On 3 mar, 04:12, xaos <hipotu...@gmail.com> wrote:
> Looks great on Xoom (nightly EOS rom/ICS 4.0.3) and 60D. 7D, of
> course, without menu, but LV while recording look also fine :)
>
> >http://android.sztupy.hu/dl/mlcontroller/magiclantern-2012Mar3.usb.sz...

M.v.M.

unread,
Mar 3, 2012, 5:40:00 AM3/3/12
to ml-d...@googlegroups.com
 
Hi, you asked for ideas what to do, here are my wishes :-)

 I would love to be able to sync two canons for stereoscopic work, with the new function of changing fps in very small increments it would be very nice if we could do the following things:
 a. Shoot one pic with closed Iris and very short exposure at exactly the same moment of time, getting a pure black picture each. This should enable a good video sync afterwards, black picture so the writing-time to card is equal on both cams
 b.Set focus to the same distance on both cams
c. Set the same picture style and whitebalance and shutter and iris on both cams
d. find a way to compare sync of the cams liveview
e. adjust sync if not matching via fps setting
f. give a clear sign of existing sync when done and filming
g. give a warning when sync is lost
h. let us know where to donate if you should start working on this :-)

Thanks Matthias

"Sztupák Sz. Zsolt"

unread,
Mar 3, 2012, 8:16:20 AM3/3/12
to ml-d...@googlegroups.com
2012.03.03. 11:04 keltez�ssel, Danne �rta:

> Really good work!
> Is this concept likely to work on an iphone aswell? I really like the
> idea to have a swift solution when working with a jib for instance.
> //D
>
In theory yes, as the iPhone also has USB host mode, but it's not
avialable for standard developers. You either need a jailbroken phone,
or join MFI (and probably pay apple lots of money, and get rejected). I
don't own nor an iPhone/iPad nor a Mac, so I can't test this.

SztupY

Peter Scharff

unread,
Mar 3, 2012, 8:18:06 AM3/3/12
to ml-d...@googlegroups.com
great work  SztupY love what youve done so far, i use DSLR Controller a lot and miss some of the functionality of ML, for me video isnt too important but being able to remote control my cam is, i think you are missing a trick if you dont implement being able to take photos with this app, this and so way in scripting commands to ml from a phone would be the ultimate tool, keep up the good work and thanks :D

"Sztupák Sz. Zsolt"

unread,
Mar 3, 2012, 8:37:26 AM3/3/12
to ml-d...@googlegroups.com
2012.03.03. 14:18 keltez�ssel, Peter Scharff �rta:
great work� SztupY�love what youve done so far, i use DSLR Controller a lot and miss some of the functionality of ML, for me video isnt too important but being able to remote control my cam is, i think you are missing a trick if you dont implement being able to take photos with this app, this and so way in scripting commands to ml from a phone would be the ultimate tool, keep up the good work and thanks :D


I will definitely implement a lot of photo features. It's just that they are not a priority for me (remote shooting, bulk mode, maybe HDR functions will be included of course). DSLR controller is there anyway, I don't want to take too much market away from chainfire :)

�SztupY

"Sztupák Sz. Zsolt"

unread,
Mar 3, 2012, 8:54:35 AM3/3/12
to ml-d...@googlegroups.com
Setting properties (WB, shutter, even focus) at the same time for both cams at once is probably doable both wirelessly with two android devices and with one that is connected two multiple cameras (via an USB Hub).

Syncing via liveview is probably not going to happen, not only has it a high latency for this kind of work, but the major problem that it's jitter is also non-zero. We could in theory get only a portion of the image via ML (like only the top 10 rows), and sync via that information, (it would have a much smaller lag and jitter) but I don't know how stable that would be.

 SztupY

Vincent Olivier

unread,
Mar 3, 2012, 10:30:40 AM3/3/12
to ml-d...@googlegroups.com
Hi SztupY!

Do you think you could send the PTP patch to Alex for inclusion in official releases?

I'm doing some Arduino+PTP external control similar to Okii but with touch sensors, trying to integrate that in a SHAPE shoulder rig…

Thanks!

Vincent

Justin Williamson

unread,
Mar 4, 2012, 8:25:00 PM3/4/12
to Magic Lantern firmware development
Nice, Glad to see this initial version out, I just loaded it onto my
tab.
Will using a simple USB coupler word or do we need a special cable
like the DSLR controller needs.

Please post links to cables if possible.
good work.


On Mar 3, 10:30 am, Vincent Olivier <vinc...@up4.com> wrote:
> Hi SztupY!
>
> Do you think you could send the PTP patch to Alex for inclusion in official releases?
>
> I'm doing some Arduino+PTP external control similar to Okii but with touch sensors, trying to integrate that in a SHAPE shoulder rig…
>
> Thanks!
>
> Vincent
>
> On 2012-03-02, at 9:44 PM, Sztupák Sz. Zsolt wrote:
>
>
>
>
>
>
>
> > Hi!
>
> > There was a thread a long time ago where I mentioned to be working on a way to control our Canons with an external Android device. Since then a lot of time has passed, and someone else (Chainfire) has already made it possible with his app: DSLR Controller.
>
> > This hasn't stopped me though :), so today I release a very initial release of ML Controller (with version number 0.0), that is already able to do a few things on it's own:
>
> > * Continuous LiveView, even while recording
> > * Controlling the menus of Magic Lantern.
>
> > This is not too much, so consider this application nothing much than an very initial proof-of-concept release. I do plan on improving it of course, and while doing that I also want your opinions on what features you's like to have in it. While DSLR Controller is mainly aimed at photographers, I mainly plan on supporting movie making functions, and ML integration. I'm eager to hear what features you'd like to have (ideas like: GPS geotagging, or wirelessly controlling multiple cameras at once)
>
> > Currently you can use it as an "external monitor", if you don't mind the low FPS count and the slight lag (my initial testing shows 5 FPS and a lag of 1/5 seconds in the optimal case).
>
> > Here is a small video demonstrating it:http://www.youtube.com/watch?v=7w9dFvIDOYw
>
> > The Tablet I use is a cheap 7' Android tablet from China. You can get one of these from around 120$/90€ incl. shipping, exl. taxes, which is cheaper than most (if not all) small HDMI monitors. Though you won't get the same performance for sure. I did try to use both, and it's working, so it's possible you both use a HDMI monitor and this application side by side. The image you get from the USB is not really high resolution (720x480), but it's uncompressed and not an overlay, which might come in handy sometime.
>
> > If you don't have an Android device with USB host support I tested the app with the latest Android-x86 build inside VMWare Player and it works, so you might try that. And I also added a few simple ruby scripts to the source you can use on both Windows and Linux (and probably OS X) with libusb-0.1 to control ML. They don't have liveview support though. For Windows folks I made a zip including everything needed (except libusb-win32):http://android.sztupy.hu/dl/mlcontroller/MLctrl_shoes_windows.zip
>
> > Downloads / links:
> > ML with USB-PTP additions
> > Source:http://bitbucket.org/sztupy/magic-lantern
> > Binary:http://android.sztupy.hu/dl/mlcontroller/magiclantern-2012Mar3.usb.sz...

JeremyOne

unread,
Mar 5, 2012, 1:59:55 AM3/5/12
to Magic Lantern firmware development
A very cool feature would be to be able to control the focus manually,
or set stop points that you can tap to snap to a per-defined focus
point.

Basically like what the Okii controller does, but on a phone. This
could be extremely useful for live filming shooting.

http://www.okii.net/product_p/ct-001.htm

If you don't want to add these features, I may be interested in
lending a hand.

Jeremy
> Binary:http://android.sztupy.hu/dl/mlcontroller/magiclantern-2012Mar3.usb.sz...

eggnot

unread,
Mar 5, 2012, 3:56:07 AM3/5/12
to ml-d...@googlegroups.com
1. focus controller would be great feature, as jeremyone propose.
2. user buttons aka "fask keys" could be very nice. this means for button in matrix(for example 4x3) one can assign function from ML(or canon) menu. most userful can be iso+-, vol+-, f-stops+-. the main idea is user can assing functions he needed.
 
some random ideas: audio levels.

суббота, 3 марта 2012 г. 9:44:35 UTC+7 пользователь SztupY написал:

"Sztupák Sz. Zsolt"

unread,
Mar 6, 2012, 2:13:25 AM3/6/12
to ml-d...@googlegroups.com
Focus controlling is definitely on the to-do list, maybe also including a re-implementtion of my old focusing code for 60D and others (it wasn't stable, but allowed for much finer focus control). Button matrix is a nice idea!

 SztupY
--

"Sztupák Sz. Zsolt"

unread,
Mar 6, 2012, 2:14:02 AM3/6/12
to ml-d...@googlegroups.com
If by "special" you mean an "OTG cable" then yes.

SztupY


> Nice, Glad to see this initial version out, I just loaded it onto my
> tab.
> Will using a simple USB coupler word or do we need a special cable
> like the DSLR controller needs.
>
> Please post links to cables if possible.
> good work.
>
>
> On Mar 3, 10:30 am, Vincent Olivier<vinc...@up4.com> wrote:
>> Hi SztupY!
>>
>> Do you think you could send the PTP patch to Alex for inclusion in official releases?
>>

>> I'm doing some Arduino+PTP external control similar to Okii but with touch sensors, trying to integrate that in a SHAPE shoulder rig�
>>
>> Thanks!
>>
>> Vincent


>>
>> On 2012-03-02, at 9:44 PM, Sztup�k Sz. Zsolt wrote:
>>
>>
>>
>>
>>
>>
>>
>>> Hi!
>>> There was a thread a long time ago where I mentioned to be working on a way to control our Canons with an external Android device. Since then a lot of time has passed, and someone else (Chainfire) has already made it possible with his app: DSLR Controller.
>>> This hasn't stopped me though :), so today I release a very initial release of ML Controller (with version number 0.0), that is already able to do a few things on it's own:
>>> * Continuous LiveView, even while recording
>>> * Controlling the menus of Magic Lantern.
>>> This is not too much, so consider this application nothing much than an very initial proof-of-concept release. I do plan on improving it of course, and while doing that I also want your opinions on what features you's like to have in it. While DSLR Controller is mainly aimed at photographers, I mainly plan on supporting movie making functions, and ML integration. I'm eager to hear what features you'd like to have (ideas like: GPS geotagging, or wirelessly controlling multiple cameras at once)
>>> Currently you can use it as an "external monitor", if you don't mind the low FPS count and the slight lag (my initial testing shows 5 FPS and a lag of 1/5 seconds in the optimal case).
>>> Here is a small video demonstrating it:http://www.youtube.com/watch?v=7w9dFvIDOYw

>>> The Tablet I use is a cheap 7' Android tablet from China. You can get one of these from around 120$/90� incl. shipping, exl. taxes, which is cheaper than most (if not all) small HDMI monitors. Though you won't get the same performance for sure. I did try to use both, and it's working, so it's possible you both use a HDMI monitor and this application side by side. The image you get from the USB is not really high resolution (720x480), but it's uncompressed and not an overlay, which might come in handy sometime.

Alvaro F R Santos

unread,
Mar 6, 2012, 7:27:25 AM3/6/12
to ml-d...@googlegroups.com
Hi,

I'm also trying to use arduino + PTP. using a shield by
http://www.circuitsathome.com/.

They also have some information about PTP and USB camera control at
http://www.circuitsathome.com/category/camera-control

Ribeiro


No dia 6 de Março de 2012 07:14, "Sztupák Sz. Zsolt" <ma...@sztupy.hu> escreveu:
> If by "special" you mean an "OTG cable" then yes.
>
>  SztupY
>
>> Nice, Glad to see this initial version out, I just loaded it onto my
>> tab.
>> Will using a simple USB coupler word or do we need a special cable
>> like the DSLR controller needs.
>>
>> Please post links to cables if possible.
>> good work.
>>
>>
>> On Mar 3, 10:30 am, Vincent Olivier<vinc...@up4.com>  wrote:
>>>
>>> Hi SztupY!
>>>
>>> Do you think you could send the PTP patch to Alex for inclusion in
>>> official releases?
>>>
>>> I'm doing some Arduino+PTP external control similar to Okii but with

>>> touch sensors, trying to integrate that in a SHAPE shoulder rig…
>>>
>>> Thanks!
>>>
>>> Vincent


>>>
>>> On 2012-03-02, at 9:44 PM, Sztupák Sz. Zsolt wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>> Hi!
>>>> There was a thread a long time ago where I mentioned to be working on a
>>>> way to control our Canons with an external Android device. Since then a lot
>>>> of time has passed, and someone else (Chainfire) has already made it
>>>> possible with his app: DSLR Controller.
>>>> This hasn't stopped me though :), so today I release a very initial
>>>> release of ML Controller (with version number 0.0), that is already able to
>>>> do a few things on it's own:
>>>> * Continuous LiveView, even while recording
>>>> * Controlling the menus of Magic Lantern.
>>>> This is not too much, so consider this application nothing much than an
>>>> very initial proof-of-concept release. I do plan on improving it of course,
>>>> and while doing that I also want your opinions on what features you's like
>>>> to have in it. While DSLR Controller is mainly aimed at photographers, I
>>>> mainly plan on supporting movie making functions, and ML integration. I'm
>>>> eager to hear what features you'd like to have (ideas like: GPS geotagging,
>>>> or wirelessly controlling multiple cameras at once)
>>>> Currently you can use it as an "external monitor", if you don't mind the
>>>> low FPS count and the slight lag (my initial testing shows 5 FPS and a lag
>>>> of 1/5 seconds in the optimal case).
>>>> Here is a small video demonstrating
>>>> it:http://www.youtube.com/watch?v=7w9dFvIDOYw
>>>> The Tablet I use is a cheap 7' Android tablet from China. You can get

>>>> one of these from around 120$/90€ incl. shipping, exl. taxes, which is

Michi

unread,
Mar 9, 2012, 7:54:49 AM3/9/12
to ml-d...@googlegroups.com
Hallo, I have a samsung galaxy ace, the programm will run, but when I connect my Eos 500d to my Phone nothing will happen, I go on refresh, but I don not see the cam, I also change the driver, but do not work.

thx
druckgott

Message has been deleted

Rick

unread,
Mar 10, 2012, 1:39:46 PM3/10/12
to ml-d...@googlegroups.com

Fantastic start, used on my 550d without a glitch. 

Using an Advent Vega running IC 4.03

Looking forward to any more developments.
Thanks

Reply all
Reply to author
Forward
0 new messages