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

CHDK PTP interface

  • 1241 Replies
  • 492022 Views
*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: CHDK PTP interface
« Reply #390 on: 28 / January / 2011, 06:27:03 »
Advertisements
Quote
I've tested the current trunk (rev1053) and the GUI work fine

Thanks msl !
 
I'll modify my error message to reflect this, because it now says:
Quote
A CHDK-DE build trunk560 or newer
is required both in CHDK-Shell and
on your camera

Glad to see that the CHDK community is in 'healthy competition' rather than 'tribal warfare' mode  ;)
 
wim
« Last Edit: 28 / January / 2011, 07:02:19 by whim »

Re: CHDK PTP interface
« Reply #391 on: 29 / January / 2011, 12:11:11 »
My camera will not go into shooting mode when the USB cable is attached. 

As reported earlier,  I have PTP working somewhat.  I can issue commands via ptpcam and send LUA scripts that execute.  However, once a USB cable is plugged in, the camera buttons stop working and if the camera was in shooting mode it switches to playback mode.

Where do I start looking ?  Do I need to enable remote mode - I thought that might interfere with PTP ?

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14082
Re: CHDK PTP interface
« Reply #392 on: 29 / January / 2011, 17:14:29 »
I can issue commands via ptpcam and send LUA scripts that execute.  However, once a USB cable is plugged in, the camera buttons stop working and if the camera was in shooting mode it switches to playback mode.
This is completely normal.
Quote
Where do I start looking ?
Use switch_mode_usb. If it doesn't work, implement it correctly for your camera.
Quote
  Do I need to enable remote mode
Absolutely note.
Quote
- I thought that might interfere with PTP ?
Correct, enabling the remote will completely disable all USB protocol functionality. "USB" remote is not a USB protocol connection, it's just detecting whether there is power on the USB port. To make this useful, it hides the signal from the canon formware (which in turn hides it from CHDK PTP).
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #393 on: 30 / January / 2011, 04:18:03 »
@reyalp
>Correct, enabling the remote will completely disable all USB protocol functionality. "USB" remote is not a >USB protocol connection, it's just detecting whether there is power on the USB port. To make this useful, it >hides the signal from the canon formware (which in turn hides it from CHDK PTP).

does this mean, i must activate remote on in chdk menu, to get ptpcam correct working ?
All test i do i have done with default chdk setting(no remote on)

when i enable "remote on" then when i plug in the USB cable, camera switch to record mode and do a shoot half.It do not crash.

But then USB do not work.I guess this is ok, because code in keyboard clear always USB flag when remote is on.

see here the original code

   if (conf.remote_enable) {
        physw_status[2] = physw_status[2] & ~(SD_READONLY_FLAG | USB_MASK);   // override USB and SD-Card Readonly Bits
    }


the romlog of the crash when remote on is disable and switch from ptpcam in play mode to record mode is this

Edit: i shorten romlog.


ASSERT!! KerQueue.c Line 86
Occured Time  2011:01:30 10:01:55
Task ID: 16711713
Task name: CtrlSrv
..
« Last Edit: 31 / January / 2011, 05:08:37 by Bernd R »
Ixus 1000 HS


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: CHDK PTP interface
« Reply #394 on: 30 / January / 2011, 04:30:09 »
does this mean, i must activate remote on in chdk menu, to get ptpcam correct working ?

No, just the opposite.

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: CHDK PTP interface
« Reply #395 on: 30 / January / 2011, 14:22:55 »
Since i've discovered UART for SD4000 i've start documenting and playing with Event Procedure...

On SD4000 this works for switching Playback / Record mode:

1. register required functions with UI.Create

2. switch mode:
UIFS_Capture  - Switch to Record Mode or start Capture if we are already in Record Mode
ModeDialToMovie  - Switch to Movie Record Mode
UIFS_SetDialPlay  - Switch to Playback Mode

3. switch to different Still Image Capture modes:
ModeDialToAuto
ModeDialToPortrait
ModeDialToKidsAndPets
« Last Edit: 30 / January / 2011, 17:26:59 by pixeldoc2000 »

*

Offline reyalp

  • ******
  • 14082
Re: CHDK PTP interface
« Reply #396 on: 30 / January / 2011, 14:43:41 »
@reyalp
does this mean, i must activate remote on in chdk menu, to get ptpcam correct working ?
No, it means completely the opposite. How can I make this more clear ? CHDK "USB REMOTE" PREVENTS THE CAMERA FROM SEEING A USB CONNECTION AT ALL. If you look at the code, this should be quite obvious. If you test it, this should be obvious. If you read the wiki pages on how to build and use the remote, it should be obvious.

...

Also, you really don't need to post a romlog for every crash in your broken port. It's up to *you* to fix it.


edit:
This post was unnecessarily flamey. Sorry. I know you've spent a lot of time and effort on CHDK. It would be nice if you'd use an attachment for the ROMLOGs.
« Last Edit: 30 / January / 2011, 18:15:03 by reyalp »
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #397 on: 30 / January / 2011, 15:27:31 »
Also, you really don't need to post a romlog for every crash in your broken port. It's up to *you* to fix it.

It would be a little easier to read these forums if romlogs were either submitted as attachments or inserted in a code scroll box.

Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 14082
Re: CHDK PTP interface
« Reply #398 on: 30 / January / 2011, 18:16:24 »
Since i've discovered UART for SD4000 i've start documenting and playing with Event Procedure...

On SD4000 this works for switching Playback / Record mode:

1. register required functions with UI.Create

2. switch mode:
UIFS_Capture  - Switch to Record Mode or start Capture if we are already in Record Mode
ModeDialToMovie  - Switch to Movie Record Mode
UIFS_SetDialPlay  - Switch to Playback Mode

3. switch to different Still Image Capture modes:
ModeDialToAuto
ModeDialToPortrait
ModeDialToKidsAndPets
This works with PTP connected ? Very interesting. If it works on other cameras, this might be a good alternative to the PB2Rec/REC2PB/set_control_event stuff.
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #399 on: 30 / January / 2011, 19:09:56 »
Use switch_mode_usb. If it doesn't work, implement it correctly for your camera.

@reyalp : Looks like the three stubs called by switch_mode_usb() are okay (PB2Rec, Rec2PB, set_control_event).  What's the best reference port to check them against ?

Also, are the values used in set_control_event the same for every camera ? 
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics