01304 827609 info@use-ip.co.uk Find us

Consistency of Hik Connect and iVMS4200

Bluenose1940

Centurion!
Trusted Member
Messages
146
Points
18
So frustrated at the moment

Hik connect and iVMS 4200 working perfectly for almost a week and then today........

Why are these apps so inconsistent or more to the point, why are they consistently inconsistent?

Just can't get either of them working at the moment.
 
You might need to provide a little more info regarding your setup - app, connection method etc. Both are working fine.
 
Hello JB1970, It really is very frustrating. Everything seems to be working fine and then boom! everything aint, it aint not:mad:

The Hik-Connect on my iphone keeps showing the message 'Network is unstable Connecting again' I can't understand this as nothing has changed. There is nothing 'unstable' about the network, everything is fine, except for this of course.

With regards to iVMS4200, I get the message 'Re-Connecting error Code Open SDK String Error (50207)

When I try to use the system via Internet Explorer everything seems fine except for no Live View.

Previously when I logged into each of these systems everything is perfect and I'm into Live View without any problems whatsoever.
 
It certainly seems as though the issue is network related and may just be a configuration issue. How do you have the network setup for Hik Connect?

  1. Does the NVR have a static IP address configured? Or is it set to receive an address automatically from your router via DHCP?
  2. Have you set up port forwarding in your router for the ports used by the NVR or have you enabled NAT in the NVR to map the ports automatically?
I saw one of your other posts where you mentioned that the IP had reverted to 0.0.0.0. My thinking is that you've got the NVR set up to receive its address via DHCP and your router is not playing ball always, causing it to lose it's address and/or NAT is enabled rather than port forwarding and your router is failing to map the ports causing the connection to fail with Hik Connect.
 
Sorry for the delay in getting back, been out this afternoon,
Yes i think that the IP address is a static one. I always use the same number when using Hik Connect through Internet Explorer and have never enabled DHCP.

Also, I have never had to use Port Forwarding ever since having the HikVision setup.

Are there any screenshots that I could take that might be of some help?

Thank you for trying to help with my problem.
 
Sorry for the delay in getting back, been out this afternoon,
Yes i think that the IP address is a static one. I always use the same number when using Hik Connect through Internet Explorer and have never enabled DHCP.

Also, I have never had to use Port Forwarding ever since having the HikVision setup.

Are there any screenshots that I could take that might be of some help?

Thank you for trying to help with my problem.

If you're connected using Internet Explorer - the menus of interest are:

- Network > Basic Settings > TCP/IP tab
- Network > Basic Settings > NAT tab

That will confirm whether you are using DHCP and/or NAT/UPnP.
 
Hopefully I have managed to get the shots that you want.
 

Attachments

  • TCP_IP.jpg
    TCP_IP.jpg
    47.3 KB · Views: 283
  • NAT.jpg
    NAT.jpg
    36.6 KB · Views: 274
Hopefully I have managed to get the shots that you want.

OK so you have a static IP but you have the UPnP enabled. UPnP needs to also be enabled in your router for that to work - it probably already is by default. It's designed to make life easier and automatically map your ports but doesn't always work great. The only time I've ever used it on an installation was when it wasn't possible to login to the router and set up port forwarding. Personally I would set up port forwarding:

  1. Uncheck the box for "Enable UPnP" and apply the change
  2. In the ports tab - change the port numbers for http, server, RTSP from their defaults. It's not uncommon to see connection attempts on the default ones. I use 50000 http, 50001 server and 50002 RTSP (having them consecutive makes the port forwarding easier in certain routers - 1 rule rather than 3). After applying the change you'll need to connect to your NVR at http://192.168.0.20:50000 going forward
  3. Login to your routers homepage at 192.168.0.1 and find the port forwarding settings - depending on model usually in security or firewall.
  4. Create a new rule to forward ports 50000 - 50002 TCP from any destination to internal IP 192.168.0.20
Thats it done for the NVR and router. In your Hik Connect app:
  1. Click on your site
  2. Click the three dots in the top right corner
  3. Click settings then Configure DDNS
  4. Set port mapping mode to manual then enter the server port, http port along with your NVR admin username and password
Job done

My only other thought is your NVR IP of 192.168.0.20.....

It's not a very high number. Your router assigns addresses from its DHCP pool in order. If 192.168.0.20 is within the DHCP pool range and you haven't reserved it for the NVR it's possible that you'll get a conflict at some point when that address gets assigned to another device which will lock out access to both devices. Easiest way to avoid this is to just change your NVR IP address to a higher number - I usually use 192.168.0.250 (or a number outside of the routers DHCP pool range)
 
Last edited:
Thank you again JB1970 for your very comprehensive instructions. I should point out that when I have installed iVMS4200 on my pc and Hik-Connect on my phone, they have both worked perfectly without any input from me. I have certainly never enabled the UPnP simply because I wouldn't have the faintest what it is or does.
Before I attempt to make the changes that you suggest, can I ask if any of them will have any effect on my Sky Q set up which is connected to the router?

One other point I should mention is that somewhere along the line I'm sure that it has been mentioned that in my case, port forwarding is definitely not necessary. having said that, I have found that whilst I can view the cameras via wi-fi when I am at home, it has never been very successful when I am away from home and so it may be that port forwarding could be the answer.

If you are happy to continue helping you may need a little patience as I am an 80 year old wrinkley but, if you end up giving in, I will totally understand. thanks again for all your efforts.

EDIT: I'm almost certain that it was Sky who said that port forwarding wasn't necessary. I'm just going to go into my router to try to see what's what.
 
Last edited:
No prob
Thank you again JB1970 for your very comprehensive instructions. I should point out that when I have installed iVMS4200 on my pc and Hik-Connect on my phone, they have both worked perfectly without any input from me. I have certainly never enabled the UPnP simply because I wouldn't have the faintest what it is or does.
Before I attempt to make the changes that you suggest, can I ask if any of them will have any effect on my Sky Q set up which is connected to the router?

One other point I should mention is that somewhere along the line I'm sure that it has been mentioned that in my case, port forwarding is definitely not necessary. having said that, I have found that whilst I can view the cameras via wi-fi when I am at home, it has never been very successful when I am away from home and so it may be that port forwarding could be the answer.

If you are happy to continue helping you may need a little patience as I am an 80 year old wrinkley but, if you end up giving in, I will totally understand. thanks again for all your efforts.

EDIT: I'm almost certain that it was Sky who said that port forwarding wasn't necessary. I'm just going to go into my router to try to see what's what.
No problem. None of the changes will affect your Sky Q. Just to explain a little what the port forwarding does and forgive me if you already know all this. Someone may appear and shoot me down in flames for my explanation!

Your Sky router has a single public facing IP address on the internet used for connection. However on the private side of your router you can have up to 254 devices (including the router itself) and each has it's own IP address from 192.168.0.1 - 192.168.0.254 enabling all your devices to communicate with each other within your home. All apps and programs use numbered ports - think of them as communication channels. When you are at home and the devices are connected to your WiFi network, port forwarding is not required, as they are on the same network and when one device communicates with the other, data moves freely between them. When you are away from home, your app will connect to the single IP address of your router (Hik Connect is keeping track of that IP address for you). When the app connects to your router, it sees the message and reads the port numbers, but as you have multiple devices within your home, it has no idea what to do with it - so it just gives up and drops the connection.

When you port forward, you are telling the router what to do when it receives a message using particular port numbers and it saves that instruction in it's memory. Next time the router receives a data packet from the internet, it reads the ports numbers, looks in its table for any instructions. If it finds one it carries it out, if not it drops the connection. So using the example in my previous post, when your router receives a data packet with the port numbers 50000, 50001 or 50002 in it, it will look in its table, see the rule created and send the information through to 192.168.0.20 - your NVR.

UPnP (Universal Plug and Play) tries to do all of this automatically for you to make things easier. The NVR makes an out going connection, the router looks at the internal port numbers then translates them to different random external port numbers and saves this information in its memory. When something connects back to your router using those numbers, it knows what to do - it translates them back again and sends the information to your NVR. You can see this translation in your second picture. For this to work - the UPnP function needs to be switched on in the Sky router (it probably is by default). Unfortunately it doesn't always work correctly and that's when setting it up manually as described can help. Hikvision do recommend that it is set up manually for best results.
 
Wow that is some explanation, thank you. It's interesting that you mention the figure of 254 in respect of devices. This is confusing me slightly because somewhere in the 'configuration' settings I have spotted 255 (one too many!) which I think was repeated a couple of times.

I have been into my router settings and, I'm pretty sure that I have explored all of the options but, I have been unable to find the UPnP option to either enable or disable even if i wanted to.

Anyway, I am going to print off your instructions now and give it my best shot. Watch this space
 
I have been into my router and have (hopefully) attached a couple of images for your comments please.

My CCTV setup consists of the NVR and two cameras, both of which are connected directly into the NVR.

How do I determine which is which from the listed 4 items? Do I have to set up port forwarding for each device? I assume that the start port will be the 50000 and the finish port will be the 192.168.0.20.

Having looked into this a bit more I'm not sure if I should be doing the port forwarding in Security/Firewall Rules or Security/Services

Getting there slowly
 

Attachments

  • Router Services.jpg
    Router Services.jpg
    59.9 KB · Views: 215
  • Edit Services.jpg
    Edit Services.jpg
    24.7 KB · Views: 202
  • Firewall Rules.jpg
    Firewall Rules.jpg
    127.8 KB · Views: 214
Last edited:
On the Sky router it's done in two steps - you create a service including the port numbers, then you allow that service to access the NVR.

Looking at that first image (Router Services) showing cctv, cctv1, cctv2 and cctv3 - if they were already there when you found that page then someone has previously tried to set up port forwarding. As NAT was switched on in the NVR, it would explain whey you've been having issues.

1 First carry out steps 1 and 2 on my first message (change the port numbers and uncheck the NAT box in the NVR if you haven't already
2 In the router edit the "cctv" service to Type "TCP", Start Port 50000, End Port 50002
3 Delete the services "cctv1", "cctv2" and "cctv3" as they'll no longer be used
4 Delete firewall rules 2, 3 & 4 as they'll no longer be used
 
OK I have done pretty much all of that. Deleted those not required etc. but, when I come to change the port numbers it is telling me that 'The selected service is in use by the Firewall Rules' and that I will have to make the amendment in that section. However I'm not sure if I should be changing things in the IPv4 area or the iIPv6. The Ipv4 only gives rom for the figures 5000 and 5002 and not 50000 and 50002
 
OK I have done pretty much all of that. Deleted those not required etc. but, when I come to change the port numbers it is telling me that 'The selected service is in use by the Firewall Rules' and that I will have to make the amendment in that section. However I'm not sure if I should be changing things in the IPv4 area or the iIPv6. The Ipv4 only gives rom for the figures 5000 and 5002 and not 50000 and 50002
Ok you'd need to delete the rules first and apply the change before you can delete the services. It's IPv4 and you can definitely put 5 digit numbers in there
 
Apologies again for late reply, have been out all afternoon again.

I seem to have hit a stumbling block after deleting the items not needed. This what I am getting at the moment when trying to get to where I need to be to enter the 50000 and 50002 figures
 

Attachments

  • 1.jpg
    1.jpg
    116.9 KB · Views: 189
  • 2.jpg
    2.jpg
    82 KB · Views: 194
Apologies again for late reply, have been out all afternoon again.

I seem to have hit a stumbling block after deleting the items not needed. This what I am getting at the moment when trying to get to where I need to be to enter the 50000 and 50002 figures

OK. So first you want to edit that service called "cctv" so that instead of port 80:80 TCP/UDP it becomes port 50000:50002 TCP. You do that in the services page. The two images you put in your last message "router services" and "edit services" are where you edit that. If it gives you an error saying that the service is in use, you'll need to disable or possibly delete the firewall rule and add it back in again afterwards.

The firewall rule should be done in the IPv4 section - there should be no rule in the IPv6 section.

Sometimes it's easier just to delete the existing service and rule and then start again from scratch - service first, then rule.
 
Last edited:
Thank you for being so patient, it's very much appreciated.

Do these look right to you now? Is there a procedure to test that they are working?
 

Attachments

  • Edit services_2.jpg
    Edit services_2.jpg
    26.5 KB · Views: 185
  • Firewall rules_2.jpg
    Firewall rules_2.jpg
    117.1 KB · Views: 152
Thank you for being so patient, it's very much appreciated.

Do these look right to you now? Is there a procedure to test that they are working?

Yes they look correct. When you need to access the configuration of the NVR from now using a web browser on your network, you will use the address http://192.168.0.20:50000 (without the :50000 on the end your browser will assume you want to access the default http port 80 and fail to connect)

There are websites where you can check that port forwarding is working. Go to Open Port Check Tool - Test Port Forwarding on Your Router
  1. The remote address box will display the current public IP address of your Sky router (make a note of this)
  2. Type in 50000 in the Port number box and select check
  3. The result should show that the port is open
  4. Repeat for the other two ports
That proves the ports are opened by the service you created. If you want to prove the forward rule is working (that those ports will be sent to the NVR):
  1. Switch off wifi on your phone and if you have a 3G/4G connection...
  2. Open the phones web browser and type in http://remote IP address:50000 (the remote IP address that you noted earlier)
  3. The Hikvision login page should appear on your phones browser. It may not display correctly and you can't view images like that - this just proves the connection
Alternatively (if you don't have a mobile data connection on your phone) you could ask a friend to enter http://your_IP_address:50000 in their web browser and confirm what they see.
 
Well I've done the test and all of the ports are open and I can get to the website on my pc and my phone but still no 'Live View' available.

Should I have DDNS enabled? I did enable it but in the status box in 'Configuration' it says 'Connect to server failed'
 
Back
Top