I've built CHDK binaries of trunk 926 with PTP patches for a570 (both 100e and 101a). They are based on mweerden's PTP proposal patch, ported to a570. I didn't make a special vanilla build for publication so these binaries have some of my patches and selections applied to them in addition to the PTP stuff. Download (binaries+diffs) available at
http://drop.io/a570_chdk_ptp.
The binaries were authored this way:
1) patch -p0 < ptp_proposal-20100721-mweerden.patch
The patch is for trunk rev 913 but it applies fine to trunk 926.
2) applied my old changes from
http://chdk.setepontos.com/index.php/topic,4338.msg42384.html#msg42384 but this time I also wrote an implementation of the switch_mode_usb() rec/play switching command because set_record(true) in Lua seemed to cause a crash after shoot() command right after switching to rec if camera was originally powered on to rec mode with DNG enabled. So, I added entry points for PB2Rec, Rec2PB and DisableNotificationPTP for a570 100e and 101a to make it work and modified camera.h too. See a570_ptp.patch (to be applied after the ptp proposal patch).
3) added my localbuildconf.inc (removes curves, calendar, sokoban, mastermind, enables native calls in Lua):
# disabled components (overrides buildconf.inc)
OPT_GAME_SOKOBAN=
OPT_GAME_MASTERMIND=
OPT_CURVES=
OPT_CALENDAR=
# enabled components (overrides buildconf.inc)
OPT_LUA_CALL_NATIVE=1
4) added some of my patches (full zebra osd restore, add continuous mode tv adjustment, fix debug mem browser for vxworks cams, greatly reduce battery voltage display filtering) and built using gcc 3.4.6.
Example usage:
1) Power on camera with USB cable attached and rec/play switch in 'play' position.
2) Connect PTP from a PC using 'ptpcam --chdk'
3) send commands such as
upload something.lua A/CHDK/SCRIPTS/something.lua -- test file upload
lua set_record(true) -- switch to REC mode
lua shoot()
lua press("shoot_half"); sleep(2000); press("shoot_full"); sleep(10); release("shoot_half"); release("shoot_full")
lua set_record(false); sleep(3000); shut_down() -- switch to PLAY mode and power off
If you need to power on the camera remotely, you need to use the power button permanently taped down trick and toggle external power supply to power on.
In the patch there is an alternative command for rec/play switching:
lua switch_mode_usb(0) -- switch to PLAY mode
lua switch_mode_usb(1) -- switch to REC mode
These may or may not be required for crash free mode switching in some cases (possibly PLAY->REC switching if camera was powered on to REC mode instead of PLAY mode; you may want to do that if it turns out that playing around in REC mode with rec/play lever in play position causes trouble with some Canon or CHDK features). But these commands may also fail to work (they may bounce back to the mode you tried to get away from). More testing required.