Page 36 / 66 Scroll up to view Page 31 - 35
Appendix D
CGI Commands
35
Wireless-N Internet Home Monitoring Camera
Upload/Download Configuration
Download Configuration Content
Method:
GET
URL:
http://<ip>/adm/admcfg.cfg
Return:
HTTP/1.0 200 OK \r\n
content-type: application/configuration\r\n
\r\n
<configuration content encoded in Base64 format>
All data in the configuration is encoded in a Base64 format. Please refer to the encoder/decoder sample codes
at the end of this appendix.
To validate the data, there is a hidden checksum inside the configuration content. Because the dword-aligned
checksum algorithm is used, the last data misaligned by dword can be ignored.
Upload Configuration Content
Method:
POST
URL:
http://<ip>/adm/upload.cgi
Message body:
<boundary=...>
<configuration content encoded in Base64 fvormat>
All data in the configuration is encoded in a Base64 format. Please refer to the encoder/decoder sample
codes at the end of this appendix.
The Camera automatically reboots after receiving and loading the configuration content.
Return:
HTTP/1.0 200 OK \r\n
content-type: text/plain\r\n
\r\n
OK\r\n
Page 37 / 66
Appendix D
CGI Commands
36
Wireless-N Internet Home Monitoring Camera
Download Logs
Method:
GET
URL:
http://<ip>/adm/log.cgi
Return:
HTTP/1.0 200 OK \r\n
content-type: text/plain\r\n\r\n
<log data>
Motion Detection Commands
You can configure the motion detection sensitivity area to be either the entire screen or up to three specific areas. Each
area can have its own name and threshold setting. Once the moving indicators exceed the user-configured threshold,
a motion detection event will be triggered.
This is the definition of the sensitivity area coordinates on a 640x480 resolution image.
The home (0, 0) position is located at the left-top corner. The horizontal position, x, will be expressed as an integer value
from 0 to 639 (left to right). The vertical position, y, will be expressed as an integer value from 0 to 479 (top to bottom).
The left-top corner is the start position. The right-bottom corner is the stop position.
Whatever the current streaming resolution is, the replied coordinate always maps to the 640x480 scale.
Get Motion Detection Settings
Method:
GET
URL:
http://<IP>/adm/get_group.cgi?group=MOTION
(Please refer to Get Group Parameters command.)
Parameter
Value and description
group
Motion
(Required) This notifies the CGI that the request is for “motion detection” group.
(X2, Y2) = (639,479)
(X1, Y1) = (0,0)
(639,479)
(0,0)
640
480
Page 38 / 66
Appendix D
CGI Commands
37
Wireless-N Internet Home Monitoring Camera
Return:
All group settings or one group setting is returned as below:
HTTP/1.0 200 OK\r\n
content-type: text/plain \r\n
...
\r\n
[MOTION]
md_mode=[0|1] \r\n
0=Off, 1=On
md_point=X,Y\r\n
md_switch1=[0|1] \r\n
0=Off, 1=On
md_name1=Window_1 \r\n
12 ASCII characters
md_window1=X1, Y1, X2, Y2 \r\n
Relative to 640x480 resolution
md_threshold1=125 \r\n
Threshold: 0 ~ 255
md_switch2=[0|1] \r\n
md_name2=Window_2 \r\n
md_window2=X1, Y1, X2, Y2 \r\n
md_threshold2=125 \r\n
md_switch3=[0|1] \r\n
md_name3=Window_3 \r\n
md_window3=X1, Y1, X2, Y2 \r\n
md_threshold3=125 \r\n
md_switch4=[0|1] \r\n
md_name4=Window_4 \r\n
md_window4=X1, Y1, X2, Y2 \r\n
md_threshold4=125 \r\n
\r\n
Set Motion Detection Settings
Method:
GET
URL:
http://<IP>/adm/set_group.cgi?group=MOTION&<parameter>=<value>…
(Please refer to Set Group Parameters command.)
Parameter
Value and description
md_mode
Motion detection
0 = Off
1 = On
md_point
The position of motion under PT mode
Format:
X,Y
Range:
X = -63 to 63 (by model)
Y = -36 to 28 (by model)
md_switch1
...
md_switch4
Motion detection window
0 = Off
1 = On
Page 39 / 66
Appendix D
CGI Commands
38
Wireless-N Internet Home Monitoring Camera
Parameter
Value and description
md_name1
...
md_name4
Name of the motion detection area 1 ~ 4
(12 ASCII characters)
md_window1
...
md_window4
The coordinates of motion detection window N (relative to resolution 640x480)
X1, Y1, X2, Y2
md_threshold1
...
md_threshold4
The threshold of motion detection window N
(0 - 255)
Return:
HTTP/1.0 200 OK \r\n
content-type: text/plain\r\n
\r\n
OK\r\n
Notes:
The first motion window is used for full screen.
Use “md_switch1” as the switch for “full screen” or “sub-windows”.
The md_window1 is always set to 640x480 resolution.
If “md_switch1=1”, then the Camera will detect the entire video screen. With this setting, the remaining
windows (sub-window 1~3) cannot be configured.
If “md_switch1=0”, then the Camera will detect the “md_window2~4” areas.
Wireless Commands
Wireless status query
Method:
GET
URL:
http://<ip>/adm/wireless_status.cgi
Return:
The Camera returns a Web page that contains the following messages:
HTTP/1.0 200 OK \r\n
content-type: text/plain\r\n
\r\n
signal_strength=100\r\n
# Wireless signal, RSSI, Integer type, the value can be 1~100, 100 is the strongest.
\r\n
Page 40 / 66
Appendix D
CGI Commands
39
Wireless-N Internet Home Monitoring Camera
SMB/CIFS Server/SharedFolder Commands
SMB/CIFS Server Survey
Method:
GET
URL:
http://<ip>/adm/smb_survey.cgi[?parameter=value[&parameter=value...]]
Parameter
Value and description
timeout
(Optional) The timeout in seconds of the CGI
The CGI will stop surveying and return the result if it times out.
Valid values: 5-120 (default is 30)
action
(Optional) This CGI will terminate survey action.
stop
Return:
The result will be returned in XML format (the content size depends
on how
many
servers
are
in
the
network).
A
successful
request
returns
the
result
of
the Samba site survey as shown below (this is case sensitive):
HTTP/1.0 200 OK\r\n
Content-type: text/xml\r\n
...
\r\n
<?xml version=”1.0” encoding=”utf-8”?>\r\n
<List>\r\n
<WorkGroup>\r\n
<Name></Name>\r\n
<List>\r\n
<Server>\r\n
<Name></Name>\r\n
<Comment></Comment>\r\n
</Server>\r\n
...
</List>\r\n
</WorkGroup>\r\n
...
</List>\r\n
XML tag description:
Parameter
Value and description
Name (WorkGroup)
The work group name (up to 15 characters)
Name (Server)
The PC name of the server (up tp 63 characters)
Comment (Server)
The description of the server (up to 256 characters)

Rate

4 / 5 based on 1 vote.

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top