[Elphel-support] how to save parameters for after restart?

Andrey Filippov andrey at elphel.com
Thu Nov 18 01:40:48 PST 2010


Akos,

At the startup time the
/usr/html/autocampars.php --init
is executed, it uses /etc/autocampars.xml file to read the default
parameters.
If you use the web interface (http://192.168.0.9/autocampars.php) it will
allow to edit and save several sets of startup parameters, it also takes
care of correctly synchronizing the camera jffs file system, you do not need
to issue "sync" after writing parameters to the flash.
Additionally when the parsedit.php is launched (from the autocampars.php or
directly) the parameter names have "tooltips" if you put the mouse cursor
over the parameter name it would show short description of the parameter.

Camera symbolic parameters are defined in a single file -
http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/os/linux-2.6-tag--devboard-R2_10-4/include/asm-cris/elphel/c313a.h?view=markup

And their names and absolute addresses are exported to PHP extension, so
when you use them from the PHP script, the program will remain current even
after the parameters change their absolute indexes (and that happens rather
often).

You can launch the php script from the command line, but it may be faster to
use
wget "http://127.0.0.1/yourscript.php"
as there are 3 (unless you modify lighttpd.conf)  instances of the PHP ready
to interpret the scripts immediately (using FastCGI). If you just launch the
CLI version of php with
php yourscript.php
or include
#!/usr/bin/php
in the script body, then it will take a second or two to load and launch the
php interpreter.

BTW, there is phpshell.php (it is linked from the camera home page, but you
might miss it as you missed the autocampars.php link there). With that you
may have shell emulation in the browser, no need to enter login/password.

You may also include shell command in the url:
http://192.168.0.9/phpshell.php?command=reboot+-f

Andrey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20101118/aa609163/attachment-0002.html>


More information about the Support-list mailing list