Author Topic: USB keystrokes sender / receiver  (Read 3613 times)

dlrpgmsvc

  • Senior
  • ****
  • Posts: 398
  • The 7D and 50D Robin Hood
USB keystrokes sender / receiver
« on: February 26, 2014, 02:09:24 PM »
There should be a "simplified" version of "ML controller for Android" where we use an android tablet only to simulate the camera keystrokes, and we can see the results on a HDMI external monitor. Not a full ML menus replication on the tablet: this full replication will require a continuous updating effort to catch-up with the latest ML version: unfeasible.
Also not a canon lcd-to-tablet replication with full ML overlays, because also this will require a continuous versions catch-up. For monitoring with full ML overlays, we will use a simple HDMI monitor.

This "only keystrokes sender/receiver" will be useful for jib cranes operations and other similar cases where a remote controller station is a must.

I'm thinking we can arrange an "Android/pc USB keystrokes sender" on the remote side, and a "usb keystrokes listener" process inside ML (as a module will be perfect), based on a polling or (best) on interrupt.
We can arrange a standard "USB command-to-camera key" mapping table, and then all the subsequent new ML versions will be 100% compatible with the unified "Android/PC - to - Canon camera" remote protocol.

Obviously, we can add also the classic PTP protocol part, used for follow-focusing, changing the aperture and so on with a single command.

The setup will be : external HDMI monitor + Tablet pc / Android canon camera remote control surface (there will be only depicted on screen the various camera buttons, each pushable by a tap).

Programmatically speaking: for the receiver side (ML code), we can write a USB-command listener routine (activated by interrupt) that, upon receiving the key-press command from remote party (pc or android, via USB), triggers artificially the corresponding canon body key-press event interrupt routine. So that the rest of the ML code will remain untouched. Do some ML coders here can confirm that this is feasible ?

What I have found so far that can be useful : http://www.magiclantern.fm/forum/index.php?topic=10554.0
                                                                  http://magiclantern.wikia.com/wiki/GUI_Events/550D
If you think it's impossible, you have lost beforehand

gerk.raisen

  • Member
  • ***
  • Posts: 161
Re: USB keystrokes sender / receiver
« Reply #1 on: February 27, 2014, 03:32:56 PM »
Totally agree with you.
I think that although the other solution is more complete and more versatile, this at least for start is a lot simpler and can already arrange the necessity of some.
Maybe in future, when cameras with touchscreen will be supported, also simulate the touchscreen itself.

Very important (at least for me) is the wireless option.
For cameras without Wi-Fi I think we can achieve it with a cheap device like this:
TP LINK MR3040 - Portable Battery Powered 3G/4G Wireless N Router (less than 40$)
The program DSLRcontroller use that device.
It use an opensource Openwrt firmware loaded on the device (customized with a small linux program loaded on startup) to forward send/receive PTP message to/from the client program on android by the usb cable to the camera.

http://dslrcontroller.com/guide-wifi_mr3040.php

We can modify it to add or write another little linux program (to be loaded on device startup) to receive the keypress request from android client with the same method and forward it by the usb cable to the camera.
We can also use it for send/receive PTP-ML codes, and maybe also have a sort of "command line" with possibility to launch command and scripts (when they will return :)