CHDK PTP interface - page 63 - General Discussion and Assistance - CHDK Forum

CHDK PTP interface

  • 1244 Replies
  • 533078 Views
Re: CHDK PTP interface
« Reply #620 on: 01 / December / 2011, 06:17:59 »
Advertisements
I am using SDM which behaves rather differently to CHDK.

After the shutter has been pressed the raw data and a header file are immediately sent to the PC without saving on the camera.

That process is quite fast depending on file size and card speed.

The memory card should have been low-level formatted in the camera beforehand, as recommended by Canon.

On the PC, they are converted to a DNG file.

The JPG left on the camera is tiny, only about 10k (!) and is instantly deleted.

I do not know how the other PTP clients deal with this.


David
« Last Edit: 01 / December / 2011, 06:19:58 by Microfunguy »

Re: CHDK PTP interface
« Reply #621 on: 19 / December / 2011, 16:59:19 »
I have a question about getting the Lua console to run on ptpcamgui. I have tried on two computers (Win7x32 and Win7x64) with two cameras (SX220HS and SX30) to run the lua console, and it freezes ptpcamgui. I resorted to using CHDKPTP to communicate in lua with the cameras and it works fine, but I would like to have the functionality in ptpcamgui since it's so useful for everything else.

After the freeze (spinny wheel, prog not responding) if I close ptpcamgui then ptpcam is still working in task manager. I am wondering if I missed something as far as how it works. Here's my info from the PTPCAM console:

Code: [Select]
** init() start ...
>> version << ptpcam: 2.0
camera: 2.1 (Length: 24)
>> script-support << script-support:0x1 lua=yes (Length: 26)
>> luar not(os.stat("A/CHDK/LUALIB/lptpgui.lua")==nil) << script:15
15:ret:true (Length: 22)
>> luar require("lptpgui").version << script:16
16:ret:113 (71) (Length: 26)
>> luar get_buildinfo() << script:17
17:ret:'platformid 12816
platform sx30
version CHDK
platsub 100p
build_number 0.9.9-1487
os dryos
build_date Dec 15 2011
build_time 10:13:08
' (Length: 161)
is DryOS=True
CHDK-DE=False
>> luar get_config_value(67) << script:18
18:ret:1 (1) (Length: 23)
current powersave mode: 1
>> luar get_raw() << script:19
19:ret:0 (0) (Length: 23)
>> help << q quit                         quit program
h help                         list commands
r reset                        reconnect to camera
  version                      get CHDK PTP version (ptpcam and camera)
  shutdown                     shutdown camera (soft)
  reboot                       reboot camera
  reboot <filename>            reboot camera using specified firmware update
  reboot-fi2                   reboot camera using default firmware update
m memory <address>             get byte at address
m memory <address>-<address>   get bytes at given range
m memory <address> <num>       get num bytes at given address
  set <address> <long>         set long value at address
c call <address> <arg1> ...    call function at address with given arguments
  upload <local> <remote>      upload local file to camera
  download <remote> <local>    download file from camera
  mode <val>                   set mode (0=playback,1=record)
  lua <code>                   execute lua code
  luar <code>                  execute "return <code>" and retreive result
  script-support               show supported script interfaces
  script-status                show script execution and message status
  getm                         get messages / return values from script
  putm <message>               send <message> to running script (Length: 1359)
* enable keys for GUI control: >> lua post_levent_to_ui(4484) << script:20 (Length: 9)
>> script-status << script-status:0x0 run=no msg=no (Length: 31)
** init() successful
A720 1.00c | D10 1.00b |SX220 1.01a | SX230 ? | SX30 1.00p CHDK ver. 1.1.0-r1727

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK PTP interface
« Reply #622 on: 11 / January / 2012, 07:08:02 »
Btw,

is there any reason why we not activate the PTP support for all cameras in camera.h?

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 14125
Re: CHDK PTP interface
« Reply #623 on: 14 / January / 2012, 02:00:13 »
Btw,

is there any reason why we not activate the PTP support for all cameras in camera.h?
It is in CHDK.
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK PTP interface
« Reply #624 on: 14 / January / 2012, 04:02:58 »
It is in CHDK.

Thx.

You're right. Sorry, I haven't seen the entry. So we can delete all entries in the platform_camera.h files for a better overview.

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 14125
Re: CHDK PTP interface
« Reply #625 on: 14 / January / 2012, 15:14:18 »
You're right. Sorry, I haven't seen the entry. So we can delete all entries in the platform_camera.h files for a better overview.
Yes :)
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #626 on: 09 / February / 2012, 18:48:40 »
Hello lads !

Knowing we've just hit trunk1654, may I ask if the ptp handlers & usb descriptors are implemented generically, or does each platform (already ported) needs its own implementation of the CHDK ptp extension to enable live preview with mweerden's .Net app ? 

I'm trying to establish some communication between mweerden's CHDKPTPRemote and an A430 (which is currently-ish being ported), but since the app seems to be designed for overlaid previews, it asks for a 512-bytes-capable PTP-class endpoint, which clearly isn't implemented in the current A430 port [1] ...hence my previous question. :-[

Since I'm a newbie of the most blueish kind, I guess the implementations I'm talking about may be a CHDK-DE "exclusivity"... aren't they ?  ???

Thanks, and best regards.  :)


[1] I haven't seen anything like it when enumerating the A430's PTP interface descriptors.  ;)
« Last Edit: 09 / February / 2012, 18:54:00 by asmodyne »

*

Offline reyalp

  • ******
  • 14125
Re: CHDK PTP interface
« Reply #627 on: 11 / February / 2012, 00:35:20 »
Hello lads !

Knowing we've just hit trunk1654, may I ask if the ptp handlers & usb descriptors are implemented generically, or does each platform (already ported) needs its own implementation of the CHDK ptp extension to enable live preview with mweerden's .Net app ? 
This question doesn't really make sense to me.

CHDK PTP protocol has certain commands. These are supported generically in CHDK code. A build for any camera should be compatible with with any CHDK PTP client implementing the matching protocol version. You don't need to worry about handlers and descriptors... although I suppose it's possible that the a430 is old enough that it's weird in some way. If you can upload/download with chdkptp or ptpcamgui, then CHDK PTP is implemented and working properly. Neither one will give you live view however.

The live view stuff is completely disabled in in the CHDK release branch, to avoid having an under development protocol "released". There is some of this code in the trunk, I don't know if it is compatible with whatever version of CHDKPTPRemote you are trying to use.

Properly supporting live view is on the list for the next release, but is not finished. The protocol will likely change from whats in the trunk. I keep meaning to do some work on this Real Soon Now. Maybe this weekend...
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #628 on: 11 / February / 2012, 10:13:35 »
Properly supporting live view is on the list for the next release ...
List ?  There's a list ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14125
Re: CHDK PTP interface
« Reply #629 on: 11 / February / 2012, 16:09:45 »
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal