supplierdeeply

CHDK PTP interface

  • 1136 Replies
  • 151468 Views
Re: CHDK PTP interface
« Reply #500 on: 04 / June / 2011, 17:11:46 »
Advertisements
Using set_record(1) did not help to enable the buttons. But luar post_levent_to_ui(4484) does, it is just that I didn't think that it should. But still cannot get the other functions (such as timelapse and change mode) to do anything except loop forever on the luar get_mode() command.

*

Offline reyalp

  • ******
  • 10069
Re: CHDK PTP interface
« Reply #501 on: 04 / June / 2011, 23:59:08 »
Using set_record(1) did not help to enable the buttons. But luar post_levent_to_ui(4484) does, it is just that I didn't think that it should. But still cannot get the other functions (such as timelapse and change mode) to do anything except loop forever on the luar get_mode() command.
Does set_record(1) switch it into record mode ?

If it does, what does
=return get_mode()
do in chdkptp after calling set_record(1)

In vxworks, switch_mode_usb and set_record do the same thing (switch mode with levent) but maybe this camera needs the dryos style switch_mode since it's right on the transition...
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #502 on: 05 / June / 2011, 00:46:52 »
Using set_record(1) did not help to enable the buttons. But luar post_levent_to_ui(4484) does, it is just that I didn't think that it should. But still cannot get the other functions (such as timelapse and change mode) to do anything except loop forever on the luar get_mode() command.
Does set_record(1) switch it into record mode ?

If it does, what does
=return get_mode()
do in chdkptp after calling set_record(1)

In vxworks, switch_mode_usb and set_record do the same thing (switch mode with levent) but maybe this camera needs the dryos style switch_mode since it's right on the transition...

Unfortunately, I do not know how to tell if it has switched to record mode. None of the buttons work and nothing in the display changes, so I presume it does not. Following is the output, immediately after initialization of the camera, of the sequence:

set_record(1); get_mode(); click('menu'); post_levent_to_ui(4484); get_mode(); click('menu');

The menu will not come up until after the post_levent_to_ui(4484):

** init() successful
>> luar set_record(1) << script:6
6:ret:nil (Length: 19)
>> luar get_mode() << script:7
7:ret:false (Length: 21)
>> lua click('menu') << script:8 (Length: 8)
>> script-status << script-status:0x0 run=no msg=no (Length: 31)
>> luar post_levent_to_ui(4484) << script:9
9:ret:nil (Length: 19)
>> luar get_mode() << script:10
10:ret:false (Length: 23)
>> lua click('menu') << script:11 (Length: 9)
>> script-status << script-status:0x0 run=no msg=no (Length: 31)

After dozes of times running the get_mode() in various conditions and after many commands, I have never seen it return anything except a false.

In chdkptp the return from get_mode() is always:

> = return get_mode()
9:return:false
9:return:false
9:return:513
« Last Edit: 05 / June / 2011, 00:50:55 by jimb »

*

Offline reyalp

  • ******
  • 10069
Re: CHDK PTP interface
« Reply #503 on: 05 / June / 2011, 01:14:30 »
Unfortunately, I do not know how to tell if it has switched to record mode.
The lens will extend and the display will switch to live view.
Quote
> = return get_mode()
9:return:false
9:return:false
9:return:513
Looks like it's not switching.
Don't forget what the H stands for.


Re: CHDK PTP interface
« Reply #504 on: 05 / June / 2011, 08:32:42 »
Unfortunately, I do not know how to tell if it has switched to record mode.
The lens will extend and the display will switch to live view.
Never does.

*

Offline reyalp

  • ******
  • 10069
Re: CHDK PTP interface
« Reply #505 on: 05 / June / 2011, 17:45:56 »
Unfortunately, I do not know how to tell if it has switched to record mode.
The lens will extend and the display will switch to live view.
Never does.
OK, so mode switch does not work on this camera. Thanks for tracking that down. I would guess it need PB2Rec and REC2Pb like dryos cameras.
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #506 on: 10 / June / 2011, 15:27:38 »
OK, so mode switch does not work on this camera. Thanks for tracking that down. I would guess it need PB2Rec and REC2Pb like dryos cameras.

I have tried calling the PB2Rec and Rec2PB routines, both using call_func_ptr from lua and calling them from switch_mode_usb. Neither routine seems to do anything and get_mode() still always returns false.

So I made the assumption that the a560 might need something like the DryOS requirement to "disconnect" the USB port. After having tried several options that I thought sounded useful, and combing this thread for other options and trying them (such as DisableNotificationPTP), I have succeeded in some spectacular crashes, but, alas, am no closer to getting mode switching in PTP to work.

Anyone have any other ideas?

Re: CHDK PTP interface
« Reply #507 on: 11 / June / 2011, 01:55:02 »
checked the SX120 with PtpCam, PtpCamGui, and CHDKPtp (http://subversion.assembla.com/svn/chdkptp/)

one thing is to be noted, which i think someone must have already mentioned in the forums, is that the camera tends to hang or shutdown very frequently if the camera is set to continous autofocus. as soon as i turned off the continous focus all the function become very smooth and stable.

i would think continous focussing must take quite a bit of computing power which would leave the connection and running the scripts prone to errors

next on my list would be to test mweerden's live preview, but i am a little wary about patching and compiling myself - never tried that before, am on a windows machine- but i should thnk it should not be a problem due to the excellent work of everyone involved with CHDK.

any advice or link where i can download an already patched verson for SX 120 ? one can hope, cant one :)


*

Offline reyalp

  • ******
  • 10069
Re: CHDK PTP interface
« Reply #508 on: 13 / June / 2011, 01:27:48 »
Some notes getting this set up on a fresh win7/64 (no canon or other PTP software installed)

- installed the filter driver (libusb-win32-devel-filter-1.2.4.0.exe  from http://sourceforge.net/apps/trac/libusb-win32/wiki )
- connected cameras and setup filters in using the "filter wizard"

both cameras show up in chdkptp list, so the filter is installed correctly.

d10
screen goes black afters connecting the camera (or powering on while connected)
can connect and execute lua but cannot switch to record mode or enable the display.
disabling the WIA (Windows Image Acquisition) service *sometimes* prevents this. If an explorer window is open and looking at "my computer" it still goes black. If it's looking at a folder, it seems to be OK.

a540
screen only goes black if I browse into the camera folder, but cannot connect.
disabling WIA does not fix inability to connect.

edit:
Removing the filters and using the inf wizard instead, the both cameras are fully functional. The cameras no longer appear in the windows explorer.
« Last Edit: 13 / June / 2011, 01:39:24 by reyalp »
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #509 on: 13 / June / 2011, 10:54:21 »
Hello... anyone knows if this is compatible with the canon sx130 or some continous compact model???

 

Related Topics