CHDK PTP interface - General Discussion and Assistance - CHDK Forum

CHDK Development > General Discussion and Assistance

CHDK PTP interface

(1/246) > >>

mweerden:
Hi all,

The last couple of days I've been working on a PTP extension for the CHDK that allows various remote operations (e.g. memory inspection/manipulation, function calls, uploading/downloading, switching to record mode and LUA script execution). I've also made an ad-hoc command-line tool to use it (based on ptpcam).

Have a look here for patches and documentation of what I did: http://www.mweerden.net/chdk_ptp.html

HarpoMa:
wow - I will be checking this out tonight.  Wonderful work.

fe50:
Great stuff !
...will have a look to this, too - but first i need to apply the LongDay patch to extend my available CHDK-ing time from Day24h to Day32h   :-[

hudson:
I've added some similar functions to Magic Lantern for the 5D Mark II.  It looks like we duplicated each others efforts in reverse engineering the PTP context structure and callback interface.  I added fine grained focus control for interfacing with remote focus controllers like the Impero.

One of my other goals was to build a command console that would work over the PTP interface.  Perhaps it would allow arbitrary Lua commands to be sent, and use the USB as the stdout.  And as an outside goal, I wanted to add a gdb interface so that extensions could be more easily debugged.

mweerden:

--- Quote from: hudson on 09 / October / 2009, 11:02:55 ---I've added some similar functions to Magic Lantern for the 5D Mark II.  It looks like we duplicated each others efforts in reverse engineering the PTP context structure and callback interface.

--- End quote ---
First time I even hear of Magic Lantern. ;) Fortunately the PTP part wasn't much work, but it would be nice if we can avoid duplication in the future. As I've said before, there is a lot of knowledge floating around these project, but most of it is inaccessible.

By the way, I just tried to find your functions (for comparison) but had no luck; can you give a me pointer?



--- Quote ---One of my other goals was to build a command console that would work over the PTP interface.  Perhaps it would allow arbitrary Lua commands to be sent, and use the USB as the stdout.

--- End quote ---
This shouldn't be hard. I'm not sure if it's clear, but my "LUA script execution" means you can already execute arbitrary commands (e.g. "lua shoot();" with "ptpcam --chdk"). What I haven't looked at is something to preserve context between executions. Sending of output should be fairly simple (e.g. with a simple hook).


--- Quote ---And as an outside goal, I wanted to add a gdb interface so that extensions could be more easily debugged.

--- End quote ---
Do you think this is possible? It seems to me that this requires support from the OS to provide tracing and breakpoints and what not. Has anything like this been found?

Navigation

[0] Message Index

[#] Next page

Go to full version