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

CHDK PTP interface

  • 1241 Replies
  • 489954 Views
*

Offline reyalp

  • ******
  • 14080
Re: CHDK PTP interface
« Reply #350 on: 08 / January / 2011, 21:23:52 »
Advertisements
EDIT :  Hmmmm ... CreateTask_init_chdk_ptp() exists in some copies of boot.c.  Time to see what that's all about.
It should be removed from any boot.c it exists in, started from spytask now.


Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #351 on: 08 / January / 2011, 21:53:23 »
It should be removed from any boot.c it exists in, started from spytask now.
Thanks.  One less thing to worry about.  Its commented out in the g12 and sx30 of the current trunk.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: CHDK PTP interface
« Reply #352 on: 09 / January / 2011, 06:45:03 »
Hi all
I'm trying to use PTPCAM whit a A495 and 'm getting the following error

c:\Ptpcam-chdk-1005>ptpcam --chdk
unexpected return code 0x2005
error: cannot get camera CHDK PTP version; either it has an unsupported version
or no CHDK PTP support at all
<conn>

Does anyone know what can be that?
« Last Edit: 09 / January / 2011, 10:44:26 by jrkblo »

*

Offline reyalp

  • ******
  • 14080
Re: CHDK PTP interface
« Reply #353 on: 09 / January / 2011, 14:46:15 »
Hi all
I'm trying to use PTPCAM whit a A495 and 'm getting the following error

c:\Ptpcam-chdk-1005>ptpcam --chdk
unexpected return code 0x2005
error: cannot get camera CHDK PTP version; either it has an unsupported version
or no CHDK PTP support at all
<conn>

Does anyone know what can be that?
What ptpcam binary are you using ? What a495 build are you using ?

I think this one is in CHDKDE, so you might want to use their build.
Don't forget what the H stands for.


Re: CHDK PTP interface
« Reply #354 on: 14 / January / 2011, 10:04:21 »
>Edit:
>If people can report which cameras have been tested successfull (including mode switching through PTP) >that would be helpful.

I test Ixus 1000 HS

C:\Users\pc>e:\chdk\ptpcam --chdk="mode 1"

The command move out the lens and Camera switch off with lens out.no image see, seem crash.later commands with ptpcam give same error message as no camera is connect

I use trunk 1023.maybe this is too old ?

upload and download files and lua reboot work over ptpcam
« Last Edit: 14 / January / 2011, 10:06:43 by Bernd R »
Ixus 1000 HS

*

Offline reyalp

  • ******
  • 14080
Re: CHDK PTP interface
« Reply #355 on: 14 / January / 2011, 12:14:39 »
The command move out the lens and Camera switch off with lens out.no image see, seem crash.later commands with ptpcam give same error message as no camera is connect

I use trunk 1023.maybe this is too old ?
More likely some entry points (pb2rec, rec2pb, set_control_event) are wrong.
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #356 on: 14 / January / 2011, 12:54:28 »
The address of PB2REC is find in that function that stand this text

AC:PB2REC

I verify that and seem ok.

I add shutdown after _PB2Rec

 _PB2Rec();
shutdown();

Now lens do not move out and camera display get dark earlier.

seem the function return immidiate.

So i add a msleep(2000); (see below)

then lens move out and camera shutdown without move in the lens.

Do you know if shutdown() command move in the lens if it is out ?

if yes then camera is crash in function  _Rec2PB();

_set_control_event

// Best match: 93%
NSTUB(set_control_event, 0xff89bfe4)

seem a good find.do you know if this work all on S95 ?
If so i can compare the asm source with that, maybe there is something really wrong.


int __attribute__((weak)) switch_mode_usb(int mode)
{
#ifdef CAM_CHDK_PTP
    if ( mode == 0 ) {
        _Rec2PB();
        _set_control_event(0x80000902); // 0x10A5 ConnectUSBCable
    } else if ( mode == 1 ) {
        _set_control_event(0x902); // 0x10A6 DisconnectUSBCable
        _PB2Rec();
         msleep(2000);
         shutdown();
    } else return 0;
    return 1;
#else
  return 0;
#endif // CAM_CHDK_PTP

« Last Edit: 14 / January / 2011, 12:57:23 by Bernd R »
Ixus 1000 HS

Re: CHDK PTP interface
« Reply #357 on: 16 / January / 2011, 06:55:58 »
I have  now remove

//_set_control_event(0x902); // 0x10A6 DisconnectUSBCable
        _PB2Rec();
msleep(4000)

and camera crash too as soon the optic is out of camera correct.

what happen on other cam when _set_control_event is not execute ?
maybe the value is wrong for new camera.

or maybe you can tell me a test, to see if  _set_control_event work ok.
Ixus 1000 HS


*

Offline rudi

  • ***
  • 129
  • A590IS_101B, SX260HS_100B
Re: CHDK PTP interface
« Reply #358 on: 16 / January / 2011, 09:35:20 »
More likely some entry points (pb2rec, rec2pb, set_control_event) are wrong.

I confirm manual PB2REC and REC2PB for each cam in trunk. For SET_CONTROL_EVENT I make some spot tests, because the code is equal (finsig works fine for that).

@Bernd R
I would use for IXUS1000_100d this addresses:
PB2REC: 0xFF89F73C
REC2PB: 0xFF89DFE4
set_control_even: 0xFF89BFE4

rudi

Re: CHDK PTP interface
« Reply #359 on: 16 / January / 2011, 11:46:14 »
>PB2REC: 0xFF89F73C
>REC2PB: 0xFF89DFE4
>set_control_even: 0xFF89BFE4

yes, this addresses the IX1000 D Port use

stubs_entry_2.s

NHSTUB(PB2Rec,                          0xFF89F73C)  // search "AC:PB2Rec"
NHSTUB(Rec2PB,                          0xFF89DFE4)  //"AC:Rec2PB"

and in stubs_entry.s file

 // Best match: 93%
NSTUB(set_control_event, 0xff89bfe4)

but it not work.
« Last Edit: 16 / January / 2011, 11:47:47 by Bernd R »
Ixus 1000 HS

 

Related Topics