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

CHDK PTP interface

  • 1240 Replies
  • 438631 Views
Re: CHDK PTP interface
« Reply #400 on: 31 / January / 2011, 05:21:56 »
Advertisements
@reyalp
>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.

sorry for the question, fudgey have answered ok, so you need not again.
The reason i ask, was because ptpcam is new implement, and as can see in chdk wiki pdpcam entry, its outdate.
So i ask, maybe i have miss something, and remote on have now other features too.

the thing pixeldoc2000 find i think sounds good to test.and when he can tell me how i should test on IX1000 Port, i do that.
« Last Edit: 31 / January / 2011, 05:24:02 by Bernd R »
Ixus 1000 HS

Re: CHDK PTP interface
« Reply #401 on: 06 / February / 2011, 13:07:17 »
On SD4000 this works for switching Playback / Record mode:

@pixeldoc2000 :  Any chance you can share a code snippet using this to implement switch_mode_usb() ?

TIA

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: CHDK PTP interface
« Reply #402 on: 11 / February / 2011, 12:04:45 »
@pixeldoc2000 :  Any chance you can share a code snippet using this to implement switch_mode_usb() ?
I only did some quick test using UART console on SD4000. Probably the easiest way would hack a little Canon Basic script. If script does work on other cameras we can implement an alternate switch_mode_usb() for particular cameras.

I'll try to create a Canon Basic test script.

*

Offline reyalp

  • ******
  • 13946
Re: CHDK PTP interface
« Reply #403 on: 12 / February / 2011, 00:23:18 »
@pixeldoc2000 :  Any chance you can share a code snippet using this to implement switch_mode_usb() ?
I only did some quick test using UART console on SD4000. Probably the easiest way would hack a little Canon Basic script. If script does work on other cameras we can implement an alternate switch_mode_usb() for particular cameras.

I'll try to create a Canon Basic test script.
You should be able to do this using eventprocs from lua ? You can even replace the existing switch_mode_usb function if you want...
Don't forget what the H stands for.


*

Offline achillies

  • ***
  • 227
  • SX130IS
Re: CHDK PTP interface
« Reply #404 on: 12 / February / 2011, 18:19:33 »
I hope I don't get on anyones nerves asking for the wine before it's time, but I'm using an SX130IS, with a new and not yet beta CHDK built by Quid.  I have loaded CHDK-Shell, and when I tried to run ptpcamgui, I got a "line 934 _GUICtrlEdit_BeginUpdate function not found" error.  I remarked that line and the rest of the lines in the debugWrite function and could get ptpcamgui to start, but not connect to the camera.  Once I connect the USB cable the camera will not switch out of playback mode.  Any ideas?  (and "just wait" is not necessarily a bad idea)
Don't let the sands of time get in your lunch.

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: CHDK PTP interface
« Reply #405 on: 13 / February / 2011, 00:32:40 »
@waterwingz
After a long night of tinkering around with switch_mode_usb() i figured out my set_control_event() address was wrong. Signature Finder (stubs_entry.S) address is correct.
Since reverting to sigfinder address "ptpcam --chdk" --> mode command does work.

Check your set_control_event() address. Compare your firmware to SD990 or SD4000 to verify your set_control_event() address.

SD4000:
Code: [Select]
ROM:FF895504 set_control_event             ; CODE XREF: sub_FF89570C
ROM:FF895504                                         ; sub_FF89576C:loc_FF8957C0
ROM:FF895504                 AND     R1, R0, #0xFF00 ; Sigfinder OK
ROM:FF895508                 AND     R12, R0, #0x40000000
ROM:FF89550C                 CMN     R0, #1
ROM:FF895510                 MOV     R12, R12,LSR#30
ROM:FF895514                 MOV     R1, R1,LSR#8
ROM:FF895518                 AND     R2, R0, #0xFF
ROM:FF89551C                 MOV     R3, R0,LSR#31
ROM:FF895520                 BXEQ    LR
ROM:FF895524                 CMP     R12, #0
ROM:FF895528                 LDR     R0, =0x3D460
ROM:FF89552C                 BNE     loc_FF89554C
ROM:FF895530                 MOV     R12, #1
ROM:FF895534                 CMP     R3, #0
ROM:FF895538                 LDR     R3, [R0,R1,LSL#2]
ROM:FF89553C                 MOV     R2, R12,LSL R2
ROM:FF895540                 MVNEQ   R2, R2
ROM:FF895544                 ANDEQ   R2, R3, R2
ROM:FF895548                 ORRNE   R2, R3, R2
ROM:FF89554C
ROM:FF89554C loc_FF89554C                            ; CODE XREF: set_control_event_sigfinder
ROM:FF89554C                 STR     R2, [R0,R1,LSL#2]
ROM:FF895550                 BX      LR
ROM:FF895550 ; End of function set_control_event
« Last Edit: 13 / February / 2011, 00:36:09 by pixeldoc2000 »

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK PTP interface
« Reply #406 on: 13 / February / 2011, 03:45:20 »
I got a "line 934 _GUICtrlEdit_BeginUpdate function not found" error... 
Use a current version of the CHDK Shell (3.04).

PTP support need some entry points, set_control_event, PB2Rec and Rec2PB (see also trunk rev. 1018). I don't know if they are available for the SX130.

msl
CHDK-DE:  CHDK-DE links

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: CHDK PTP interface
« Reply #407 on: 13 / February / 2011, 03:58:16 »
I enabled PTP for a570 in CHDK trunk 1055. I tested it with ptpcam from chdkde trunk 572 tools/ptpcam.

Btw, is there currently a way to do what my old luaw command did, i.e. run a script with more than one command and get its result? I know there's been discussion and tests but is any of it in trunk and supported by ptpcam yet? I suppose not?

I do understand the use of your version, but I'd probably either use (my) luar (function () body end)() (not tested) or make another command for
I tested this a bit outside the camera (Ubuntu's Lua) but couldn't cook up a syntax Lua would accept (for defining and running a function inside the return command).


*

Offline rudi

  • ***
  • 129
  • A590IS_101B, SX260HS_100B
Re: CHDK PTP interface
« Reply #408 on: 13 / February / 2011, 05:39:32 »
Hi achillies,

I got a "line 934 _GUICtrlEdit_BeginUpdate function not found" error
Try this:
- close CHDK-Shell
- open "...\CHDK-Shell\guest\ptpCamGui\work\guirevision.txt"
- edit revisionsnumber to a lower value and save it
- start CHDK-Shell again

rudi

Re: CHDK PTP interface
« Reply #409 on: 13 / February / 2011, 10:13:37 »
@waterwingz
After a long night of tinkering around with switch_mode_usb() i figured out my set_control_event() address was wrong. Signature Finder (stubs_entry.S) address is correct.
Since reverting to sigfinder address "ptpcam --chdk" --> mode command does work.

Wow - the SD940 works now.  Was able to use ptpCamGui.exe to switch into shooting mode and take a picture !  I guess we get complacent expecting all stubs to be bracketed by the STMFD /  LDMFD calling convention.

However, using ptpcam.exe --chhd with the mode 1 command puts the camera into shooting mode but the mode 0 command does not put it back into playback mode.  Is this normal ?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics