although 10k is a better number, it would only give me 3 days between downloads.so it appeares that a dedicated computer to save the images is unavoidable.unless bypassing the check works naturally.
I could use that same pack to power a laptop so they both keep running....although a lot shorter.
that might not be needed if it is possible that the cam resorts to saving on the sd card when the usb fails.
set_record(0) sleep(10000) set_record(1)while not get_mode() do sleep(10)end
Whipped up an old laptop to test and after following the instruction https://app.assembla.com/spaces/chdkptp/wiki/Install i got stuck close to the finish Just tried sudo bash chdkptp.sh on a fresh ubuntu install, but at this moment i get error while loading shared libraries libusb-0.1.so.4...cannot open/no such file or directory....it has been a while for me on a linux machine....hopefully in a day or so i've got it working.advice is appreciated.
I assume that i cannot prevent it from going to play.
should I get the script to go back to shoot after the usb cable is connected instead of pausing when it shifts to play or is there a smarter solution?
if (get_usb_power(1)==1) then-- switch_mode(PLAYBACK) set_config_value(121,0) -- USB PTP enable sleep(10000) -- for 10 sec. set_config_value(121,1) -- USB PTP disable while not get_mode() do sleep(100) end-- switch_mode(SHOOTING) sleep(1000) end
however when i then run the script that sets ptp open for 10 seconds after each shot i get a connection error and no images will be downloaded (you see the timer next to the connect button disappear and reappear for 10sec)
(you see the timer next to the connect button disappear and reappear for 10sec)
if i time a connect and download when it turns to play i get this ERROR: no matching device no camera connected.
pausing the script does not work.
i can code the script to end when usb is detected, could i use chdk autostart for that in some way. f.i. start after 10 seconds in play or should that be triggered by chdkptp?
or do we have a better method?
If I run the script without changing to play for download i can have live view while the script records to the sd card, pushing download just states it does not work because a script is already running.
By "set ptp open" you mean disabling USB remote? Trying to synchronize this 10 second window with a process on the PC seems quite difficult to me.
I'm not clear what this refers to, there should not be anything like a timer next to the connect button in the chdkptp UI. The only thing next to connect button should be a dropdown, which contains a list of available devices.
This error means just what it says, the PC for whatever reason doesn't see any compatible devices. It won't see it while the USB remote setting is active, and it takes some small amount of time to notice after a camera is connected.I don't understand what "pausing the script" means?
You can run a camera-side script from chdkptp, as described in https://chdk.fandom.com/wiki/Lua/PTP_ScriptingHowever, you have to set all the variables corresponding to the menu settings yourself. In the latest SVN of chdkptp, there is a module which can parse the script header and saved settings files to generate the appropriate glue.Not necessarily better, but your camera side script can communicate with a chdkptp script using read_usb_msg and write_usb_msg. In particular, this means the chdkptp side could indicate when it's done. The camera side could provide information about files to be downloaded.If you know the exact filenames you need to download (from your log file, or reported from your script using usb msg), then you can download while the script is running, using the -nolua option in the CLI download command, or using con:download or con:imglist_download in chdkptp Lua.
If you're talking about the GUI download button, that requires camera-side script to identify files to download.
Yes, i set the script to disable usb remote after each shot assuming that i could only download when the camera is in play mode.If that is a wrong assumption, correct me, because i could do without all that switching between play and shoot.
And yes, it was hard to time, since that 10 seconds only are 6 or 7 after the cam is connected. But as i understand now it would never work because the script is paused and the download button in the gui request a file lookup on the cam.
-- wait for a device to appearwhile #chdk.list_usb_devices() == 0 do sys.sleep(100)end-- camera has appeared, connect to itcli:execute('connect')-- get the list of files to download-- download the files -- tell the camera script the download is done and it can reset the remote bit and resume shooting
it does not see any compatible device because the script is still running on the camera, it has only disabled usb remote and is now sleep(10000) until it will enable usb remote and go back to shooting.
-i know the file names for each folder: starting with: IMG_0001.JPG until: IMG_XXXX.JPG (this can be anywhere from 2 to 2000, if there is no reboot or other disruption:2 folders per day one of 2000 the other 880),
Started by jjudd General Help and Assistance on using CHDK stable releases
Started by flarg General Discussion and Assistance
Started by CanonBlue General Help and Assistance on using CHDK stable releases
Started by d10 General Discussion and Assistance
Started by danx88 Script Writing