Hikvision strange behaviour

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
Hello everyone, I have a puzzling problem with a Hikvision DS 2CD2342I. This camera is set up to record motion detection on a Synology NAS, and to record a timelapse every hour on ISpy running on a PC. I have several other Hikvision cams set up the same way and have no problems with them. This particular cam stopped communicating with ISpy and will not to respond to any browser. But it still works fine with the Synology NAS. It shows up on Netgear Genie and on SAPD as being online and I can even change the pasword with SAPD, but ISpy can no longer find it when I use the scanner to try and reinstall. When I put in the parameters manually in ISpy I get an FFMPG open input error 138. The camera has no hard reset button and was bought on Amazon so I can't get a reset code from Hikvision.

The puzzling thing to me is why it would still work with the Synology NAS and nothing else. I tried Blue Iris, CMS, and VLC. They see the camera but can't connect.

Hoping someone has some insight into this problem and can offer a solution.
 

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
I was able to reboot the camera through Synology Surveillance Station and by power cycling. Nothing changed. All browsers say -this website is taking too long to respond- or -cannot reach this website-. I've tried increasing the wait time for slow response websites. That didn't help.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,786
Location
Scotland
All browsers say -this website is taking too long to respond- or -cannot reach this website-.
Are you using the same IP address as is shown in SADP? And the HTTP port is still 80?

Also - try double-clcking on the IP address as shown in SADP - assuming IE11 is the default, which it probably won't be, but even if not a login page would normally appear.
 

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
Yes and yes. Have tried double clicking in SADP. Chrome, Firefox, and IE all timeout without connecting. CMS finds it as a device and adds it to the list, but receives no picture. The fact that the NAS which runs Linux can connect but no Windows apps can makes me think that has something to do with it. Just happened out of the blue though. I think what I need is a way to do a factory reset, but I cannot find any kind of a button on the circuit boards.
 

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
Are you using the same IP address as is shown in SADP? And the HTTP port is still 80?

Also - try double-clcking on the IP address as shown in SADP - assuming IE11 is the default, which it probably won't be, but even if not a login page would normally appear.

Not sure if you received my reply on 3 Jan so copy and pasting here.

Yes and yes. Have tried double clicking in SADP. Chrome, Firefox, and IE all timeout without connecting. CMS finds it as a device and adds it to the list, but receives no picture. The fact that the NAS which runs Linux can connect but no Windows apps can makes me think that has something to do with it. Just happened out of the blue though. I think what I need is a way to do a factory reset, but I cannot find any kind of a button on the circuit boards.

Thanks for trying to help. Since there's no reset button on the camera and I can't do a factory reset through software, do you know of a schematic which might indicate a pinout whereby I could perform my own hardware reset? I realize I risk destroying the camera but I'm willing to take that risk as I need the camera to be accessable through Windows since I don't know Linux. If I can't get it to respond I'll have to replace it anyway. I had a similar problem with a Laview cam, which was obviously a Hikvision under a different name. Laview technical support is laughable, just scripted Indian phone farm support. That camera is now a dummy. All my other cameras are Hikvision model 2132 and they work fine. I have a sneaking suspicion that there is one giant company in China making cameras and selling them under dozens of different brand names, and that the hardware reset button was deliberately removed so that users would have to buy a new camera. I just recently bought a Dericam which not only has a reset button but also the option to do a factory reset online. I think in the future that will be my brand of choice.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,786
Location
Scotland
You can effect a factory reset by using the Hikvision tftp updater tool to re-install the same firmware version as currently installed, the version SADP shows.
The tftp updater : https://ipcamtalk.com/downloads/tftp.9/
The firmware for R6 IP cameras : https://ipcamtalk.com/downloads/r6-series-firmware-see-models-list.58/

The process in summary:
Unzip the tftp updater to a folder on the PC.
Unzip the firmware file digicap.dav into the same folder.
If the cameras are on NVR PoE ports, connect the PC to a spare port.
Set the PC IP address to 192.0.0.128
Start the tftp updater, double-click tftpserve.exe
Click OK to the Windows firewall popup
Check the updater status window shows initiallised at 192.0.0.128
Power cycle the camera.
Observer the status indications.
The process takes a couple of minutes to download the firmware, then a couple of minutes to update.
If / when the status window shows 'system update completed', job done.
Close the tftp updater.
Use SADP to 'activate' the camera with your own chosen password.
Update the camera password in the NVR camera configuration.
Put the PC back as it was.
 

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
Thanks so much for your help. All my cameras are on a 192.168.x.x segment. I used SADP to change this one to 192.0.0.105. I tried DHCP but it assigned a 168.x.x.x IP. Anyway after matching the segment and power cycling I still get nothing except _192.0.0.128 initialized_ message
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,786
Location
Scotland
For the tftp updater it's not required to change the camera IP address, the update process uses a preset address.

So, the camera is allowing you to change the IP address, meaning the password is valid.
In which case, it would be worth trying if you can reset to defaults using the Batch Configuration Tool.

*edit*
Available here : Tools-Hikvision
 
Last edited:

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
For the tftp updater it's not required to change the camera IP address, the update process uses a preset address.

So, the camera is allowing you to change the IP address, meaning the password is valid.
In which case, it would be worth trying if you can reset to defaults using the Batch Configuration Tool.

*edit*
Available here : Tools-Hikvision
Thanks again, but it still won't connect. I'll try to upload a screenshot. All the other Hik cameras respond and I can add to the batch list. This one throws an error every time. Yet still functions properly with the Synology NAS. Interestingly this batch program only locates my cameras on first run. I have to uninstall it and then reinstall and run or it doesn't detect any cameras.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,786
Location
Scotland
Odd behaviour on multiple counts ...

Just as a long shot, can you try this experiment, using a telnet client.
If using Windows and it doesn't already have one, this can be enabled in Control Panel | Windows Features
Or the Synology NAS should have a telnet client if you SSH into it.

At the command prompt, type :
telnet <your_camera_IP_address> 80
GET / HTTP/1.1

and press Return a couple of times.

Also try that with a normal camera IP address just to confirm it works OK.
 

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
Just as a long shot, can you try this experiment, using a telnet client.
If using Windows and it doesn't already have one, this can be enabled in Control Panel | Windows Features
Or the Synology NAS should have a telnet client if you SSH into it.

At the command prompt, type :
telnet <your_camera_IP_address> 80
GET / HTTP/1.1

and press Return a couple of times.

Also try that with a normal camera IP address just to confirm it works OK.[/QUOTE]

Still no joy. I was able to Telnet in to a working camera on port 23, but I had to log in through a browser window first to enable Telnet on the camera. The GET command was not supported. I tried getopts but I probably got the args wrong. Anyway I probably have Telnet and SSH turned off on the bad cam as well. Since I can't log in with a browser, I can't turn it on. Worth a try, though.
Thanks again.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,786
Location
Scotland
It's not needed to have telnet active in the camera in the usual way for this test.

All that's required is to use telnet against port 80 in place of the browser to see what if anything is the low-level response which the browser would not normally show.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,786
Location
Scotland
Here is an example of using telnet as normal against a camera where it is not supported - and using telnet to connect to the HTTP port 80 :
Code:
alastair@PC-I5 ~ $ telnet 192.168.1.101
Trying 192.168.1.101...
telnet: Unable to connect to remote host: Connection refused
alastair@PC-I5 ~ $ telnet 192.168.1.101 80
Trying 192.168.1.101...
Connected to 192.168.1.101.
Escape character is '^]'.
GET / HTTP/1.1

HTTP/1.1 200 OK
Date: Mon, 14 Jan 2019 19:41:59 GMT
Server: App-webs/
ETag: "383-1e0-5784b16e"
Content-Length: 480
Content-Type: text/html
Connection: close
Last-Modified: Tue, 12 Jul 2016 08:59:26 GMT

<!doctype html>
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" >
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
    <meta http-equiv="Expires" content="0" />
</head>
<body>
</body>
<script>
    window.location.href = "/doc/page/login.asp?_" + (new Date()).getTime();
</script>
</html>Connection closed by foreign host.
alastair@PC-I5 ~ $
 

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
I tried port 80 first and got no response at all. Then I tried it on a properly functioning cam and got a could not connect error until I explicitly enabled Telnet on the cam configuration page. Then I could connect only on port 23. I tried the GET command and got a command doesn't exist error. This was with Win 10 telnet client. Tried with Putty and got the same result.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,786
Location
Scotland
The idea behind this suggestion is to see if a telnet client can connect to the camera's HTTP port, and if so, see what response to a normal command it provides that may not be shown by the browser, and maybe get a clue to the problem.

Then I tried it on a properly functioning cam and got a could not connect error until I explicitly enabled Telnet on the cam configuration page.
This method has nothing to do with enabling telnet access to a camera, that is not required and is not relevant.

I tried port 80 first and got no response at all.
For a working HTTP port, there is no response until a command is issued.
It simply connects and waits.
But there is a short timeout waiting for a command, a second or so, before the connection is closed.
So you need to be quick entering the GET command.

The idea of connecting to a normally-working camera was to see the normal response, and then knowing how that works, try the problem camera.
The steps would be as follows, using the IP address of a camera where you know you can access the web GUI.
It might be easier to use the Windows command-line telnet. With PuTTY, when the connection closes, the session window will close, and you will miss the result.

Here is a Windows telnet example. Ensure that the number 80 follows the IP address, after a space.
If a connection succeeds, the command window will clear. That's a good sign, a connection has been made.
telnet <camera_IP_address> 80

The command should be entered exactly as shown below, in CAPS, and Return pressed a couple of times.
GET / HTTP/1.1
Code:
HTTP/1.1 200 OK
Date: Tue, 15 Jan 2019 09:50:35 GMT
Server: App-webs/
ETag: "383-1e0-5784b16e"
Content-Length: 480
Content-Type: text/html
Connection: close
Last-Modified: Tue, 12 Jul 2016 08:59:26 GMT

Ž++<!doctype html>
<html>
<head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" >
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
        <meta http-equiv="Expires" content="0" />
</head>
<body>
</body>
<script>
        window.location.href = "/doc/page/login.asp?_" + (new Date()).getTime();
</script>
</html>

Connection to host lost.

C:\Users\admin>
 

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
OK, tried it again on a working camera and it worked fine. The screen clearing the connect messages so fast is what threw me off. And then typing the command blind. I understand what you mean now by a low level connection. No login or anything . It's just listening. The response I got was similar to yours. HTTP/1.1 200 OK, followed by alot of metadata and a long script.

Alas, when I tried it on the bad cam I still got a -could not connect- error.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,786
Location
Scotland
Alas, when I tried it on the bad cam I still got a -could not connect- error.
OK, I think that low-level test confirms that there is no web service listening on port 80 on the problem camera.

So - if you want to experiment a bit more, as a long shot for this odd problem -
It might be interesting to see what services are listening on the camera, in case there have been any port changes, for unknown reasons.
There is a pretty easy way to do this if you don't mind installing the nmap tool on your PC -
Download the Free Nmap Security Scanner for Linux/Mac/Windows

If you do that, at a command line you'd use
nmap <camera_IP_address>
Against a working camera, for reference, and the problem camera, for comparison.
Normal example :
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\admin>nmap 192.168.1.101

Starting Nmap 7.60 ( https://nmap.org ) at 2019-01-15 15:54 GMT Standard Time
Nmap scan report for 192.168.1.101
Host is up (0.00s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
554/tcp  open  rtsp
8000/tcp open  http-alt
MAC Address: C4:2F:90:44:2A:C6 (Hangzhou Hikvision Digital Technology)

Nmap done: 1 IP address (1 host up) scanned in 5.33 seconds

C:\Users\admin>
 

ichus

n3wb
Joined
Jan 8, 2017
Messages
18
Reaction score
1
OK, working camera showed up working fine. Here's the results for the bad cam.

Microsoft Windows [Version 10.0.17134.523]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>nmap 192.168.1.105
Starting Nmap 7.70 ( Nmap: the Network Mapper - Free Security Scanner ) at 2019-01-15 09:54 Mountain Standard Ti
me
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn

Nmap done: 1 IP address (0 hosts up) scanned in 4.92 seconds

C:\WINDOWS\system32>nmap -Pn 192.168.1.105
Starting Nmap 7.70 ( Nmap: the Network Mapper - Free Security Scanner ) at 2019-01-15 09:54 Mountain Standard Ti
me
Nmap done: 1 IP address (0 hosts up) scanned in 5.12 seconds

And yet here's a screenshot from the NAS Surveillance Station;
Screenshot (4).png
 
Top