The return message of URL are defined as followed the HTTP standard. To all devices, there are two parts of the return message of the URL. These two parts of message were sent in one or two TCP packets depends on the firmware implementation. The first part is the HTTP status header for return code and the second part is the return message of URL.
The format of HTTP header in the return message depends on the HTTP version implemented in the firmware. In HTTP 1.0, the termination of HTTP header in the return message is \n\n.
In HTTP 1.1, the termination of HTTP header in the return message is \r\n\r\n.
Here is an example of the return message of the WAN_TYPE URL Command.Return Message with HTTP 1.0 header
HTTP/1.0 200 OK\r\nReturn Message with HTTP 1.1 header
Content-type: text/plain\n\n
WAN_TYPE='1'\nHTTP/1.1 200 OK\r\n
Content-Type: text/plain\r\n
Content-Length: 13\r\n
\r\n
WAN_TYPE='1'\n
The format of the HTTP status code is
HTTP/1.0 <HTTP_CODE> <HTTP_TEXT>\r\n
The most used HTTP codes are listed below.
HTTP_CODE HTTP_TEXT Description 200 OK Valid URL Command 400 Unauthorized Error in authentication 401 Not Found General Error
In general, there are five types of the return message of the URL.
Please refer the Description of URL to get the format of URL for further details.Note that the HTTP return code is 200 in the return message type 4 and 5. User should not use the HTTP return code to check if the device accepts the URL command or not.
This return message is used in the READ URL command. The device will echo this URL command and give the value in the two ' ' symbols.
If there is more than one URL in the URL command, the return message of every URL will be shown. For example,Return Message of the URL WAN_TYPE&WAN_IP is
WAN_TYPE='1'
WAN_IP='192.168.0.100'This return message is used in the WRITE URL command. If the VALUE makes sense, the command will be echoed back with OK: tag. The input argument in the URL command will be put into two ' ' symbols.
If there is more than one URL in the URL command, the return message of every URL will be shown. For example,Return Message of the URL WAN_TYPE=1&WAN_IP=192.168.1.100 is
OK: WAN_TYPE='1'
OK: WAN_IP='192.168.0.100'This return message is used in the ACTION URL command like SAVE, REBOOT, FACTORY_DEFAULT and so on. There is no value returned for this command. For example,Return Message of the URL REBOOT is
OK
This return message is used in the WRITE URL command but the input argument is incorrect. he device will echo this URL command and give the value which is the setting in the device.
If there is more than one URL in the URL command, the return message of every URL will be shown. For example,Return Message of the URL WAN_TYPE=0 where the range of WAN_TYPE is 1~3:
ERROR: WAN_TYPE='1'
It shows the current WAN_TYPE setting in the device is 1.
Return Message of the URL WAN_TYPE=0&WAN_IP=192.168.1.100 is
ERROR: WAN_TYPE='1'
OK: WAN_IP='192.168.0.100'It shows the argument of WAN_TYPE setting is incorrect and the WAN_TYPE configuration is not updated, but the WAN_IP setting is updated successfully.
5: ERROR: Description of error
This return message is for the error condition which could not be described in the ERROR: CMD='VALUE' format. The URL likes read-only or write-only command or action command might have such kind to return message. Here is the summary of the possible error return message in this format.
Description of Error Description< missing USER/PWD The USER or PWD command was not found in the Type1 URL bad account/password The user account name or password is incorrect in the Type1 URL. missing CHANNEL The CHANNEL command was not found bad CHANNEL=n The channel n Video Server is not active in the Multi-Channel Encoder device or the channel n is out of range in the Multi-Channel Encoder device CMD not found The device does not support this CMD CMD is write-only The CMD is write only in the device CMD is read-only The CMD is read only in the device not authorized The CMD is not allow to be execute because of lower login level. invalid parameters The input argument is incorrect in the Write-Only Command and Write Operation with a list index, like MOTION_CONFIG in ENCODER CGI no command There is no any URL command in the URI. firmware image Firmware image file is corrupted or MD5 check error in firmware upgrade URLs firmware version Firmware version mismatches in firmware upgrade URLs firmware type Firmware Type error (AC/NB mismatches) in firmware upgrade URLs config image Configuration file is corrupted oem image OEM image file is corrupted profile image Camera Profile image file is corrupted profile ID Profile ID mismatches in profile upgrade URLs PTZ Image PTZ image file is corrupted 8051DNX Image 8051DNX image file is corrupted 8051THX Image 8051THX image file is corrupted internal error <more description> There is an error internally. There might be more description of the error
HOME