IVS400 provides a set of pre-define CGIs to do the request and communication between the IVS400
WebServer and browser, user
1 How to change the settings of IVS400
When the predefined HTTP requests be sent to Videoserver. After camera receives the requests, it
changes the corresponding settings. For example, if user wants to add another user named Camera,
whose password is success, the HTTP request should be sent as below:
(Suppose that the IP of videoserver is 192.168.0.1)
Videoserver would send the response to the client, which is probably not what the HTML makers
require. "RedirectUrl" is supported in some HTTP request, and the responding web page can be
redirected to the address specified by "RedirectUrl".
Suppose that browser should be switched to "http://192.168.0.1/Show.htm" after a user was added, the
HTTP request should be:
User can get current camera status by calling GetStatus.cgi. To get other status or settings, the
corresponding requests can be send to the camera HTTP server. For example, if user wants to get the
users list of Videoserver, user can visit:
http://192.168.0.1/GetUser.cgi
A character string of users list will be returned.
However, it is not well formatted. The users list can be formatted, and be shown well formatted.
Considering this feature, a JavaScript text so that HTML can show the text in various ways is also
supported. V isit:
http://192.168.0.1/GetUser.cgi?JsVar=sUserList
(Here sUserList can be replaced by other value). The JavaScript text returned is as the below:
sUserList='administrator\nCamera\n'; in HTML:
<html> <head> <script src="/GetUser.cgi?JsVar=sUserList"></script> </head> <body> <script>
alert(sUserList); </script> </body> </html>
Further more, a feature named "OnJs" is also support,
eg:
http://192.168.0.1/GetUser.cgi?JsVar=sUserList&OnJs=MyFun
The JavaScript text returned is as the below:
sUserList='administrator\nCamera\n'; MyFun(this);
It's maybe helpful in case that user want call a function immediately after he get the settings.
3 IVS400 Supported CGIs
3.1 Camera Control CGIs for Camera
Control to control the camera setting change resolutions, etc.
ChangeResolution.cgi Change resolution of camera's images.
ChangeCompressRatio.cgi Change quality of camera's images.
ChangeBrightness.cgi Change brightness of camera's images.
ChangeContrast.cgi Change contrast of camera's images.
ChangeSaturation.cgi Change saturation of camera's images.
ChangeHue.cgi Change hue of camera's images.
ChangeSharpness.cgi Change sharpness of camera's images.
ChangeAECFrequency.cgi Change sensor's frequency.
SetChannel.cgi Change Videoserver's channel.
GetCapability.cgi Get Videoserver's capability, such as max brightness’ level, max sharpness level, etc.
SetMotionDetect.cgi Enable or disable motion detect.
SetMonitorRect.cgi Set the rectangle for motion detect.
MoveCamera.cgi Move camera in the specified direction.
3.2 User Management CGIs
User Management CGIs to add user account, delete user account, change password.
GetMyself.cgi Get the username who sent this HTTP request.
SetUser.cgi Add a user or change the password for existed user.
DelUser.cgi Delete a user account.
GetUser.cgi Get the users list of Videoserver.
SetUserCheck.cgi Enable or disable user authorization check.
3.3 Email CGIs
CGIs use for setting and getting the e-Mail configuration.
SetMail.cgi Configure email for sending motion-detected images.
GetMail.cgi Get email setting for send motion-detected images.
3.4 FTP CGIs
CGIs use for setting and getting the FTP configuration.
SetFtp.cgi Configure FTP for sending motion-detected images.
GetFtp.cgi Get FTP setting for send motion-detected images.
3.5 Time CGIs
CGIs use for setting and getting the time information configuration.
SetTime.cgi Set time zone and time.
GetTime.cgi Get current Videoserver's time zone and time.
3.6 Network CGIs
CGIs use for setting and getting the networking configuration, including the setting of connection to
LAN, Wireless LAN, and PPPoE through the ADSL modem.
SetIP.cgi Tell Videoserver how to set an initial IP.
GetIP.cgi Get IP settings.
SetWlan.cgi Change settings for wireless LAN.
GetWlan.cgi Get settings for wireless LAN.
PPPoE.cgi Set/Get PPPoE information or connect with PPPoE.
SetDDNS.cgi Set parameters for updating dynamic DNS.
GetDDNS.cgi Get current dynamic DNS settings.
3.7 HTTP Server CGIs
CGIs use for setting and getting the HTTP listening port configuration.
SetHttp.cgi Set the parameters for HTTP server (Currently only tcp port).
GetHttp.cgi Get HTTP server's settings.
3.8 Other CGIs
CGIs use for setting and getting the name of IVS400, get IVS400 status, and system functions.
SetName.cgi Set camera's name.
GetName.cgi Get camera's name.
GetStatus.cgi Get run-time status of Videoserver.
GetLog.cgi Get Videoserver's system logs information.
GetVer.cgi Get Videoserver's version.
SetFactoryDefault.cgi Change all settings to factory-default.
Reboot.cgi Reboot Videoserver.
GetData.cgi Get images/status with "multipart/x-mixed-replace" mime-type.
GetAddioData.cgi Get audio stream.
Cmd.cgi Use this command to combine several commands to a single http request, that is, user can call
two or more commands through Cmd.cgi.
4 Detailed description
4.1 ChangeResolution.cgi
Description Change resolution of camera's images. (administrator privilege required)
Grammar /ChangeResolution.cgi?ResType=value[&RedirectUrl=sUrl]
Remark Now Camera USB camera supports 4 types of resolution: 0 - {176, 144} 1 - {352, 288} 2 {320, 240} 3 - {640, 480}
Example
<html> <form action=/ChangeResolution.cgi> Resolution: <select name=ResType> <option
value=0>176 * 144</option> <option value=1>352 * 288</option> <option value=2>320 *
240</option> <option value=3>640 * 480</option> </select><br> <input type=submit value=OK>
</form> </html>
4.2 ChangeCompressRatio.cgi
Description Change quality of camera's images. (administrator privilege required)
Grammar /ChangeCompressRatio.cgi?Ratio=value[&RedirectUrl=sUrl]
Remark Ratio: 0 - common quality 1 - high quality
Example
<html> <form action=/ChangeCompressRatio.cgi> Quality: <select name=Ratio> <option
value=0>Common</option> <option value=1>High</option> </select><br> <input type=submit
value=OK> </form> </html>
4.3 ChangeBrightness.cgi
Description Change brightness of camera's images. (administrator privilege required)
Grammar /ChangeBrightness.cgi?Brightness=value[&RedirectUrl=sUrl]
Remark Now Camera USB camera supports 256 level of brightness, and the corresponding value of
Brightness is from 0 to 255. To set default value, set Brightness to -1.
Example
<html> <form action=/ChangeBrightness.cgi> Brightness(0-255): <input name=Brightness><br>
<input type=submit value=OK> </form> </html>
4.4 ChangeContrast.cgi
Description Change contrast of camera's images. (administrator privilege required)
Grammar /ChangeContrast.cgi?Contrast=value[&RedirectUrl=sUrl]
Remark Now Camera USB camera supports 5 level of contrast, and the value of Contrast is from 0 to
255, which is mapped linearly to 5 levels. To set default value, set Contrast to -1.
Example
<html> <form action=/ChangeContrast.cgi> Contrast(0-255): <input name=Contrast><br> <input
type=submit value=OK> </form> </html>
4.5 ChangeSaturation.cgi
Description Change saturation of camera's images. (administrator privilege required)
Grammar /ChangeSaturation.cgi?Saturation=value[&RedirectUrl=sUrl]
Remark Now Camera USB camera supports 11 level of saturation, and the value of Saturation is from
0 to 255, which is mapped linearly to 11 levels. To set default value, set Saturation to -1.
Example
<html> <form action=/ChangeSaturation.cgi> Saturation(0-255): <input name=Saturation><br>
<input type=submit value=OK> </form> </html>
4.6 ChangeHue.cgi
Description Change hue of camera's images. (administrator privilege required)
Grammar /ChangeHue.cgi?Hue=value[&RedirectUrl=sUrl]
Remark Now Camera USB camera supports 11 level of hue, and the value of Hue is from 0 to 255,
which is mapped linearly to 11 levels. To set default value, set Hue to -1.
Example
<html> <form action=/ChangeHue.cgi> Hue(0-255): <input name=Hue><br> <input type=submit
value=OK> </form> </html>
4.7 ChangeSharpness.cgi
Description Change sharpness of camera's images. (administrator privilege required)
Grammar /ChangeSharpness.cgi?Sharpness=value[&RedirectUrl=sUrl]
Remark Now Camera USB camera supports 5 level of sharpness, and the value of Sharpness is from 0
to 255, which is mapped linearly to 5 levels. To set default value, set Sharpness to -1.
Example
<html> <form action=/ChangeSharpness.cgi> Sharpness(0-255): <input name=Sharpness><br>
<input type=submit value=OK> </form> </html>
4.8 SetChannel.cgi
Description Change Videoserver's channel. (administrator privilege required)
Grammar /SetChannel.cgi?Channel=iChannel[&RedirectUrl=sUrl]
Remark
The parameter "Channel" contains two parts, and one is the mode value, the other is the channel value.
E.g., if you set mode value to 256, and set channel value to 12, you should call this CGI like
below:(256+12=268) /SetChannel.cgi?Channel=268. The mode value maybe 0(Fixed mode) or
256(Round robin mode). If mode value is 0(Fixed mode), the range of channel value is [0, 3]. (From 0
to 3) if mode value is 256(Round robin mode), the range of channel value is [1, 15]. (From 1 to 15)
Example
<html> <script> function sm(o) { iChannel = parseInt(o.c.value, 10); if (isNaN(iChannel))
{ alert("You must input a number"); return false; } if (o.m.value == '0') { if (iChannel < 0 || iChannel >
3) { alert("Channel value should be in [0, 3] in fixed mode!"); return false; } } else
<option value=0>Fixed</option> <option value=256>Round robin</option> </select><br>
Channel:<input name=c><br> <input type=hidden name=Channel> <input type=submit value=OK>
</form> </html> { if (iChannel < 1 || iChannel > 15) { alert("Channel value should be in [1, 15] in
round robin mode!"); return false } } o.Channel.value = parseInt(o.m.value, 10) + iChannel; return
true; } </script> <form action=/SetChannel.cgi onsubmit="return sm(this);"> Mode: <select name=m>
4.9 GetCapability.cgi
Description Get Videoserver's capability, such as max brightness’ level, max sharpness level, etc. (no
privilege required)
Grammar /GetCapability.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value.
Example
<html> <script> function ShowResult(o) { alert(sCap); } </script> <script
src="/GetCapability.cgi?JsVar=sCap&OnJs=ShowResult"> </script> </html>
4.10 SetMotionDetect.cgi
Description Enable or disable motion detect. (administrator privilege required)
Grammar
/SetMotionDetect.cgi?[Enable=<true|false>][&Sensitivity=<high|middle|low>][&RedirectUrl=sUrl]
Remark
Parameters Description Enable true : enable motion-detect images,
false: disable motion-detect; Sensitivity Motion-detect sensitivity; Number value is also supported:
0 - high
1 - middle
2 - low.
In the text that GetStatus.cgi returns, bytes 60 ~ 65 (total 6 bytes) shows the different images found by
motion-detect program. Check these bytes, and compare with the previous value, and if these bytes
have changed, motion detected. When system boot up, the initial value is 999999, and after motion
detected, the value increases from 0 to 800000. If it is up to 800000, returns to 0. Bytes 72 of the text
returned by GetStatus.cgi show current motion-detect state. Visit GetMotionDetect.cgi to get the
current setting.
Description Get current motion-detect state. (administrator privilege required)
Grammar /GetMotionDetect.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetMotionDetect.cgi)
Example
<html> <script> function ShowResult(o) { alert(sMotion); } </script> <script
src="/GetMotionDetect.cgi?JsVar=sMotion&OnJs=ShowResult"> </script> </html>
4.12 SetMonitorRect.cgi
Description Set the rectangle for motion detect. (administrator privilege required)
Grammar /SetMonitorRect.cgi?Rect=left,top,right,bottom[&RedirectUrl=sUrl]
Remark left, top, right, bottom are all in the range: >=0 && <10000. The actual resolution of images
should be mapped to (0, 10000). e.g.: To set the 1/4 of the total visual rectangle on the top-left, user
should call request as: /SetMonitorRect.cgi?Rect=0,0,5000,5000 To cancel this feature, call
/SetMonitorRect.cgi?Rect=0,0,0,0 In the text returned by GetStatus.cgi, bytes 40 ~ 55 shows the
monitor rectangle.
Example
<html> <table> <form name=f> <tr><td>Left:</td><td><input id=oLeft></td></tr>
<tr><td>Top:</td><td><input id=oTop></td></tr> <tr><td>Right:</td><td><input
id=oRight></td></tr> <tr><td>Buttom:</td><td><input id=oBottom></td></tr> </form> </table>
<script> function OK(o) { o.Rect.value = document.f.oLeft.value + ',' + document.f.oTop.value + ',' +
document.f.oRight.value + ',' + document.f.oBottom.value; return true; } </script> <form
action=/SetMonitorRect.cgi onsubmit="return OK(this);"> <input name=Rect type=hidden>
<input type=submit value=OK> </form> </html>
4.13 MoveCamera.cgi
Description Move camera in the specified direction. (administrator privilege required)
Grammar
/MoveCamera.cgi?Dir=<Left|Right|Up|Down|LeftUp|LeftDown|RightUp|RightDown|Home|Stop>[Spe
ed=iSpeed][&RedirectUrl=sUrl]
Remark
Parameters Description Dir Moving direction; Home Move to the original position; Stop Stop moving;
Description Get the username who sent this HTTP request. (no privilege required)
Grammar /GetMyself.cgi[?ShowPrivilege=<true|false>][&JsVar=variable[&OnJs=function]]
Remark Videoserver can work in authorization mode or non-authorization mode (SetUserCheck.cgi).
In non-authorization mode, everyone is supposed as administrator and “GetMyself.cgi” returns
“administrator”. If "ShowPrivilege=true", GetMyself.cgi returns: 0 - super user; 1 - common user.
Example
<html> <script> function ShowResult(o) { alert(sMyName); } </script> <script
src="/GetMyself.cgi?JsVar=sMyName&OnJs=ShowResult"> </script> </html>
4.15 SetUser.cgi
Description Add a user or change the password for existed user. (administrator privilege required)
Grammar /SetUser.cgi?User=sUserName&Pass=sPassword <!--[&Privilege=iPrivilege]-->
[&RedirectUrl=sUrl]
Example
<html> <form action=/SetUser.cgi> Username:<input name=User><br> Password:<input name=Pass
type=password><br> <input type=submit value=OK> </form> </html>
4.16 DelUser.cgi
Description Delete a user account. (administrator privilege required)
Grammar /DelUser.cgi?User=sUserName[&RedirectUrl=sUrl]
Example
<html> <form action=/DelUser.cgi method=get> User name:<input name=User><br> <input
type=submit value=OK> </form> </html>
4.17 GetUser.cgi
Description Get the users list of Videoserver. (administrator privilege required)
Grammar /GetUser.cgi[?ShowPrivilege=<true|false>][&JsVar=variable[&OnJs=function]]
Remark Format of returned text:
If ShowPrivilege=false, each line represents a user name. Otherwise, Every two lines represent a user,
and first line is user name, the second is privilege.
Example
<html> <script> function ShowResult(o) { alert(sUserList); } </script> <script
src="/GetUser.cgi?JsVar=sUserList&OnJs=ShowResult"> </script> </html>
4.18 SetUserCheck.cgi
Description Enable or disable user authorization check. (administrator privilege required)
Grammar /SetUserCheck.cgi?Check=<true|false>[&RedirectUrl=sUrl]
Example
<html> <form action=/SetUserCheck.cgi> <input name=Check type=checkbox>enable user
authorization <input type=submit value=OK> </form> </html>
4.19 SetMail.cgi
Description Configure email for sending motion-detected images. (administrator privilege required)
Grammer
/SetMail.cgi?Enable=<true|false>[&MailServer=sServer][&Sender=sSenderName][&Receiver=sRecei
verAddress][&Subject=sSubject][&User=sUserName][&PassWord=sPassword][&CheckFlag=CHEC
K][&RedirectUrl=sUrl]
Remark
Parameters Description Enable true, send motion-detected images,
false, do not send motion-detected images; MailServer Mail server address; Sender Sender’s email
address; Receiver Receiver’s email address, multi-receivers separated by ';'; Subject Subject of email;
User User name to login MailServer; PassWord Password to login MailServer; CheckFlag CHECK,
the MailServer need check password;
When calling SetMail.cgi, the omitted parameters keep the last value, expect that omitting "Enable"
means "Enable=false", and omitting "CheckFlag" means that MailServer do not need a password. Visit
GetMail.cgi to get the current settings.
Description Get email setting for send motion-detected images. (administrator privilege required)
Grammar /GetMail.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetMail.cgi)
Example
<html> <script> function ShowResult(o) { alert(sMailSetting); } </script> <script
src="/GetMail.cgi?JsVar=sMailSetting&OnJs=ShowResult"> </script> </html>
SetFtp.cgi
SetFtp.cgi
Description Configure FTP for sending motion-detected images. (administrator privilege required)
Grammar
/SetFtp.cgi?Enable=<true|false>[&FtpServer=sServer][&User=sUserName][&Pass=sPassword][&Acc
ount=sAccount][&UploadPath=sPathName][&RedirectUrl=sUrl]
Remark
Parameters Description Enable true : upload motion-detected images.
false : do not upload motion-detected images. FtpServer Ftp server address; User User name on ftp
server; Pass Password to login FtpServer; Account Account to login FtpServer (few ftp servers require
this information); UploadPath Path in which images saved on FtpServer;
When calling SetFtp.cgi, the omitted parameters keep the last value, expect that omitting "Enable"
means "Enable=false". Visit GetFtp.cgi to get the current settings.
Example
<html> <form action=/SetFtp.cgi> <table> <tr><td>Ftp Server</td><td><input name=FtpServer
size=32></td></tr> <tr><td>User</td><td><input name=User size=32></td></tr>
<tr><td>Password</td><td><input type=password name=Pass size=32></td></tr>
<tr><td>Account</td><td><input name=Account size=32></td></tr> <tr><td>Upload
Path</td><td><input name=UploadPath size=32></td></tr> <tr>
<td>Upload when motion detected</td> <td> <input name=Enable type=radio value=true>Yes <input
name=Enable type=radio value=false>No </td> </tr> </table> <p><p> <input type=submit
value=OK> </form> </html>
4.21 GetFtp.cgi
Description Get ftp setting for send motion-detected images. (administrator privilege required)
Grammar /GetFtp.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetFtp.cgi)
Example
<html> <script> function ShowResult(o) { alert(sFtpSetting); } </script> <script
src="/GetFtp.cgi?JsVar=sFtpSetting&OnJs=ShowResult"> </script> </html>
4.22 SetTime.cgi
Description Set time zone and time. (administrator privilege required)
Grammar
/SetTime.cgi?UseNtp=<true|false>[&NtpServer=sServer][&Sec1970=value1][&TimeZone=value2][&
RedirectUrl=sUrl]
Remark
Parameters Description UseNtp true - use NTP to set time.
false - set time manually; NtpServer NTP server's address; Sec1970 Seconds since "00:00:00
1/1/1970"; TimeZone Time zone in minutes, e.g.: for Beijing(GMT+08:00), this parameters should be
-480.
Visit GetTime.cgi to get the time information on Videoserver.
Example
<html> <form name=f> <table> <tr><td>Date(mm/dd/yyyy)</td><td><input name=oDate
size=32></td></tr> <tr><td>Time(hh:mm:ss)</td><td><input name=oTime size=32></td></tr>
<tr><td>Time Zone(minutes)</td><td><input name=oTimeZone size=32></td></tr> </table>
</form> <script> var iTimeZone; function GetTimeInSec1970() { var asDate =
document.f.oDate.value.split('/');
if (oAdjustDate == null) { alert("Error date and time format.\n\n" + "Example:\n" + " Date:
11/20/2002\n + " Time: 14:23:32\n + " TimeZone:-480"); return false; } o.Sec1970.value =
Math.floor(oAdjustDate.valueOf() / 1000); delete oAdjustDate; o.TimeZone.value = iTimeZone;
return true; } </script> var asTime = document.f.oTime.value.split(':'); iTimeZone =
parseInt(document.f.oTimeZone.value, 10); if (asDate.length != 3 || asTime.length != 3) return null; for
(var i=0; i<3; i++) { asDate[i] = parseInt(asDate[i], 10); if (isNaN(asDate[i])) return null; asTime[i] =
parseInt(asTime[i], 10); if (isNaN(asTime[i])) return null; } asDate[0]--; if (asDate[0] < 0 || asDate[0]
> 11) return null; if (asDate[1] < 0 || asDate[1] > 31) return null; if (asTime[0] < 0 || asTime[0] >= 24)
return null; if (asTime[1] < 0 || asTime[1] >= 60) return null; if (asTime[2] < 0 || asTime[2] >= 60)
return null; if (iTimeZone <= -720 || iTimeZone >= 720) return null; var oAdjustDate = new
Date(asDate[2], asDate[0], asDate[1], asTime[0], asTime[1], asTime[2]); return oAdjustDate; }
function OK(o) { var oAdjustDate = GetTim eInSec1970(); <form action="/SetTime.cgi"
onsubmit="return OK(this);"> <input name=Sec1970 type=hidden> <input name=TimeZone
type=hidden> <input type=submit value=OK>
</form> </html>
4.23 GetTime.cgi
Description Get current Videoserver's time zone and time. (no privilege required)
Grammar /GetTime.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetTime.cgi)
Example
<html> <script> function ShowResult(o) { var nSecFrom1970 = 0; var nTimeZone = 0; sTime =
sTime.split('\n'); for (var i = 0; i < sTime.length; i++) sTime[i] = sTime[i].split(" = ") ; for (var i = 0; i <
sTime.length; i++) { if (sTime[i].length == 2) { if (sTime[i][0] == "Sec1970") nSecFrom1970 =
parseInt(sTime[i][1], 10); else if (sTime[i][0] == "TimeZone") nTimeZone = parseInt(sTime[i][1],
Description Set the IVS400 initial IP network information. (administrator privilege required)
Grammar
/SetIP.cgi?[Interface=<eth1|wlan0>][&Enable=<true|false>][&IPWay=<manually|dhcp>][&CameraNa
me=sName][&IP=sIP][&Netmask=sNetmask][&Gateway=sGateway][&DNS0=sDNS0][&DNS1=sD
NS1][&DNS2=sDNS2][&RedirectUrl=sUrl]
Remark
If IPWay=manually, IP, Netmask, Gateway, DNS0 ( DNS1, DNS2 ) should also be specified. Visit
GetIP.cgi to get the current setting.
Example
<html> <form action=/SetIP.cgi> <input type=radio name=IPWay value=manually>Manually <table>
<td>IP Address</td><td><input name=IP></td></tr> <tr><td>Subnet mask</td><td><input
name=Netmask></td></tr> <tr><td>Default gateway</td><td><input name=Gateway></td></tr>
<tr><td>DNS 1</td><td><input name=DNS0></td></tr> <tr><td>DNS 2</td><td><input
name=DNS1></td></tr> <tr><td>DNS 3</td><td><input name=DNS2></td></tr> </table> <input
type=radio name=IPWay value=dhcp>Automatically by DHCP<br> <input type=submit value=OK>
</form> </html>
4.25 GetIP.cgi
Description Get IP settings. (no privilege required)
Grammar /GetIP.cgi[Interface=<eth1|wlan0>&][?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetIP.cgi)
Example
<html> <script> function ShowResult(o) { alert(sIPSetting); } </script> <script
src="/GetIP.cgi?JsVar=sIPSetting&OnJs=ShowResult"> </script> </html>
4.26 SetWlan.cgi
Description Change settings for wireless LAN. (administrator privilege required)
Grammar /SetWlan.cgi?[ESSID=sIDString][&Channel=iNumber] [Mode=<Ad-Hoc|Managed>]
[WepSet=<Disable|Asc|K64|K128>] [WepAsc=sAscValue] [Wep64_0=sHexValue_0]
[Wep64_1=sHexValue_1] [Wep64_2=sHexValue_2] [Wep64_3=sHexValue_3] [Wep128=sHexValue]
[WepGroup=iDefaultOfWep64] [&RedirectUrl=sUrl]
Remark
Parameters Description ESSID A string for Access Point ESSID; Channel Integer value, from 1 to 14;
Mode Operation mode; WepSet Way of setting wep keys; WepAsc ASC value of wep keys; Wep64_n
Four groups of 64 bits WEP keys, e.g.: 03040a5d76; Wep128 128 bits WEP keys, e.g.:
0102030405060708090a0b0c0d;
Visit GetWlan.cgi to get the current settings.
Example
<html> <form action=/SetWlan.cgi> <table> <tr><td>ESSID</td><td><input
name=ESSID></td></tr> <tr><td>Channel</td><td><input name=Channel></td></tr> <tr>
<td>Mode</td> <td> <select name=Mode> <option value=Ad-Hoc>Ad-Hoc</option> <option
value=Managed>Infrastructure</option>
</table> <input type=submit value=OK> </form> </html> </select> </td> </tr> <tr> <td><input
name=WepSet type=radio value=Disable checked>Disable</td> </tr> <tr> <td><input name=WepSet
type=radio value=ASC>ASCII</td> <td><input name=WepAsc></td> </tr> <tr> <td><input
name=WepSet type=radio value=K64>64 bits</td> <td></td> </tr> <tr> <td></td> <td>
<nobr>Group 0: <input name=Wep64_0></nobr><br> <nobr>Group 1: <input
name=Wep64_1></nobr><br> <nobr>Group 2: <input name=Wep64_2></nobr><br>
<nobr>Group 3: <input name=Wep64_3></nobr><br> <nobr>Default group: <select
name=WepGroup> <option value>-Select-</option> <option value=0>0</option> <option
value=0>1</option> <option value=0>2</option> <option value=0>3</option> </select>
</nobr><br> </td> </tr> <tr> <td><input name=WepSet type=radio value=K128>128 bits</td>
<td><input name=Wep128></td> </tr>
4.27 GetWlan.cgi
Description Get settings for wireless LAN. (no privilege required)
Grammar /GetWlan.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetWlan.cgi)
Example
<html> <script> function ShowResult(o) { alert(sWlanSetting); } </script> <script
src="/GetWlan.cgi?JsVar=sWlanSetting&OnJs=ShowResult"> </script> </html>
4.28 PPPoE.cgi
Description Set PPPoE or connect with PPPoE. (administrator privilege required)
Grammar
/PPPoE.cgi?Action=Set[&ConnectOnBoot=<true|false>][&User=sUserName][&Pass=sPassword][&
Mail=<true|false>[&MailServer=sServer][&Sender=sSenderName][&Receiver=sReceiverAddress][&
MailUser=sUserName][&MailPassWord=sPassword][&CheckFlag=CHECK]][&RedirectUrl=sUrl]
/PPPoE.cgi?Action=Connect[&ConnectOnBoot=<true|false>][&User=sUserName][&Pass=sPassword
][&Mail=<true|false>[&MailServer=sServer][&Sender=sSenderName][&Receiver=sReceiverAddress
][&MailUser=sUserName][&MailPassWord=sPassword][&CheckFlag=CHECK]][&RedirectUrl=sUrl]
/PPPoE.cgi?Action=GetSetting[?JsVar=variable[&OnJs=function]]
/PPPoE.cgi?Action=GetInfo[?JsVar=variable[&OnJs=function]] /PPPoE.cgi?Action=Disconnect
Remark
Parameters Description Action Set, save settings;
Connect, connect to net;
GetSetting, get current settings;
GetInfo, get current PPPoE state;
Disconnect, disconnect PPPoE; ConnectOnBoot true, connect on booting,
false, not connect; User user name for connect; Pass Password for User; Mail true, send mail to inform
users that PPPoE was connected,
false, do not send mail to inform users that PPPoE was connected. MailServer Mail server address;
Sender Sender’s email address; Receiver Receiver’s email address, multi-receivers separated by ';';
Subject Subject of email; MailUser User name to login Mail Server; MailPassWord Password to login
MailServer; CheckFlag CHECK, the MailServer need check password;
The text what /PPPoE.cgi?Action=GetInfo returns: null, no connecton; If PPPoE is connected, the text
is:
<local ip>\n <remote ip>\n <dns ip1>\n <dns ip2>\n <dns ip3>\n <gateway>\n <netmask>\n
Example
<html> <form action=/PPPoE.cgi> <input type=hidden name=Action value="Connect"> User
name:<input name=User><br> Password:<input type=password name=Pass><br> <input type=submit
value=Dial><br> <input type=checkbox name=Mail value=true>Send a mail after
dialed<br> Mail Server£º<input name=MailServer size=32><br> Mail User:<input name=MailUser
size=32><br> <input name=CheckFlag value=CHECK type=checkbox>Mail Password£º <input
Description Set parameters for updating dynamic DNS. If the parameters are different from the
previous settings or dynamic DNS has not updated or updating dynamic DNS failed, new updating
procedure will be called.(administrator privilege required)
Remark
Parameters Description Enable true, use dynamic DNS,
false, do not use dynamic DNS; User User name on "www.gotdns.org"; Pass Password for the "User";
Proxy Connect dynamic DNS server through an http proxy. If you do not want to use proxy, set the
value to blank; ProxyUser User name for login proxy server; ProxyPass Password for login proxy
server;
Visit GetDDNS.cgi to get the current settings.
Example
<html> <form action=/SetDDNS.cgi> <table> <tr> <td colspan=2> <input type=radio name=Enable
value=true>Enable <input type=radio name=Enable value=false>Disable </td>
</tr> <tr><td>UserName</td><td><input type=text name=User></td></tr>
<tr><td>Password</td><td><input type=password name=Pass></td></tr>
<tr><td>DomainName</td><td><input type=text name=DomainName></td></tr> <tr><td>HTTP
Proxy</td><td><input type=text name=Proxy></td></tr> <tr><td>Proxy Username</td><td><input
type=text name=ProxyUser></td></tr> <tr><td>Proxy Password</td><td><input type=password
name=ProxyPass></td></tr> </table> <p><p> <input type=submit value=OK> </form> </html>
5.3.8.30 GetDDNS.cgi
GetDDNS.cgi
Description Get current dynamic DNS settings. (administrator privilege required)
Grammar /GetDDNS.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetDDNS.cgi)
Example
5.3.8.31 SetHttp.cgi
SetHttp.cgi
Description Set the parameters for HTTP server (Currently only HTTP server (WbServer) listen port).
(administrator privilege required)
Grammar /SetHttp.cgi?Port=iPort[&RedirectUrl=sUrl]
/SetHttp.cgi?Port0=iPort0&Port1=iPort1[&RedirectUrl=sUrl]
Remark
Parameters Description Port, Port0, Port1 The listening port of HTTP server.
User can use one or two listening ports. To use only one port, send request as "SetHttp.cgi?Port=...".
No difference with these two requests:
SetHttp.cgi?Port=8080 SetHttp.cgi?Port0=8080&Port1=0
Visit GetHttp.cgi to get the current setting.
Example
<html> <form action=/SetHttp.cgi> <input name=Port> <input type=submit value=OK> </form>
</html>
5.3.8.32 GetHttp.cgi
GetHttp.cgi
Description Get HTTP server's settings. (no privilege required)
Grammar /GetHttp.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetHttp.cgi)
Example
<html> <script> function ShowResult(o) { alert(sHttpSetting); } </script> <script
src="/GetHttp.cgi?JsVar=sHttpSetting&OnJs=ShowResult"> </script> </html>
5.3.8.33 SetName.cgi
SetName.cgi
Description Set camera's name. (administrator privilege required)
Grammar /SetName.cgi?CameraName=<sName[&RedirectUrl=sUrl]
Remark
SetIP.cgi can also change camera's name. Visit GetName.cgi to get the current setting.
Example
<html> <form action=/SetName.cgi> Camera name: <input name=CameraName> <input type=submit
value=OK> </form> </html>
5.3.8.34 GetName.cgi
GetName.cgi
Description Get camera's name. (no privilege required)
Grammar /GetName.cgi[?JsVar=variable[&OnJs=function]]
Remark Each line represents an item, and every item is in the format as Name = Value. (Refer to
SetName.cgi)
Example
<html> <script> function ShowResult(o) { alert(sName); } </script> <script
src="/GetName.cgi?JsVar=sName&OnJs=ShowResult"> </script> </html>
5.3.8.35 GetStatus.cgi
GetStatus.cgi
Description Get run-time status of Videoserver. (no privilege required)
Grammar /GetStatus.cgi[?JsVar=variable[&OnJs=function]]
Remark "GetStauts.cgi" returns a text whose length is 73, see Camera status for more information.
Example
<html> <script> function ShowResult(o) { alert(str); } </script> <script
src="/GetStatus.cgi?JsVar=str&OnJs=ShowResult"> </script> </html>
5.3.8.36 GetLog.cgi
GetLog.cgi
Remark Get Videoserver's system logs information. (no privilege required)
Grammar /GetLog.cgi[?JsVar=variable[&OnJs=function]]
Remark Administrator and common user may receive different system logs information. Refer to Log
Example
<html> <head> <script> var sLogConst = [ "Information", 0, "Error", 1, "Set user", 11, "Del user", 12,
"Set user check", 13, "Open camera", 14, "Close camera", 15, "Change resolution", 16, "Change
quality",17, "Change brightness", 18, "Change contrast", 19, "Change saturation", 20, "Change hue",
21, "Change Sharpness", 22, "Set email", 23, "Set ftp server", 24, "Dial (pppoe)", 25, "Dial (modem)",
26, "New client", 27, "Set Motion Detect", 28, "Set Monite Area", 29, "Set Server Time", 30,
} return (sSuc?sRt:""); } function Hex2MAC(s) { var sRt = ""; var sSuc = false; var iDec; for (var i =
0; i < 6; i++) { if (i > 0) sRt += ":"; iDec = parseInt(s.substr(i * 2, 2), 16); if (iDec != 0) sSuc = true;
sRt += s.substr(i * 2, 2); } return (sSuc?sRt:""); } function ShowLog(s) { var sLine, sRes, iType,
iTime; var iTimeAdjust = parseInt(s.substr(0, 10), 10); var dTimeAdjust = new Date(); sRes = ""; "Set
Server IP", 31, "Set Http Port", 32, ""]; function Hex2IP(s) { var sRt = ""; var sSuc = false; var iDec;
for (var i = 0; i < 4; i++) { if (i > 0) sRt += "."; iDec = parseInt(s.substr(i * 2, 2), 16); if (iDec != 0)
sSuc = true; sRt += iDec; dTime = new Date(dTimeAdjust - 1000 * iTimeAdjust); sRes += "<tr><td
5.3.8.37 GetVer.cgi
GetVer.cgi
Description Get Videoserver's version. (no privilege required)
Grammar /GetVer.cgi[?JsVar=variable[&OnJs=function]]
Example
<html> <script> function ShowVersion() { location="/GetVer.cgi"; } </script> <a
href="javascript:ShowVersion();">Show V ersion</a> </html>
5.3.8.38 SetFactoryDefault.cgi
SetFactoryDefault.cgi
Description Change all settings to factory-default. (administrator privilege required)
Grammar /SetFactoryDefault.cgi
Remark
System would reboot immediately after the request be called, no response sent to client! This
command cannot be combined with other commands. (Refer to Cmd.cgi)
Description Get images/status with "multipart/x-mixed-replace" mime-type. (no privilege required)
Grammar /GetData.cgi[?Status=<true|false>]
Remark GetData.cgi is designed for "server-push". "Server-push" means that user need not always
detect camera's state, and the camera server transfer the camera data on its own.
GetData.cgi[?Status=false] returns:
HTTP/1.0 200 OK Date: Wed, 19 Feb 2003 03:40:16 GMT Server: WYM/1.0 Connection: close
Content-Type: multipart/x-mixed-replace;boundary=CAMERABOUDARY Last-Modified: Wed, 19
Feb 2003 03:40:16 GMT Pragma: no-cache Cache-Control: no-cache Expires: 01 Jan 1970 00:00:00
GMT --CAMERABOUDARY Content-Type: image/jpeg <content of jpeg file>
--CAMERABOUDARY Content-Type: image/jpeg <content of jpeg file> --CAMERABOUDARY ...
GetData.cgi?Status=true returns:
HTTP/1.0 200 OK
Date: We d, 19 Feb 2003 03:40:16 GMT Server: WYM/1.0 Connection: close Content-Type:
multipart/x-mixed-replace;boundary=CAMERABOUDARY Last-Modified: Wed, 19 Feb 2003
03:40:16 GMT Pragma: no-cache Cache-Control: no-cache Expires: 01 Jan 1970 00:00:00 GMT
--CAMERABOUDARY Content-Type: image/jpeg <content of jpeg file> --CAMERABOUDARY
Content-Type: text/plain <same as what's returned by GetStatus.cgi> --CAMERABOUDARY
Content-Type: image/jpeg <content of jpeg file> --CAMERABOUDARY Content-Type: text/plain
<same as what's returned by GetStatus.cgi> --CAMERABOUDARY ...
Example
<!-- In mozilla, you can view active image through tag "<img>". --> <img src=/GetData.cgi >
5.3.8.41 GetAudioData.cgi
GetAudioData.cgi
Description Get audio stream. (no privilege required)
Grammar /GetAudioData.cgi[?Format=<Pcm|Adpcm>]
Remark
Parameters Description Format Pcm : returns PCM audio,
Adpcm : returns ADPCM audio.
If "Format" is omitted, the default value is "Adpcm".
5.3.8.42 Cmd.cgi
Cmd.cgi
Description Use this command to combine several commands to a single http request, that is, user can
call two or more commands through Cmd.cgi.
Grammar /Cmd.cgi?Cmd=sCommandName1 [&ParamName1=sParamValue1]
[&ParamName2=sParamValue2][...] [Cmd=sCommandName2 [&ParamName1=sParamValue1]
[&ParamName2=sParamValue2][...]] [Cmd=sCommandName3...] [JsVar=variable[&OnJs=function]]
[&RedirectUrl=sUrl]
Remark Some commands may use the same parameter's name, so the parameter's position should be in
correct order. If you place parameters of sCommandName1 after sCommandName2, the behavior of
Videoserver is unpredicted. If there are sub-commands that get information from Videoserver, (such as
GetUser.cgi, PPPoE.cgi?Action=GetInfo), "RedirectUrl" should not be specified, otherwise the
browser will be redirected to the address specified by "RedirectUrl", and certainly not what you want.
List of commands that can be combined with Cmd.cgi:
ChangeResolution.cgi ChangeCompressRatio.cgi ChangeBrightness.cgi ChangeContrast.cgi
ChangeSaturation.cgi ChangeHue.cgi ChangeSharpness.cgi ChangeAECFrequency.cgi SetChannel.cgi
GetCapability.cgi SetMotionDetect.cgi SetMonitorRect.cgi MoveCamera.cgi GetMyself.cgi
SetUser.cgi
DelUser.cgi GetUser.cgi SetUserCheck.cgi SetMail.cgi GetMail.cgi SetFtp.cgi GetFtp.cgi SetTime.cgi
GetTime.cgi SetIP.cgi GetIP.cgi SetWlan.cgi GetWlan.cgi PPPoE.cgi SetDDNS.cgi GetDDNS.cgi
SetHttp.cgi GetHttp.cgi SetName.cgi GetName.cgi GetLog.cgi GetVer.cgi Reboot.cgi Example 1. Add
user abc(password 123), and delete user cba:
/Cmd.cgi?Cmd=SetUser.cgi&User=abc&Pass=123&Cmd=DelUser.cgi&User=cba <html> <form
action=/Cmd.cgi> <input type=hidden name=Cmd value=SetUser.cgi> <input name=User
value=abc><br> <input name=Pass value=123><br> <br> <input type=hidden name=Cmd
value=DelUser.cgi><br> <input name=User value=cba> <input type=submit value=OK> </form>
</html> 2. get the settings of ftp and email:
/Cmd.cgi?Cmd=GetFtp.cgi&Cmd=GetMail.cgi
<html> <script> function ShowResult(o) { alert(s); } </script> <script
src="/Cmd.cgi?Cmd=GetFtp.cgi&Cmd=GetMail.cgi?JsVar=s&OnJs=ShowResult"></script> </html>
5.3.8.43 Status
Status
Remark
/GetStatus.cgi returns a pure text with 73 bytes. Byte 0, 1 Camera State(2) 00 - off 01 - on Byte 2, 3
Modem State(2) 00 - off 01 - on line(common mode) 02 - connecting(common mode) Byte 4, 5 PPPoE
State(2) same as Modem State Byte 6, 7, 8 x-direction(3) reserved Byte 9, 10, 11 y-direction(3)
reserved Byte 12, 13, 14 focus(3) reserved Byte 15, 16, 17 bright(3) 0 - 255 Byte 18, 19, 20 contrast(3)
02 - {320, 240}, 03 - {640, 480}, 04 - {800, 600}, 05 - {1280, 960} Byte 22 compression ratio(1)
reserved Byte 23 privilege(1) 0 - super user(administrator) 1 - common user Byte 24, 25, .., 29 picture
index(6) (999999 - invalid picture) Byte 30 email state(1) 0 - do not send motion-detected pictures 1 send motion-detected pictures, success 2 - send motion-detected pictures, fail (wrong IP, user or
password?) Byte 31 user check(1) 0 - do not check user, any user can connect and act as a super user 1
- username and password required, only username is "administrator" has the super privilege. Byte 32,
34, .., 39 image file length(8) length in bytes 0 - 255 Byte 21 resolution(1) 00 - {176, 144}, 01 - {352,
288}, Byte 40, 42, .., 55
Byte 56 ftp state(1) 0 - disable ftp upload 1 - enable ftp upload, and upload success 2 - enable fpt
upload, but fail(wrong ip, user or password?) Byte 57, 58, 59 saturation(1) 0 - 255 Byte 60, 61, ..., 65
motion detected index(6) (999999 - init value) Byte 66, 67, 68 hue(3) 0 - 255 Byte 69, 70, 71
sharpness(3) 0 - 255 Byte 72 motion detect way(1) 0 - no motion detect non-zero - motion detect Byte
73 sensor's frequency(1) 0 - outdoor 1 - 50Hz 2 - 60Hz Byte 74 monite rect(16) 4 - left(0-9999) 4 top(0-9999) 4 - right(0-9999) 4 - bottom(0-9999) channel mode(1)
In round robin mode, the value may be from 1 to 15 Byte 77, 78, 79 audio volume(3) Byte 80 dynamic
DNS state(1) 0 - no update 1 - updating 2 - update successfully 3 - update failed Byte 81 audio state 0
- audio disabled 1 - audio enabled 0 - fixed mode 1 - round robin mode Byte 75, 76 channel value(2)
In fixed mode, the value may be from 0 to 3
5.3.8.44 Log
Log
Decryption Videoserver records user's operations and other important information, some of which is
only visible to administrator. User can call GetLog.cgi to get the logs.
Remark As a example, below is the text returned by GetLog.cgi: 000005398427
0A820B570000E8E26A8800000000022410.10A820B570000E8E26A8800000000082334230A820B
570000E8E26A880000000012 The very beginning of the text(blue) is the relative-time when
Videoserver returned this text, where relative-time is the seconds since Videoserver booting. The
benefit using relative-time is that the correct time can be shown even though server's time is not set.
(Refer to SetTime.cgi) after the 10 blue bytes, every 36 bytes represent a piece of log information. So
3 logs exist totally on the above. The structure of every log information: byte 0, 1 - reason for
recording this log, refer to Table 1. E.g.: 27 is indicated that new client connect to Videoserver. byte 2
~ 5 - reserved. byte 6 ~ 13 - operator's IP. E.g.: 0A820B57 is 10.130.11.87. byte 14 ~ 25 - operator's
MAC. E.g.: 0000E8E26A88 is 00:00:E8:E2:6A:88. byte 26 ~ 35 - time of this log. Table 1 (reason for
logs)
0 Information 1 Error 11 Set user 12 Del user 13 Set user check 14 Open camera 15 Close camera 16
Change resolution 17 Change quality
18 Change brightness 19 Change contrast 20 Change saturation 21 Change hue 22 Change Sharpness
23 Set email 24 Set ftp server 25 Dial (PPPoE) 26 Dial (modem) 27 New client 28 Set Motion Detect
29 Set Monitor Area 30 Set Server Time 31 Set Server IP 32 Set Http Port Example Refer to
GetLog.cgi
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.