# Able to connect UDP but not TCP...



## FaneDuru (Feb 17, 2012)

I recently purchased a surveillance system and its DVR should be accessed through Internet or direct cable connection.
For being able to do that there is a specific application on CD that accompanied the furniture an I installed it (VideoViewer).
I try to connect to DVR from my laptop, following the instructions in the documentation supplied with the application. Laptop OS - Windows 7 32 bit:
- I configured the properties of 'Local Area Connection' - Internet Protocol Version 4 (TCP/IPv4), like it was the recommendation. IP: 192.168.1.100 and Subnet 
- DVR has Static IP: 192.168.1.10 (same Subnet Mask).
- I used a crossover cable.
- I can ping DVR IP and I can do that using crossover orregular network cable ...
- The application has an option to identify computers on the network and it locates DVR with its IP plus Default gateway, preferred DNS, secondary DNS. 
- I memorize the connection in question, pass username and password (the default ones) and I try to connect.
- There are two options: TCP and UDP.
- TCP - invariably receive the error message: "Login Failed".
- I changed the 80 port, being afraid that It may be blocked by another application (in 100) . I did of course the change in DVR settings, too.
- I also unchecked TCP/IPv6 trying to avoid a potential conflict, but nothing changed.
- I tried without any hope to connect UDP and I could connect and log ... I could change the password and do whatever I wanted inside DVR. I could not see the image very well, but I am able to connect using ordinary network cable or crossover, too.:nonono:

- What do you think I did wrong so I can not connect via TCP? Is there a service in Windows 7 that maybe is not started on my laptop (VOSTRO 1310)? What else do you suggest to try?:banghead:


----------



## FaneDuru (Feb 17, 2012)

I can also mention that windows firewall is off and I also stopped antivirus but anything good...


----------



## Wand3r3r (Sep 17, 2010)

usually the dvr comes with software. Did yours?
lets see a ipconfig /all from your laptop.


----------



## FaneDuru (Feb 17, 2012)

Yes, it did. I was trying to connect using 'Anytime & Anywhere' delivered with all the furniture. This one is not able to connect TCP... Only UDP.

In the meantime I connect to DVR using a wireless router. Initially I connected DVR to that router using DHCP (user and password) and after I switched on Static IP keeping the allocated one. I could in this way connecting through INTERNET using the external IP of the router and a forwarded specific port for the chosen internal IP of DVR. Now the laptop IP is in the same range being allocated by the router. The router internal IP is 192.168.0.1. DVR internal IP: 192.168.0.142. I am still able to connect only UDP...

I am also able to connect in browser (Mozilla). I do not know if TCP or UDP...

Thanks for your interest in helping me!

I am attaching the resulted pictures of IPConfig/all (I did not know how else to present the result in order to be visible enough):

If more relevant if connected just let me know...


----------



## FaneDuru (Feb 17, 2012)

For the sake of being correct I firstly connect to the router PPPoE, after that DHCP and finally set Static IP...


----------



## Wand3r3r (Sep 17, 2010)

Your ip addressing isn't matching

"DVR has Static IP: 192.168.1.10 " from post #1

192.168.0.114 is your ip address from post #6

So what is going on? Change your ip plan?

what ports udp and tcp does the program use?
when on the lan can you view the cameras clearly?
in the router did you forward the ports both udp and tcp?


----------



## FaneDuru (Feb 17, 2012)

Some time passed between my first post and the second one... Firstly I tried to directly connect using the default DVR IP. I could do that using received application ('Anytime & Anywhere') only by UDP.

In the meantime I didn't stay and pray... I tried to configure the system in order to access it through internet. So, I connected DVR to router setting PPPoE (imputing user and password of router), after that DHCP in order to automatically receive an IP of the router range and finally Static IP: 192.168.0.142. In this way it was not necessary to make any change to my laptop in order to access it wireless. I forwarded a port (8080) for that IP and I could connect through internet. But using the received application only on UDP. Not TCP. I could access it in browser too (LAN and internet), but I do not know if UDP or TCP...

Theoretically it is not any restriction of ports used by the program. I tried a lot of ports (starting with 80, followed by 100, 200, 101, 25, 21, 1000, 8080, etc), but I could connect with all those ports only UDP.

I am not very satisfied about the image quality...

Yes, I forwarded both TCP and UDP.


----------



## Wand3r3r (Sep 17, 2010)

How are you determining you are connecting on the lan to the dvr by udp?

You can't specifiy use just tcp or udp in a lan situation unless the dvr software specifically lets you do that.

specifically what is the make/model of your dvr and specifically who is the manufacturer of the software anytime and anywhere?

The dvr manual should state the specific ports used. You can't just use any port since the dvr is listening on specific ports.


----------



## FaneDuru (Feb 17, 2012)

When I set a connection using the specified software there are two radio buttons and you can choose only one: TCP (default) or UDP. When I select TCP all the time the error message 'Connection failed'. Selecting UDP I am able to connect. Otherwise, I do not know what kind of connection I use...

DVR itself does not have any option from this point of view. Or it is hidden and I can not access it. The vendor specialist suggested to try TCP because it should work...

DVR: AVTECH (Taiwan)/ Model: DR046Z. 'Anytime & Anywhere' looks to be Chinese, too.

DVR is listening oo any port you set... I order to be accessed through internet you must forward the specific port for local IP of DVR. I did it I I could connect.


----------



## Wand3r3r (Sep 17, 2010)

If you can't connect via tcp on the lan there is a misconfiguration / defective DVR
You do want to use tcp since it makes sure the date gets there whereas udp doesn't


----------



## FaneDuru (Feb 17, 2012)

Yes. That's why I think I need TCP, too. But I am able to connect in browser and also mobile phone having good visibility and I just hope that it is a problem with video software...


----------

