Hikvision error code 7 shows up when you’re trying to view the cameras remotely on the iVMS-4200 camera management software. It’s caused by a misconfiguration of the local IP address on the recorder and by a port forwarding issue on the router.
The full message for this Hikvision error code is: HCNetSDK.ddl[7]. Failed to connect to the device. The device is off-line, or connection timeout caused by network.
In other cases it can be displayed as: [camera name] Logins failed. Error Code HCNetSDK.dll[7]. (Connecting to device failed. The device is offline or the network timed out).
You may see this error as “The device is off-line”, “The network is unreachable”, “Failed to connect to the device”, “Connection time-out”, “Connecting to device failed”.
How to fix Hikvision error code 7
There are a few things you need to check and modify in order to fix this issue.
It has been reported that error code 7 can be caused by a misconfiguration of the IP settings on the recorder. Go to the network setting of your recorder and take a look at the IP address, default gateway, subnet mask, preferred DNS, and alternate DNS. Make sure they match your network.
For example:
- DVR/NVR IP address: 192.168.1.100
- DVR/NVR Subnet Mask: 255.255.255.0
- DVR/NVR Gateway (your router’s IP address): 192.168.1.1
- Preferred DNS: 8.8.8.8 (for both DVR/NVR and router)
- Alternate DNS: 8.8.4.4 (for both DVR/NVR and router)
Check if all the ports are open on your router. You need to open the HTTP port, Server port, and RTSP port. Make sure these ports show all open. Contact your ISP support if you can’t fix it.
In a few cases, the ISP blocks the ports even if you forwarded them correctly on your router. So, you need to forward all these three ports (http, server, rtsp), most of the time the error code 7 is solved by following this step. Also, forward them on both UDP and TCP.
Many users report that changing the RTSP port from 554 to something else (let’s say 8554) fixed the issue. The new port still needs to be opened on the router.
Double-check the credentials settings on the iVMS-4200. Go to the Device Manager and check the added remote device IP address, username, password, all should be correct and without spaces.
All that being said, ensure you’re using the latest version of iVMS-4200 software and that the firmware on your DVR/NVR is updated to the newest one.