CHDK PTP interface - page 20 - General Discussion and Assistance - CHDK Forum
supplierdeeply

CHDK PTP interface

  • 1241 Replies
  • 488795 Views
*

Offline JMD

  • *
  • 34
Re: CHDK PTP interface
« Reply #190 on: 18 / May / 2010, 19:10:45 »
Advertisements
Is it possible to limit the live image frame rate in the CHDK code?  I'm running in a rather unusual configuration (through a ethernet to USB server), and I believe the server is choking on UDP packets.

Thanks

*

Offline waldo

  • ***
  • 238
Re: CHDK PTP interface
« Reply #191 on: 20 / May / 2010, 19:32:10 »
The ability to get a screen image via USB is great!  Is it possible to pass the screen bitmap image through the camera's JPEG compressor?  This might allow faster FPS or lower bandwidth transfers to the PC.

*

Offline c10ud

  • ***
  • 245
Re: CHDK PTP interface
« Reply #192 on: 01 / June / 2010, 05:59:53 »
i wanted to find ptp entry points for other cameras as well, do i have to follow the "standard" procedure for finding entry points or is there a faster version? :P

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: CHDK PTP interface
« Reply #193 on: 01 / June / 2010, 13:17:23 »
i wanted to find ptp entry points for other cameras as well, do i have to follow the "standard" procedure for finding entry points or is there a faster version? :P
Sort of, by using the signature finder, which is a standard way to find most functions. This proved to work well on a few VxWorks cameras (flip back a few pages and look for reyalp's patch). You can try the same approach for DryOS, which probably is your target. For a start, take the reference A720 firmware, where add_ptp_handler address is known (see ewavr's patch back in the thread), use "gensig" to generate a signature, and try "finsig" with that signature on a different firmware. Of course, you will have to "manually" verify (by visual inspection and/or experiment) that the result is correct. Yes, human intellect still counts...


Re: CHDK PTP interface
« Reply #194 on: 01 / June / 2010, 21:36:45 »
Is it possible to compress liveview image into JPEG before transferring it through USB to PC?

Re: CHDK PTP interface
« Reply #195 on: 05 / June / 2010, 23:21:45 »
Forgive the list of questions -- of which I have alot being so new. But, I am trying to implement a "photobooth" as I describe here:

http://chdk.setepontos.com/index.php/topic,5282.new.html

Given that this PTP mode seems to give me the remote control I was looking for (I'm still amazed!), I have a few questions to finish the implementation. Note I am using linux.

How are you getting the live feed from the camera?
How can I get the return values from a lua script?
Is it possible to execute a script on the camera (merely for ease of use) or must I submit the entire script to be run from the command line?
Finally, I've been playing with ptpcam, but see mention and screenshots of chdkcam. Where can i get this software? It appears to be windows only -- does there need to be pc-side tools developed for this for mac and linux?
Answering myself for the benefit of others: http://ewavr.nm.ru/chdk/for_test/ and yes it appears there is a need. I will begin examining the code for chdkcam

I apologize if these have been answered already. Thanks!
« Last Edit: 05 / June / 2010, 23:39:23 by ballloons »

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: CHDK PTP interface
« Reply #196 on: 09 / June / 2010, 12:21:41 »
Note I am using linux.
There's no publicly known linux client so far.
Quote
How are you getting the live feed from the camera?
By repeatedly reading, through "custom" PTP requests, a chunk of camera memory that hosts the live view buffer (it is in YUV format). So far, there is no synchronization or such.
Quote
How can I get the return values from a lua script?
Read the latest mweerden's posts up this thread and implement his ideas.
Quote
Is it possible to execute a script on the camera (merely for ease of use) or must I submit the entire script to be run from the command line?
Nobody bothered so far, but it is pretty straightforward to implement.

Good luck! Please post about your successes.

Re: CHDK PTP interface
« Reply #197 on: 27 / June / 2010, 22:18:21 »
Thank you for the answers. Because of time constraints, I did not pursue a full linux client, but instead used python and expect to wrap around ptpcam. It's kludgy, but it worked. You can find the code here:

Please note this is my first time coding in python as well as gtk.  :-[

http://code.google.com/p/chdkphotobooth/


Re: CHDK PTP interface
« Reply #198 on: 01 / July / 2010, 14:29:05 »
Hi all,

I am having trouble getting the PTP interface working on an a590 101b camera and linux.  ballloons has already listed off the steps to do this at http://chdk.setepontos.com/index.php/topic,5282.new.html:

(1) Patch libptp2 using mweerben's ptp patch
(2) use custom build for CHDK a590 (in testing folder)
(3) connect camera in playback mode
(4) run ptpcam --chdk

But I have followed these steps without success.  After I connect the camera to my computer via usb (in playback) mode, the screen goes blank and all of the buttons on the camera become unresponsive.  (At this point the top LED above the camera screen is lit, but I don't see anything else interesting happening with the camera.)  When I try to issue the "shutdown-hard" or "reboot" commands, I get the following error: "unexpected return code 0x2001".  Also, when I run "lua shoot()" the camera doesn't do anything and I get no output on the terminal.

I am pretty confident that I followed steps (1), (3) and (4) correctly, but I am not sure that I used the correct CHDK build in step (2). I took the build from here: http://ewavr.nm.ru/chdk/for_test/.

Does anyone have any idea what is going wrong?  I would appreciate any insights here.

Jim
« Last Edit: 01 / July / 2010, 14:30:39 by jmgummes »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: CHDK PTP interface
« Reply #199 on: 01 / July / 2010, 14:42:38 »
When I try to issue the "shutdown-hard" or "reboot" commands, I get the following error: "unexpected return code 0x2001".` I took the build from here: http://ewavr.nm.ru/chdk/for_test/.
This build is not fully compatible with mweerben's ptp patch: "shutdown-hard" or "reboot" commands are not supported.

edit:
Quote
when I run "lua shoot()" the camera doesn't do anything and I get no output on the terminal.
Try "mode 1" command for switching camera to record mode.
« Last Edit: 01 / July / 2010, 14:51:24 by ewavr »

 

Related Topics