NetSDK - C# Programming Manual (Field Surveillance Unit)
NetSDK - C# Programming Manual (Field Surveillance Unit)
Surveillance Unit)
User’s Manual
V1.0.0
Foreword
Safety Instructions
The following categorized signal words with defined meaning might appear in the manual.
Signal Words Meaning
TIPS Provides methods to help you solve a problem or save you time.
Revision History
Version Revision Content Release Time
II
Glossary
This chapter provides the definitions to some of the terms appearing in the Manual to help you
understand the function of each module.
Term Description
This ID uniquely identifies an external device for the monitoring and collection of
Device ID
various data. It is described as DeviceID in the interface structure.
Monitoring Functional abstraction that monitors a certain type of values on the external device,
Point identified by a unique ID. It is described as ID in the interface structure.
Remote
Point alarm information.
Signaling
Telemetering Point monitoring data upload.
III
Table of Contents
Foreword ........................................................................................................................................................... II
Glossary ........................................................................................................................................................... III
1 Introduction................................................................................................................................................... 1
1.1 Overview ....................................................................................................................................................................................... 1
1.2 System Requirements............................................................................................................................................................... 2
1.3 Field Surveillance Unit.............................................................................................................................................................. 2
1.4 Scenes ............................................................................................................................................................................................ 2
2 Main Functions .............................................................................................................................................. 3
2.1 Initializing NetSDK ..................................................................................................................................................................... 3
2.1.1 Introduction .................................................................................................................................................................... 3
2.1.2 Interface Overview ....................................................................................................................................................... 3
2.1.3 Process Description ...................................................................................................................................................... 3
2.1.4 Example Code ................................................................................................................................................................ 4
2.2 Device Login and Logout ........................................................................................................................................................ 5
2.2.1 Introduction .................................................................................................................................................................... 5
2.2.2 Interface Overview ....................................................................................................................................................... 5
2.2.3 Process Description ...................................................................................................................................................... 6
2.2.4 Example Code ................................................................................................................................................................ 7
2.3 Getting External Device List ................................................................................................................................................... 7
2.3.1 Introduction .................................................................................................................................................................... 7
2.3.2 Interface Overview ....................................................................................................................................................... 7
2.3.3 Process Description ...................................................................................................................................................... 8
2.3.4 Example Code ................................................................................................................................................................ 8
2.4 Getting Point Information....................................................................................................................................................... 9
2.4.1 Introduction .................................................................................................................................................................... 9
2.4.2 Interface Overview ....................................................................................................................................................... 9
2.4.3 Process Description ....................................................................................................................................................10
2.4.4 Example Code ..............................................................................................................................................................10
2.5 Subscribing to Monitoring Point Alarm...........................................................................................................................12
2.5.1 Introduction ..................................................................................................................................................................12
2.5.2 Interface Overview .....................................................................................................................................................12
2.5.3 Process Description ....................................................................................................................................................13
2.5.4 Example Code ..............................................................................................................................................................13
2.6 Subscribing to Real-time Information of Monitoring Point .....................................................................................15
2.6.1 Introduction ..................................................................................................................................................................15
2.6.2 Interface Overview .....................................................................................................................................................15
2.6.3 Process Description ....................................................................................................................................................15
2.6.4 Example Code ..............................................................................................................................................................16
2.7 Subscribing to General Alarm .............................................................................................................................................16
2.7.1 Introduction ..................................................................................................................................................................17
2.7.2 Interface Overview .....................................................................................................................................................17
2.7.3 Process Description ....................................................................................................................................................18
2.7.4 Example Code ..............................................................................................................................................................18
3 Interface Function ....................................................................................................................................... 20
IV
3.1 Initializing NetSDK ...................................................................................................................................................................20
3.1.1 Init.....................................................................................................................................................................................20
3.1.2 Cleanup ..........................................................................................................................................................................20
3.1.3 SetAutoReconnect .....................................................................................................................................................20
3.1.4 SetNetworkParam.......................................................................................................................................................21
3.2 Logging in and out ..................................................................................................................................................................21
3.2.1 LoginWithHighLevelSecurity ..................................................................................................................................21
3.2.2 Logout .............................................................................................................................................................................22
3.3 Getting External Device List QueryDevState .................................................................................................................22
3.4 Getting Point Information SCADAGetAttributeInfo....................................................................................................23
3.5 Subscribing to Monitoring Point Alarm...........................................................................................................................23
3.5.1 SCADAAlarmAttachInfo............................................................................................................................................23
3.5.2 SCADAAlarmDetachInfo ..........................................................................................................................................23
3.6 Subscribing to Real-time Information of Monitoring Point .....................................................................................24
3.6.1 SCADAAttachInfo........................................................................................................................................................24
3.6.2 SCADADetachInfo.......................................................................................................................................................24
3.7 Reporting Alarm .......................................................................................................................................................................25
3.7.1 CallbackSetDVRMessCallBack ................................................................................................................................25
3.7.2 StartListen......................................................................................................................................................................25
3.7.3 StopListen ......................................................................................................................................................................26
4 Callback ........................................................................................................................................................ 27
4.1 fDisConnectCallBack ...............................................................................................................................................................27
4.2 fHaveReConnectCallBack ......................................................................................................................................................27
4.3 fSCADAAlarmAttachInfoCallBack.......................................................................................................................................27
4.4 fSCADAAttachInfoCallBack...................................................................................................................................................28
4.5 fMessCallBackEx .......................................................................................................................................................................28
Appendix 1 Cybersecurity Recommendations ............................................................................................. 30
V
1 Introduction
1.1 Overview
This document provides reference information of the packaging engineering NetSDKCS for the C#
NetSDK library, including main functions, interface functions, and callback.
The main functions include: NetSDK initialization, device login, getting external device list, getting
point information, subscription to monitoring point alarm, subscription to real-time information of
monitoring point, and subscription to device status alarm.
For files included in the C# NetSDK library, see Table 1-1.
The function library and configuration library of NetSDK are necessary libraries.
The function library is the main body of NetSDK, which is used for communication interaction
between client and products, remote control, search, configuration, acquisition and processing
of stream data.
NetSDK library is the foundation of NetSDKCS engineering. The reference path of NetSDK library
is defined in the OriginalSDK.cs file. In actual use, put the NetSDK library in the corresponding
path. Users can customize the reference path.
Customers can directly reference this packaging engineering in their own engineering, or put
the files in the packaging engineering in their own engineering for use, or refer to this
packaging engineering for packaging.
This document introduces the use of C# engineering that packages the C library interface. For
more information, see the development document in the C NetSDK library.
1
1.2 System Requirements
Recommended memory: No less than 512 M.
Systems supported by NetSDK: Windows 10/Windows 8.1/Windows 7/Windows Vista/Windows
Server 2008/2003.
1.4 Scenes
The unit can be applied to the security in various fields and departments such as energy, natural gas,
mining, telecommunication, power, agriculture, transportation, intelligent communities, factories,
warehouses, resources, and water conservancy facilities.
2
2 Main Functions
2.1.1 Introduction
Initialization is the first step for NetSDK to conduct all the function modules. It does not have the
surveillance function but can set some parameters that affect the SDK overall functions.
Initialization occupies some memory.
Only the first initialization is valid within one process.
After initialization, call the NetSDK cleaning up interface to release resource.
Start
SDK initialization
NETClient.Init
Required
End
Optional
3
Process Description
Notes
You need to call the interfaces NETClient.Init and NETClient.Cleanup in pairs. NetSDK
supports single-thread multiple calling in pairs, but it is suggested to call the pair for only one
time globally.
Initialization: Calling NETClient.Init multiple times is only for internal count without repeating
requesting resources.
Cleaning up: The interface NETClient.Cleanup clears all the opened processes, such as login,
real-time monitoring, and alarm subscription.
Reconnection: NetSDK can set the reconnection function for the situations such as network
disconnection and power off. NetSDK will keep logging in until succeeded. Only the real-time
monitoring, playback, subscription to intelligent event, and alarm subscription can be restored
after reconnection.
// Commission
m_DisConnectCallBack = new fDisConnectCallBack(DisConnectCallBack);
m_ReConnectCallBack = new fHaveReConnectCallBack(ReConnectCallBack);
4
NET_PARAM param = new NET_PARAM()
{
nWaittime = 10000,// Waiting timeout period (ms)
nConnectTime = 5000,// Connection timeout period (ms)
};
NETClient.SetNetworkParam(param);
2.2.1 Introduction
Device login, also called user authentication, is the precondition of all the other function modules.
You can obtain a unique login ID upon logging in to the device and should pass in the login ID
before using other NetSDK interfaces. The login ID becomes invalid once logged out.
5
2.2.3 Process Description
Figure 2-2 Process of login
Start
SDK initialization
NETClient.Init
End
Process Description
Notes
Login handle: When the login is successful, the returned value of the interface is not 0 (even the
handle is smaller than 0, the login is also successful). One device can log in multiple times with
different handle at each login. If there is not special function module, it is suggested to log in
only one time. The login handle can be repeatedly used on other function modules.
Handle repetition: The login handle might be the same as an existing handle, which is normal.
For example, if you log in to Device A and get loginIDA, then cancel loginIDA. When you log in
again, you might get LoginIDA again. However, throughout the life cycle of a handle, the same
handle will not appear.
Logout: The interface will release the opened functions in the login session internally, but it is
not suggested to rely on the cleaning up function of the logout interface. For example, if you
opened the monitoring function, you should call the interface that stops the monitoring
function when it is no longer required.
Use login and logout in pairs: The login consumes some memory and socket information and
releases sources once logged out.
Login failure: Call NETClient.GetLastError to get failure information.
After the device is disconnected, the login ID of the device is invalid, and will become valid after
the device is reconnected.
6
2.2.4 Example Code
// Log in to the device.
NET_DEVICEINFO_Ex m_DeviceInfo = new NET_DEVICEINFO_Ex();
IntPtr m_LoginID = NETClient.LoginWithHighLevelSecurity(ip, port, name, password,
EM_LOGIN_SPAC_CAP_TYPE.TCP, IntPtr.Zero, ref m_DeviceInfo);
if (IntPtr.Zero == m_LoginID)
{
MessageBox.Show(this, NETClient.GetLastError());
return;
}
2.3.1 Introduction
Get the ID of devices that are connected to the unit.
7
2.3.3 Process Description
Figure 2-3 Process of getting external device list
Start
SDK initialization
NETClient.Init
End
Process Description
8
device_list.pstuDeviceIDInfo =
Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_SCADA_DEVICE_ID_INFO)) * device_list.nMax);
2.4.1 Introduction
Get the corresponding monitoring point information according to the ID of each device on the
power and environment host.
9
Interface Description
NETClient.SCADAGetAttributeInfo Get device point information.
Start
SDK initialization
NETClient.Init
End
Process Description
10
stuAttributeInfoIn.stuCondition = new NET_GET_CONDITION_INFO();
stuAttributeInfoIn.stuCondition.szDeviceID = "******";
11
var attributeInfo_item =
(NET_ATTRIBUTE_INFO)Marshal.PtrToStructure(IntPtr.Add(attribute_info.pstuAttributeInfo,
Marshal.SizeOf(typeof(NET_ATTRIBUTE_INFO)) * j), typeof(NET_ATTRIBUTE_INFO));
}
}
}
Marshal.FreeHGlobal(pstInParam);
pstInParam = IntPtr.Zero;
Marshal.FreeHGlobal(pstOutParam);
pstOutParam = IntPtr.Zero;
2.5.1 Introduction
Monitor the alarm information of each monitoring point.
12
2.5.3 Process Description
Figure 2-5 Process of subscription to monitoring point alarm
Start
SDK initialization
NETClient.Init
End
Process Description
13
private static fSCADAAlarmAttachInfoCallBack m_SCADAAlarmAttachInfoCallBack = new
fSCADAAlarmAttachInfoCallBack(SCADAAlarmAttachInfoCallBack);
// Subscribe to alarms
NET_IN_SCADA_ALARM_ATTACH_INFO inInfo = new NET_IN_SCADA_ALARM_ATTACH_INFO();
inInfo.dwSize = (uint)Marshal.SizeOf(typeof(NET_IN_SCADA_ALARM_ATTACH_INFO));
inInfo.cbCallBack = m_SCADAAlarmAttachInfoCallBack;
14
2.6 Subscribing to Real-time Information of Monitoring
Point
2.6.1 Introduction
Monitor the general information upload of each monitoring point.
Start
SDK initialization
NETClient.Init
End
15
Process Description
16
private void SCADAAttachInfoCallBack(IntPtr lLoginID, IntPtr lAttachHandle, IntPtr pInfo, int nBufLen,
IntPtr dwUser)
{
NET_SCADA_NOTIFY_POINT_INFO_LIST info =
(NET_SCADA_NOTIFY_POINT_INFO_LIST)Marshal.PtrToStructure(pInfo,
typeof(NET_SCADA_NOTIFY_POINT_INFO_LIST));
2.7.1 Introduction
Alarm reporting method: Use NetSDK to log in to the device and subscribe to the alarm function
from the device. When the device detects an alarm event, it will send the event to NetSDK
immediately. You can get the corresponding alarm information through the alarm callback.
17
2.7.3 Process Description
Figure 2-7 Process of subscription to general alarm
Start
SDK initialization
NETClient.Init
End
Process Description
18
private static fMessCallBackEx m_AlarmCallBack;
m_AlarmCallBack = new fMessCallBackEx(AlarmCallBackEx);
// Configure alarm callback.
NETClient.SetDVRMessCallBack(m_AlarmCallBack, IntPtr.Zero);
Console.WriteLine(info.nChannel.ToString());
Console.WriteLine(info.stuTime.ToString());
Console.WriteLine(info.szDevName);
break;
default:
break;
}
return true;
}
// Subscribe to alarm.
bool ret = NETClient.StartListen(m_LoginID);
if (!ret)
{
MessageBox.Show(this, NETClient.GetLastError());
return;
}
// Unsubscribe from alarm.
bool ret = NETClient.StopListen(m_LoginID);
if (!ret)
{
MessageBox.Show(this, NETClient.GetLastError());
return;
}
19
3 Interface Function
3.1.1 Init
Table 3-1 NetSDK Initialization Init
Item Description
Description Initialize the NetSDK.
bool Init(
fDisConnectCallBack cbDisConnect,
Function IntPtr dwUser,
NETSDK_INIT_PARAM? stuInitParam
);
[in]cbDisConnect Disconnection callback.
Parameter [in]dwUser User parameters for disconnection callback.
[in]stuInitParam NetSDK initialization parameter.
Success: true.
Return Value
Failure: false.
Prerequisite for calling other functions of the network NetSDK.
When the callback is set as NULL, the device will not be called back to the
user after disconnection.
Description
The dwUser parameter input by Init will be returned in the same field dwUser
within the callback cbDisConnect. This helps to position. The same applies to
other functions.
3.1.2 Cleanup
Table 3-2 NetSDK Cleanup
Item Description
Description Clean up NetSDK.
Function void Cleanup().
Parameter None.
Return Value None.
Description NetSDK cleaning up interface is finally called before the end.
3.1.3 SetAutoReconnect
Table 3-3 Set reconnection callback SetAutoReconnect
Item Description
Description Set auto reconnection callback.
20
Item Description
void SetAutoReconnect(
fHaveReConnectCallBack cbAutoConnect,
Function
IntPtr dwUser
);
[in]cbAutoConnect Reconnection callback.
Parameter
[in]dwUser User parameters for reconnection callback.
Return Value None.
Set reconnection callback interface. If the callback is set as NULL, the device will not
Description
be reconnected automatically.
3.1.4 SetNetworkParam
Table 3-4 Set network parameters SetNetworkParam
Item Description
Description Set related parameters of network environment.
Function void SetNetworkParam(NET_PARAM? netParam);
Network delay, number of reconnections, buffer size
Parameter [in]netParam
and other parameters.
Return Value None.
Description You can adjust parameters according to the actual network environment.
3.2.1 LoginWithHighLevelSecurity
Table 3-5 Log in to device LoginWithHighLevelSecurity
Item Description
Description The user logs in to the device.
IntPtr LoginWithHighLevelSecurity(
string pchDVRIP,
ushort wDVRPort,
string pchUserName,
Function string pchPassword,
EM_LOGIN_SPAC_CAP_TYPE emSpecCap,
IntPtr pCapParam,
ref NET_DEVICEINFO_Ex deviceInfo
);
[in]pchDVRIP Device IP.
[in]wDVRPort Device port.
Parameter [in]pchUserName Username.
[in]pchPassword Password.
[in]emSpecCap Login category.
21
Item Description
[in]pCapParam Login category parameter.
[out]deviceInfo Device information.
Success: Non-0.
Return Value
Failure: 0.
Description None.
3.2.2 Logout
Table 3-6 Log out ofdDevice Logout
Item Description
Description The user logs out of the device.
bool Logout(
Function IntPtr lLoginID
);
Parameter [in]lLoginID Return value of NETClient.LoginWithHighLevelSecurity.
Return Value Return false for failure and true for success.
Description None.
22
3.4 Getting Point Information SCADAGetAttributeInfo
Table 3-8 Get Device Point Information SCADAGetAttributeInfo
Item Description
Description Get device point information.
bool SCADAGetAttributeInfo(
IntPtr lLoginID,
IntPtr pstInParam,
Function
IntPtr pstOutParam,
int nWaitTime
);
[in]lLoginID Return value of NETClient.LoginWithHighLevelSecurity.
[in]pstInParam Input parameter.
Parameter
[out]pstOutParam Output parameter.
[in]nWaitTime Waiting time in search status.
Success: Non-0.
Return Value
Failure: 0.
Description None.
3.5.1 SCADAAlarmAttachInfo
Table 3-9 Subscribe to Monitoring Point Alarm Information SCADAAlarmAttachInfo
Item Description
Description Subscribe to monitoring point alarm information.
IntPtr SCADAAlarmAttachInfo(
IntPtr lLoginID,
NET_IN_SCADA_ALARM_ATTACH_INFO pInParam,
Function
NET_OUT_SCADA_ALARM_ATTACH_INFO pOutParam,
int nWaitTime = 3000
);
[in]lLoginID Return value of NETClient.LoginWithHighLevelSecurity.
[in]pInParam Subscription input parameter.
Parameter
[out]pOutParam Subscription output parameter.
[in]waittime Waiting time.
Success: Non-0.
Return Value
Failure: 0.
Description None
3.5.2 SCADAAlarmDetachInfo
Table 3-10 Unsubscribe from Point Alarm Information SCADAAlarmDetachInfo
23
Item Description
Description Unsubscribe from point alarm information.
bool SCADAAlarmDetachInfo(
Function IntPtr lAttachHandle
)
Parameter [in]lAttachHandle Return value of NETClient.SCADAAlarmAttachInfo
Return Value Return false for failure and true for success.
Description None.
3.6.1 SCADAAttachInfo
Table 3-11 Subscribe to Real-time Information of Monitoring Point SCADAAttachInfo
Item Description
Description Subscribe to real-time information of monitoring point.
IntPtr SCADAAttachInfo(
IntPtr lLoginID,
NET_IN_SCADA_ATTACH_INFO pInParam,
Function
NET_OUT_SCADA_ATTACH_INFO pOutParam,
int nWaitTime
);
[in]lLoginID Return value of NETClient.LoginWithHighLevelSecurity.
[in]pInParam Subscription input parameter.
Parameter
[out]pOutParam Subscription output parameter.
[in]waittime Waiting time.
Success: Non-0.
Return Value
Failure: 0.
Description None.
3.6.2 SCADADetachInfo
Table 3-12 Unsubscribe from Point Information SCADADetachInfo
Item Description
Description Unsubscribe from point information.
bool SCADADetachInfo(
Function IntPtr lAttachHandle
);
Parameter [in]lAttachHandle Return value of NETClient.SCADAAttachInfo.
Success: true.
Return Value
Failure: false.
24
Item Description
Description None.
3.7.1 CallbackSetDVRMessCallBack
Table 3-13 Set alarm callback SetDVRMessCallBack
Item Description
Description Set alarm callback.
void SetDVRMessCallBack(
fMessCallBackEx cbMessage,
Function
IntPtr dwUser
);
Message callback, which can call back the device
status, such as alarm status.
[in]cbMessage
Parameter When the value is set as 0, it means callback is
forbidden.
[in]dwUser User-defined data.
Return
None.
Value
Set device message callback to get the current device status information; this
function is independent of the calling sequence, and the NetSDK is not called
Description back by default.
The callback fMessCallBack must call the alarm message subscription interface
StartListen first before it takes effect.
3.7.2 StartListen
Table 3-14 Subscribe to alarm StartListen
Item Description
Description Subscribe to alarm.
bool StartListen(
Function IntPtr lLoginID
);
Parameter [in]lLoginID Return value of NETClient.LoginWithHighLevelSecurity.
Return Success: true.
Value Failure: false.
Subscribe to device message, and the message received is called back from the set
Description
value of SetDVRMessCallBack.
25
3.7.3 StopListen
Table 3-15 Unsubscribe from alarm StopListen
Item Description
Description Stop subscribing to alarm.
bool StopListen(
Function IntPtr lLoginID
);
Parameter [in]lLoginID Return value of NETClient.LoginWithHighLevelSecurity.
Success: true.
Return Value
Failure: false.
Description None.
26
4 Callback
4.1 fDisConnectCallBack
Table 4-1 Disconnection callback fDisConnectCallBack
Item Description
Description Disconnection callback
public delegate void fDisConnectCallBack(
IntPtr lLoginID,
IntPtr pchDVRIP,
Function
int nDVRPort,
IntPtr dwUser
);
[out]lLoginID Return value of NETClient.LoginWithHighLevelSecurity
[out]pchDVRIP Disconnected device IP
Parameter
[out]nDVRPort Disconnected device port
[out]dwUser User parameters for callback
Return Value None
Description None
4.2 fHaveReConnectCallBack
Table 4-2 Reconnection callback fHaveReConnectCallBack
Item Description
Description Reconnection callback
public delegate void fHaveReConnectCallBack(
IntPtr lLoginID,
IntPtr pchDVRIP,
Function
int nDVRPort,
IntPtr dwUser
);
[out]lLoginID Return value of NETClient.LoginWithHighLevelSecurity
[out]pchDVRIP Reconnected device IP
Parameter
[out]nDVRPort Reconnected device port
[out]dwUser User parameters for callback
Return Value None
Description None
4.3 fSCADAAlarmAttachInfoCallBack
Table 4-3 Monitoring point alarm information callback fSCADAAlarmAttachInfoCallBack
27
Item Description
Description Monitoring point alarm information callback
public delegate void fSCADAAlarmAttachInfoCallBack(
IntPtr lAttachHandle,
IntPtr pInfo,
Function
int nBufLen,
IntPtr dwUser
);
[out]lAttachHandle Return value of NETClient. SCADAAlarmAttachInfo
[out]pInfo Alarm message data block address
Parameter
[out]nBufLen Length of alarm message data block, in bytes
[out]dwUser User parameters for callback
Return Value None
Description None
4.4 fSCADAAttachInfoCallBack
Table 4-4 Monitoring point information callback fSCADAAttachInfoCallBack
Item Description
Description Monitoring point information callback
public delegate void fSCADAAttachInfoCallBack(
IntPtr lLoginID,
IntPtr lAttachHandle,
Function IntPtr pInfo,
int nBufLen,
IntPtr dwUser
);
[out]lLoginID Return value of NETClient.LoginWithHighLevelSecurity
[out]lAttachHandle Return value of NETClient. SCADAAttachInfo
Parameter [out]pInfo Reported information data block address
[out]nBufLen Length of reported information data block, in bytes
[out]dwUser User parameters for callback
Return Value None
Description None
4.5 fMessCallBackEx
Table 4-5 Alarm callback fMessCallBackEx
Item Description
Description Alarm callback
28
Item Description
public delegate bool fMessCallBackEx(
int lCommand,
IntPtr lLoginID,
IntPtr pBuf,
uint dwBufLen,
Function IntPtr pchDVRIP,
int nDVRPort,
bool bAlarmAckFlag,
int nEventID,
IntPtr dwUser
);
[out]lCommand Alarm type. For details, see Table 4-6
[out]lLoginID Return value of login interface
Buffer that receives alarm data, which is filled with different
[out]pBuf data according to different listening interfaces called and
lCommand values
[out]dwBufLen Length of pBuf, in bytes
Parameter
[out]pchDVRIP Device ip
[out]nDVRPort Port
TRUE: This event can be confirmed.
[out]bAlarmAckFlag
FALSE: This event cannot be confirmed.
[out]nEventID Return event ID
[out]dwUser User-defined data
TRUE: Callback is executed correctly
Return Value
FALSE: Execution error
Usually, call the set callback during application initialization, and process properly in
Description
the callback according to different device ID and command values
29
Appendix 1 Cybersecurity Recommendations
Cybersecurity is more than just a buzzword: it’s something that pertains to every device that is
connected to the internet. IP video surveillance is not immune to cyber risks, but taking basic steps
toward protecting and strengthening networks and networked appliances will make them less
susceptible to attacks. Below are some tips and recommendations on how to create a more secured
security system.
Mandatory actions to be taken for basic device network security:
1. Use Strong Passwords
Please refer to the following suggestions to set passwords:
The length should not be less than 8 characters;
Include at least two types of characters; character types include upper and lower case
letters, numbers and symbols;
Do not contain the account name or the account name in reverse order;
Do not use continuous characters, such as 123, abc, etc.;
Do not use overlapped characters, such as 111, aaa, etc.;
2. Update Firmware and Client Software in Time
According to the standard procedure in Tech-industry, we recommend to keep your device
(such as NVR, DVR, IP camera, etc.) firmware up-to-date to ensure the system is equipped
with the latest security patches and fixes. When the device is connected to the public
network, it is recommended to enable the “auto-check for updates” function to obtain
timely information of firmware updates released by the manufacturer.
We suggest that you download and use the latest version of client software.
"Nice to have" recommendations to improve your device network security:
1. Physical Protection
We suggest that you perform physical protection to device, especially storage devices. For
example, place the device in a special computer room and cabinet, and implement well-done
access control permission and key management to prevent unauthorized personnel from
carrying out physical contacts such as damaging hardware, unauthorized connection of
removable device (such as USB flash disk, serial port), etc.
2. Change Passwords Regularly
We suggest that you change passwords regularly to reduce the risk of being guessed or cracked.
3. Set and Update Passwords Reset Information Timely
The device supports password reset function. Please set up related information for password
reset in time, including the end user’s mailbox and password protection questions. If the
information changes, please modify it in time. When setting password protection questions, it is
suggested not to use those that can be easily guessed.
4. Enable Account Lock
The account lock feature is enabled by default, and we recommend you to keep it on to
guarantee the account security. If an attacker attempts to log in with the wrong password
several times, the corresponding account and the source IP address will be locked.
5. Change Default HTTP and Other Service Ports
We suggest you to change default HTTP and other service ports into any set of numbers
between 1024~65535, reducing the risk of outsiders being able to guess which ports you are
using.
30
6. Enable HTTPS
We suggest you to enable HTTPS, so that you visit Web service through a secure communication
channel.
7. MAC Address Binding
We recommend you to bind the IP and MAC address of the gateway to the device, thus reducing
the risk of ARP spoofing.
8. Assign Accounts and Privileges Reasonably
According to business and management requirements, reasonably add users and assign a
minimum set of permissions to them.
9. Disable Unnecessary Services and Choose Secure Modes
If not needed, it is recommended to turn off some services such as SNMP, SMTP, UPnP, etc., to
reduce risks.
If necessary, it is highly recommended that you use safe modes, including but not limited to the
following services:
SNMP: Choose SNMP v3, and set up strong encryption passwords and authentication
passwords.
SMTP: Choose TLS to access mailbox server.
FTP: Choose SFTP, and set up strong passwords.
AP hotspot: Choose WPA2-PSK encryption mode, and set up strong passwords.
10. Audio and Video Encrypted Transmission
If your audio and video data contents are very important or sensitive, we recommend that you
use encrypted transmission function, to reduce the risk of audio and video data being stolen
during transmission.
Reminder: encrypted transmission will cause some loss in transmission efficiency.
11. Secure Auditing
Check online users: we suggest that you check online users regularly to see if the device is
logged in without authorization.
Check device log: By viewing the logs, you can know the IP addresses that were used to log
in to your devices and their key operations.
12. Network Log
Due to the limited storage capacity of the device, the stored log is limited. If you need to save
the log for a long time, it is recommended that you enable the network log function to ensure
that the critical logs are synchronized to the network log server for tracing.
13. Construct a Safe Network Environment
In order to better ensure the safety of device and reduce potential cyber risks, we recommend:
Disable the port mapping function of the router to avoid direct access to the intranet
devices from external network.
The network should be partitioned and isolated according to the actual network needs. If
there are no communication requirements between two sub networks, it is suggested to
use VLAN, network GAP and other technologies to partition the network, so as to achieve
the network isolation effect.
Establish the 802.1x access authentication system to reduce the risk of unauthorized access
to private networks.
Enable IP/MAC address filtering function to limit the range of hosts allowed to access the
device.
31