CONFIG_SET
Description
Upload the device configuration file to the device's flash. Then, the device will be rebooted.
There are two formats of HTTP form with this URL command. One is the general format applied to most of devices. The other one is only used in the Multi-Channel Encoders. These two formats are described below.
The format of this URL http://172.16.3.14/cgi-bin/update?USER=Admin&PWD=123456&CONFIG_SET is listed below.
Stage 1: Send this URL to the device for configuration file upload
ASCII FORMAT
GET /cgi-bin/update?USER=admin&PWD=123456&CONFIG_SET HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: zh-tw
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 172.16.3.14
Connection: Keep-AliveHex Dump Format
Stage 2 : Device reply the URL
ASCII FORMAT
HTTP/1.0 200 OK
Content-type: text/html
<html><head><title>UPLOAD FILES</title></head>
<meta http-equiv="PRAGMA" content="NO-CACHE"><body>
<form name="UPLOAD_FORM" method="POST" enctype="multipart/form-data" action="update?CONFIG_SAVE">
CONFIG : <input type="FILE" name="CONFIG_FILE" value="" size="40">
<br>
<input type="submit" value="Apply" name="URL_FIRMWARE_SUBMIT">
<input type="reset" value="Reset" name="URL_FIRMWARE_RESET">
<br>
</form></body></html>Hex Dump Format
Stage 3: Upload the image file to device and get the return code
ASCII FORMAT
POST /cgi-bin/update?CONFIG_SAVE HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://172.16.3.14/cgi-bin/update?USER=admin&PWD=123456&CONFIG_SET
Accept-Language: zh-tw
Content-Type: multipart/form-data; boundary=---------------------------7d83b918e205b8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 172.16.3.14
Content-Length: 4855
Connection: Keep-Alive
Cache-Control: no-cache
-----------------------------7d83b918e205b8
Content-Disposition: form-data; name="CONFIG_FILE"; filename="C:\Documents and Settings\MingYoung.You\My Documents\update.txt"
Content-Type: text/plain
WAN_TYPE='1'
WAN_IP='192.168.0.100'
WAN_NETMASK='255.255.255.0'
WAN_GATEWAY='192.168.0.254'
WAN_PPPOE_USERNAME=''
WAN_PPPOE_PASSWORD=''
SPEED_WAN='0'....................................................................
ACTIVEX_URL=''
-----------------------------7d83b918e205b8
Content-Disposition: form-data; name="URL_FIRMWARE_SUBMIT"
Apply
-----------------------------7d83b918e205b8--Hex Dump Format
Stage 4: device reply this URL
ASCII FORMAT
HTTP/1.0 200 OK
Content-type: text/plain
Content-Length: 3
OKHex Dump Format
2.Form Format used in the Multi-Channel Encoder
If the CHANNEL=n was not set with this URL to the Multi-Channel device, the router's configuration will be saved to its flash. Otherwise, the channel n video server's configuration will be saved
The format of this URL http://172.16.3.21/cgi-bin/update?USER=Admin&PWD=123456&CONFIG_SET is listed below.
Stage 1: Send this URL to the device for image and MD5 file upload
ASCII FORMAT
GET /cgi-bin/update?USER=admin&PWD=123456&CONFIG_SET HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: zh-tw
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 172.16.3.21
Connection: Keep-AliveHex Dump Format
Stage 2 : Device reply the URL
ASCII FORMAT
HTTP/1.0 200 OK
Content-type: text/html
<html><head><title>UPLOAD FILES</title></head>
<meta http-equiv="PRAGMA" content="NO-CACHE"><body>
<form name="FrmConf" method="POST" enctype="multipart/form-data" action="update?ConfSet00">
Config File : <input type="FILE" name="CONFIG_FILE" value="" size="60"><br>
<input type="submit" value="Apply" name="URL_FIRMWARE_SUBMIT" >
<input type="reset" value="Reset" name="URL_FIRMWARE_RESET" ><br>
</form></body></html>Note: The action string update?ConfigSet00 indicates this is the CONFIG_SET URL for router. The rule of this mapping is
ConfigSetnn
where
nn : the indication of the router, a video server or all video servers.
00 : router,
<= : Maximum Channel : the channel nn video server,
= : Maximum Channel + 1 : All video servers.Hex Dump Format
Stage 3: Upload the image file to device and get the return code
ASCII FORMAT
POST /cgi-bin/update?ConfSet00 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://172.16.3.21/cgi-bin/update?USER=admin&PWD=123456&CONFIG_SET
Accept-Language: zh-tw
Content-Type: multipart/form-data; boundary=---------------------------7d835b156e0708
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 172.16.3.21
Content-Length: 2711
Connection: Keep-Alive
Cache-Control: no-cache
-----------------------------7d835b156e0708
Content-Disposition: form-data; name="CONFIG_FILE"; filename="C:\Documents and Settings\MingYoung.You\My Documents\update.txt"
Content-Type: text/plain
WAN_TYPE='1'
SPEED_WAN='0'
WAN_IP='192.168.0.100'
WAN_NETMASK='255.255.255.0'
WAN_GATEWAY='192.168.0.254'
WAN_PPPOE_USERNAME=''
WAN_PPPOE_PASSWORD=''....................................................................
###End
-----------------------------7d835b156e0708
Content-Disposition: form-data; name="URL_FIRMWARE_SUBMIT"
Apply
-----------------------------7d835b156e0708--Hex Dump Format
Stage 4: device reply this URL
ASCII FORMAT
HTTP/1.0 200 OK
Content-type: text/plain
Content-Length: 3
OKHex Dump Format
Input Argument
None
Attribute
Return of Message
OK
or
ERROR: config image
Applicability
Status
Valid
See Also
Example
http://ip:port/cgi-bin/update?USER=Admin&PWD=123456&CONFIG_SET
or
http://ip:port/cgi-bin/update?USER=Admin&PWD=123456&CHANNEL=n&CONFIG_SET (for CHANNEL=n video server in the Multi-Channel Encoder)
Back to