Difference between revisions of "Reflash.php"
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This script allows initiating camera firmware update from the NFS server. It allows to specify NFS server IP/directory in the GET request as well as the script name. Script uses default values if the parameters ("NFS=" and "SCRIPT=") are not specified. | This script allows initiating camera firmware update from the NFS server. It allows to specify NFS server IP/directory in the GET request as well as the script name. Script uses default values if the parameters ("NFS=" and "SCRIPT=") are not specified. | ||
Here are the usage examples: | Here are the usage examples: | ||
− | http://192.168.0.9 | + | <nowiki>http://192.168.0.9/reflash.php</nowiki> |
− | http://192.168.0.9 | + | <nowiki>http://192.168.0.9/reflash.php?NFS=192.168.0.15:/nfs/latest80/</nowiki> |
− | http://192.168.0.9 | + | <nowiki>http://192.168.0.9/reflash.php?NFS=192.168.0.15:/nfs/latest80/&SCRIPT=nfs_update</nowiki> |
They all do the same as the parameters specified are exactly the same as defaults. | They all do the same as the parameters specified are exactly the same as defaults. | ||
− | The script | + | The script returns XML response with error message or status OK if it went as far as starting remote script on NFS server. After that response camera normally (while executing the default nfs_update script) shuts down web server, writes to flash memory and reboots. It is possible to watch the progress by monitoring log and lock files in the NFS directory on the server (both file names include MAC address/camera serial number). Log file is appended, lock one is created during reflash process and deleted when the software update procedure is finished. |
+ | |||
+ | It is possible to provide a name of a different remote script instead of the nfs_update - i.e the one that will just update some files (with/without reboot), not all the flash memory. |
Latest revision as of 00:18, 22 April 2009
This script allows initiating camera firmware update from the NFS server. It allows to specify NFS server IP/directory in the GET request as well as the script name. Script uses default values if the parameters ("NFS=" and "SCRIPT=") are not specified. Here are the usage examples:
http://192.168.0.9/reflash.php http://192.168.0.9/reflash.php?NFS=192.168.0.15:/nfs/latest80/ http://192.168.0.9/reflash.php?NFS=192.168.0.15:/nfs/latest80/&SCRIPT=nfs_update
They all do the same as the parameters specified are exactly the same as defaults. The script returns XML response with error message or status OK if it went as far as starting remote script on NFS server. After that response camera normally (while executing the default nfs_update script) shuts down web server, writes to flash memory and reboots. It is possible to watch the progress by monitoring log and lock files in the NFS directory on the server (both file names include MAC address/camera serial number). Log file is appended, lock one is created during reflash process and deleted when the software update procedure is finished.
It is possible to provide a name of a different remote script instead of the nfs_update - i.e the one that will just update some files (with/without reboot), not all the flash memory.