Difference between revisions of "Reflash.php"

From ElphelWiki
Jump to: navigation, search
 
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:
  <nowiki>http://192.168.0.9:81/reflash.php</nowiki>
+
  <nowiki>http://192.168.0.9/reflash.php</nowiki>
  <nowiki>http://192.168.0.9:81/reflash.php?NFS=192.168.0.15:/nfs/elphel353-2.10/</nowiki>
+
  <nowiki>http://192.168.0.9/reflash.php?NFS=192.168.0.15:/nfs/latest80/</nowiki>
  <nowiki>http://192.168.0.9:81/reflash.php?NFS=192.168.0.15:/nfs/elphel353-2.10/&SCRIPT=nfs_update</nowiki>
+
  <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 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.
 
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.
 
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.
 
 
----
 
Note: this script can't work from the default http port (80) - so be careful with URL for the web request.
 
Update: New version of the reflash.php verifies it is run through the correct server.--[[User:Andrey.filippov|Andrey.filippov]] 19:39, 19 November 2007 (CST)
 

Latest revision as of 01: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.