Skip to content

Instantly share code, notes, and snippets.

@ekwoodrich
Last active April 30, 2024 20:24
Show Gist options
  • Save ekwoodrich/a6d7b8db8f82adf107c3c366e61fd36f to your computer and use it in GitHub Desktop.
Save ekwoodrich/a6d7b8db8f82adf107c3c366e61fd36f to your computer and use it in GitHub Desktop.
Reference codes for the DVRIP/Sonia TCP protocol used by the Net Surveillance ActiveX plugin

DVRIP/Sonia Protocol

DVRIP/Sonia TCP protocol used by the Net Surveillance ActiveX plugin

1. Response Codes

Return code Definition
100 Success
101 Unknown error
102 Version not supported
103 Illegal request
104 User has already logged in
105 User is not logged in
106 Username or Password is incorrect
107 Insufficient permission
108 Timeout
109 Find failed, file not found
110 Find success, returned all files
111 Find success, returned part of files
112 User already exists
113 User does not exist
114 User group already exists
115 User group does not exist
116 Reserved
117 Message is malformed
118 No PTZ protocol is set
119 No query to file
120 Configured to be enabled
121 Digital channel is not enabled
150 Success, device restart required
202 User is not logged in
203 Incorrect password
204 User is illegal
205 User is locked
206 User is in the blacklist
207 User already logged in
208 Invalid input
209 User already exists
210 Object not found
211 Object does not exist
212 Account in use
213 Permission table error
214 Illegal password
215 Password does not match
216 Keep account number
502 Illegal command
503 Talk channel has ben opened
504 Talk channel is not open
511 Update started
512 Update did not start
513 Update data error
514 Update failed
515 Update succeeded
521 Failed to restore default config
522 Device restart required
523 Default config is illegal
602 Application restart required
603 System restart required
604 Write file error
605 Features are not supported
606 Verification failed
607 Configuration does not exist
608 Configuration parsing error

2. Command Codes

2.1 Login/Logout

Command name Command Code Description
LOGIN_REQ 999/1000 Login request
LOGIN_RSP 1000 Login response
LOGOUT_REQ 1001 Logout tequest
LOGOUT_RSP 1002 Logout response
FORCELOGOUT_REQ 1003 Forced logout request
FORCELOGOUT_RSP 1004 Forced logout response
KEEPALIVE_REQ 1005 Keep alive request
KEEPALIVE_RSP 1006 Keep alive response

2.2 Device Information

Command name Command Code Description
SYSINFO_REQ 1020 System information request
SYSINFO_RES 1021 System information response

2.3 Device Information

Command name Command Code Description
SYSINFO_REQ 1020 System information request

2.4 System Debug

Command name Command Code Description
SYSTEM_DEBUG_REQ 1052 System debug request
SYSTEM_DEBUG_RSP 1053 System debug response

2.5 Device Capability Level

Command name Command Code Description
SYSINFO_REQ 1020 System information request

2.6 PTZ Control

Command name Command Code Description
SYSINFO_REQ 1020 System information request
@420pootang69
Copy link

Thanks so much for this! It fixes one of the major problems I'm finding with these cheap chineese cameras! I wrote a small guide using the library here:
https://ipcamtalk.com/threads/how-to-set-custom-video-encoding-parameters-for-any-camera-that-uses-cms-for-configuration.38050/

I'd love to make a front end for this so you could completely configure the cam using this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment