Thanks. I meant mentioning the "black screen" issue on chdkptp's wiki.
As you point out the "possible interference" is mentioned, just that the actual behaviour that shows that something is interfering (ie: "black screen") is not mentioned.
Good point. I've adjusted the wiki.
It is another instance of chdkptp, since I use it in scripting (or with the python wrapper), when it fails I cannot use the same session that is blocked.
In that case, killscript should take care of whatever script is running, although depending why the other client hung, there may be other problems. Debugging the hang would probably be better than relying on killscript.
Note that the PTP implementation on these cameras (in the Canon firmware as well as CHDK) can only handle one session at a time.
Ok, about that, I just did more tests, in case it helps.
In interactive mode if I do:
1) rec
2) shoot
3) play
4) go to 1)
I can repeat the sequence many times. The lens retracts with every call to "play".
If I do:
1) rec
2) play
3) go to 1)
I can repeat the sequence many times. The lens retracts with every call to "play".
But if I do:
1) rec
2) wait until camera power off (display turns off)
3) play
the lens retracts but the screen stays black and the led will blink periodically.
Good debugging work. Then my suggestion is "don't do that"
CHDK is a hack, and the PTP mode switching stuff is particularly hacky.
You could try sending a scripted key press wake the camera up before going to play. I'd suggest a small delay in between.
So the camera will eventually shut itself off completely? Because I'm trying to maximize run time by reducing power usage. Do you guys have any suggestions?
There are two or three stages in Canon power saving, which vary some depending on the model
1) Display and sensor turns off
2) Lens retracts, camera goes to play mode
3) Camera physically powers off.
There should be some settings to control them in the Canon menu, and they should be described in your camera manual. Again, these will vary some by model.
As far as saving power saving goes, this thread
http://chdk.setepontos.com/index.php?topic=9049.0 and the older threads linked from it should give you an idea. Generally speaking, display + sensor off is pretty good, play is probably a bit better.
On some cameras, you can use a button press to trigger #1 without waiting for the delay. This may be the "disp" button (mostly on cameras with an optical viewfinder) or a "sleep" function that can be assigned in the canon firmware.
You can also use CHDK set_lcd_display() to turn off the display, but this does not turn off the sensor so will save less power than the sleep mode.
Because I see two solutions then:
1) use 'shoot' so that the file is saved on the camera and retrieve it later (or use a wifi sd card to get it automatically)
2) do not go back to 'play' (which I was doing to save battery), let the camera power down by itself (like it seems to do) and just issue a "press('half_shoot')" or something to wake it up before using it again.
Either of these should work, though note "power down" is really a sleep mode, not an actual power off.
You can use shoot -dl to shoot and download. shoot -dl -rm will shoot, download and delete, but will probably cause the same problems when you try to switch to play. You can probably delete the images after you switch to play with imrm.