CHDKPTP with Auto-file-transfer-to-PC for the S90 - Developmental VersionAttached
r291.zip is my Win32 developmental version of CHDKPTP optimized for the S90. The stock version allows you to manually save your shot image files on your SD card from the FILES tab. This version has an additional function
myshoot() in the Lua code that makes CHDKPTP behave more like Canon's RemoteCapture for shoot and automatic file transfer to your PC. The function is S90-specific, but you should be able to get it to work with your camera with some minor mods in case it doesn't out-of-box (follow the code thread).
File transfer timing for the
myshoot() function is presently set up for a C10 fast SD card -- highly recommended -- I use Duracell C10s.
You need CHDK working on your camera already. Please refer to the wiki in case you don't.
STEP 1
Download and install libusb. Note that when you install this USB driver, you'll be asked to "register" each camera you want to use with CHDKPTP to libusb, via an intermediate file. That's the normal route. The important thing to keep in mind whatever camera you register with libusb, Canon software will no longer see it. There is a way of unregestering a camera but I don't know how to do it.
http://sourceforge.net/projects/libusb-win32/files/More info here:
http://sourceforge.net/apps/trac/libusb-win32/wikiSTEP 2
Install the CHDKPTP
r291 folder anywhere and launch the
start.bat file. You get a DOS window and CHDKPTP screen.
> Make sure you set your Canon menus scrolling tips (if you have) to OFF, and in the CHDK menu "Disable LCD Off" to "Always"
> Plug in your camera.
> Switch to the LIVE tab.
> Check all the boxes except "Viewfinder 1:1" (play with it later once all's fine)
> Press CONNECT (upper right) and you should see your PLAY mode viewfinder (Canon RemoteCapture can't do this).
> Press REC and you get the liveview from the CCD in your camera.
> Try pressing the SHOOT button. This will take a shot at the current settings in your camera.
> Go to the FILES tab, right-click and choose REFRESH.
> Your new image(s) should appear under DCIM/ folder (you can right-click, select one-at-a-time and download to your PC)
> Next right-click and delete all the subfolders in DCIM/, making sure DCIM/ is empty.
> From the mode dropdown, choose M for manual.
> Set your liveview ISO value with the usual "Set" process (CHDKPTP set button etc, up, down left right etc as needed).
> Before exiting Set mode, highlight the ISO### icon in the upper left corner of the OSD.
> In the command execution window try the function (the ! is important):
!myshoot(1,5.6,1600,"C:\\CANON_S90\\") > This will temporarily override the exposure settings in your camera, take the shot, transfer the file(s) to PC and delete them from DCIM/. You can monitor file transfer activity in the CONSOLE tab.
The syntax is
myshoot(Tv, Av, Sv, "destdir").
destdir is created on your PC if it doesn't exist and cannot contain spaces, otherwise the folder string gets truncated at the first space.
Tv is the shutter open time in seconds (eg
1/125 or
2 are valid values and correctly shown in EXIF).
Av is the aperture value (f-stop) in the range of your camera (eg
2 or
5.6 are valid values and correctly shown in EXIF).
Sv is the sensitivity value (ISO) you want to expose at. The function converts the Sv parameter to the Canon marketing value, so both EXIF and exposure are consistent between say SHOOT at a Canon setting of ISO 100 (equivalent to pressing the camera release) and
myshoot(..., ..., 100, ...). This code also displays free memory in the camera to the DOS window after every myshoot() call. Once you're down to about 200k, you can get a malloc fail (out of memory error) due to a (minor) Canon memory leak on each shot. On an S90 with ~900kB initial freemem I can get about 4000 shots before needing a camera reboot.
IMPORTANT NOTESmyshoot() takes the shot at the specified exposure values temporarily overriding your camera settings and transfers the new image files to destdir on your PC (Canon RAWs, CHDK RAWs, and/or JPGs, whatever you have set). It does that by an intermediate write to the SD card and then file move to the PC. If there are any other older image files on your SD card, it moves them as well. Hence it's best to start with a blank DCIM folder on your SD card to avoid getting confused. It might be a good idea to dedicate one SD card just for remote shooting. When CHDKPTP is connected with your camera the <Alt> button may appear dead: you often have to press the <Alt> button a few times before CHDK responds.
At present the only camera I support and offer (very limited) help with is the S90. If you manage to get myshoot() to work for your camera, please post the code on this thread.
Good luck!
=============== FAQ ===============Q. What versions of Windows OS can be used?
The ZIP I posted is for WinXP. I have it running on an old WinXP laptop with USB 1.0. But, with USB 1.0 you can't get more than 1 fps. With USB 2.0 on a 2 GHz machine (laptop or desktop) you can hit a nice smooth 15 fps (set Target FPS to 20 or more). However, if you see a nuisance horizontal tearing when you pan your camera, it means your CHDK firmware does not have the "tearing" fix the S90 versions have. Put an APB request on the forum and someone can update your camera code for the fix. If it works on WinXP, it should work on all of the Wins. Try it.
Q. How much memory is needed?
Very little. My laptop has 500 KB RAM and it works perfectly, but recall with USB 1.0 you'll only get 1 fps.
Q. Can CHDKPTP be used on other operating systems?
I think yes. However, these are the kind of questions I can't give you effective help on. There is info on the CHDKPTP wiki about incarnations for other O/Ses. Look around there first. If not, start a thread and someone should be able to help you. Since the one in the ZIP is a WinXP app, I am pretty certain it won't work on ME, and it won't work on DOS for sure. If you install an O/S incarnation of EXE files different than my ZIP, look for the text file differences (bat files and Lua files only) and replace the appropriate files from my ZIP in your O/S incarnation. It should be safe to replace all the Lua files with those in my ZIP.