Locking down CHDK and scripts - General Discussion and Assistance - CHDK Forum

Locking down CHDK and scripts

  • 3 Replies
  • 3262 Views
Locking down CHDK and scripts
« on: 10 / December / 2017, 11:27:28 »
Advertisements
I want to run CHDK and scripts, but once I've set all the 'variables' I want to lock down the camera so that settings cannot be easily changed in the field. The camera is powered, goes straight to CHDK and a script and nobody can fiddle in either settings menus?

Are there configuration files on the card I can write protect and would that work?  Thanks

Re: Locking down CHDK and scripts
« Reply #1 on: 10 / December / 2017, 11:39:03 »
I want to run CHDK and scripts, but once I've set all the 'variables' I want to lock down the camera so that settings cannot be easily changed in the field. The camera is powered, goes straight to CHDK and a script and nobody can fiddle in either settings menus?

Are there configuration files on the card I can write protect and would that work?
It may be that you can set the CHDK config files ( A/CHDK/*.CFG ) to be write protected using your PC. Reyalp can comment on that - or you could just try it.  CHDK may barf if it can't change the files as a result - again, it's a "try it and see" thing.

A different (better?) suggestion might be to just disable all the key functions in your script.  As discussed elsewhere today, when a script is running, it "owns" all the keys, including the shutter button if it so desires.  So just write your script (or modify someone else's) to trap the shutter button ( i.e set_exit_key( "no_key" ) ) and not respond to any other keys. Once you have done that, there is only a brief window during the camera startup where someone might be able to intercept an autostarted script.

Advanced topic : add code to detect a "magic key sequence" that aborts the script.
« Last Edit: 10 / December / 2017, 11:40:34 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Locking down CHDK and scripts
« Reply #2 on: 10 / December / 2017, 12:41:34 »
Thanks, That seems to work for CHDK config A/CHDK/*.CFG and A/CHDK/DATA/ULTIMATE.0 The config data appears to be copied to volatile ram at boot because you can change the menu options on the fly. But after a power up reboot, the config is as set on the locked files. Yes, disabling controls would be a smart software way, but there would have to be a secret backdoor of key presses for an 'authorised' user to make changes.

Locking down is an interesting topic because there are so many controls now it's easy to have things working nicely, then screw everything up when you don't have a manual handy. I have this problem with my Nikon DSLR, but they like Canon have custom 'user' configs which can be saved to a PC or the memory card and brought back.

I was also looking for a nice text or inf  file in CHDK with a human readable table I could edit on PC, but it's not like that. When I tried to change the ISO settings in CHDK to high values over 1000, it's a very long slow key press to get it there and editing a file would be quicker. Now I know I can write protect the config, I only have to spend time getting that right once as a work around.

Re: Locking down CHDK and scripts
« Reply #3 on: 10 / December / 2017, 12:49:40 »
Thanks, That seems to work for CHDK config A/CHDK/*.CFG and A/CHDK/DATA/ULTIMATE.0 The config data appears to be copied to volatile ram at boot because you can change the menu options on the fly. But after a power up reboot, the config is as set on the locked files.
Good to know - thanks.

Quote
Yes, disabling controls would be a smart software way, but there would have to be a secret backdoor of key presses for an 'authorised' user to make changes.
Easy to do in a script.

Quote
Locking down is an interesting topic because there are so many controls now it's easy to have things working nicely, then screw everything up when you don't have a manual handy. I have this problem with my Nikon DSLR, but they like Canon have custom 'user' configs which can be saved to a PC or the memory card and brought back.
You can of course copy the good *.cfg files from your SD card to your PC and restore them later.

Quote
I was also looking for a nice text or inf  file in CHDK with a human readable table I could edit on PC, but it's not like that.
Somewhere there is an editor you can use on your PC to play with at least some of the .cfg files.  I'll look for a link.

edit : http://zenoshrdlu.com/cfgedit/chdkcfgedit.html

Quote
When I tried to change the ISO settings in CHDK to high values over 1000, it's a very long slow key press to get it there and editing a file would be quicker.
Ah,  there is another "not so secret" trick you need to know.  When editing a value in the CHDK menus, use the camera's zoom lever to move between the digits of the value you are trying to change.  Two clicks of the zoom lever to the right move the "cursor" so that each press of left or right arrow keys changes the value by 100 rather than 1 for example. 

See the second blue info box here : CHDK Manual : Main Menu
« Last Edit: 10 / December / 2017, 13:45:04 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal