Author Topic: Voxwav through routers on the same LAN (UDP problem?)  (Read 6669 times)

0 Members and 1 Guest are viewing this topic.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Voxwav through routers on the same LAN (UDP problem?)
« on: April 06, 2015, 12:06:45 AM »
In my house, due to bad Wifi signal through the rooms, I have wired routers physically connected to a main router through a switch. Only the main router is a DHCP server and all the routers are in the same network, 192.168.1.0/24.

My phone running Voxwav is on the same LAN as the PC running VC, which means both are using IPs on the same LAN 192.168.1.0/24, although they are in different routers. Actual Voxwav IP is 192.168.1.111 and the VC IP is 192.168.1.105 (it is a reserved IP that has been set on the DHCP).

When both Voxwav and VC devices are connected via wifi to the same router on my LAN, I see no issues, everything works perfectly.

When the PC running VC is connected via wifi to one router and Android phone is connected to another router, Voxwav reports the TCP error below:
Quote
Could not establish connection to 192.168.1.105:33339
failed to connect to
/192.168.1.105 (port 33339) after 3000ms: isConnected failed: EHOSTUNREACH (No route to host)

The PC does not show any sign of a connection on this test.

Then, I tested using a telnet app on the phone opening a TCP connection to 192.168.1.105 on port 33339. The history tab on VC running on the PC displayed "TcpMic.NewClient" which confirms the phone is able to make a tcp connection on port 33339 to the PC. So maybe this error message above is complaining about the TCP connection where it is not the real issue?

But I don't know what happens with the UDP connection and how it is necessary for Voxwav to perform its job. I suppose this is the part of the communication that is not working.
On a side note, the antena icon on Voxwav pro does not find the IP of the PC on this scenario and I suppose it is because of the broadcast that can't pass through from one router, through the switch and then to another router. ANyway, I have set the host IP for the UDP config on Voxwav manually to 192.168.1.105.

From the wiki:
"Your Android device must be connected to the same LAN (local area network) as the PC running VoxCommando"
Technically, both the android and PC are in the same LAN in my case, but maybe you meant they should be on the same router?

Could you please give me some light on what can be done to fix it?


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #1 on: April 06, 2015, 08:09:41 AM »
I think it's just a question of setting up your LAN correctly.  The second router must be in bridge mode with no firewall etc.

I have used VoxWav to connect to VoxCommando running on a PC in another city through a VPN with no issues at all.

UDP is used for all text communication in both directions and for the hello broadcasts.

The actual audio is sent over TCP and AFAIK no UDP is required for it to work. Somehow that connection is not being allowed and the error message means what it says. I'm not sure why telnet appears to be able to get through on that port.

If I can find time I will pull out an old router and try to set up a bridge to do some tests. I'm pretty sure the solution will be in setting up the network and not a fix in VoxWav but I'll try to verify that it is possible.  Only problem is that my old router is really really old and even if it still works it might not support bridge mode.

Are your routers connected to each other by ethernet cable or by WiFi?
« Last Edit: April 06, 2015, 09:57:21 AM by nime5ter »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #2 on: April 06, 2015, 08:27:28 AM »
I just tested by connecting my android through the WiFi on my Vera Edge and VoxWav worked perfectly in all respects. I assume the Edge creates a bridge to my router which my PC is on but there are almost no settings exposed on it so I will see if I can try that old router later on as well.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #3 on: April 06, 2015, 11:27:02 AM »
I have now tested this with my old DLINK DI-524 router as the wifi extender.  I basically just connected the DLINK to my main router using normal Ethernet LAN ports, disabled DHCP on the DLINK and then connected to it via wifi.

Topology:
VoxCommando on PC >>CAT5>> TPLINK Main Router >>CAT5>> Di-524 2nd router >>WIFI>> VoxWav on Android

All functions work perfectly.

So there is definitely something not right with your current LAN setup.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #4 on: April 06, 2015, 01:40:45 PM »
Thanks for your replies. Even being now sure this is not a problem with the software itself, I appreciate any help you guys can give me.

Quote
Are your routers connected to each other by ethernet cable or by WiFi?
The routers are wired to each other, but the wires are connected to a ethernet switch. I have kind of s spider network made of routers, having 5 routers in the house (router0 is the main router, then there are other 4 routers wired to an ethernet switch and the switch wired to router0).
Let's call the router which does not work by router1.
Now the weird thing. Yesterday I went to bed (which means my phone has connected to router2 that is in my bedroom) and decided to do one last test. And it worked fine through router2.
For the record, all the routers have their firewalls disabled.

I'm wondering now where and how the communication is failing so I can troubleshoot the network here.

Today I tried on router3 and again is does not work. Router4 also don't work.

Now wondering why router2 works and all the others don't. They are similar routers, all with firewalls disabled, and all connected to the main router (router0) through an ethernet switch. :bonk :bonk :bonk :bonk :bonk

I'll look for an app to test TCP/UDP communication and will see how it goes.

Thank you!
« Last Edit: April 06, 2015, 01:52:27 PM by marcusvdt »

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #5 on: April 06, 2015, 01:49:52 PM »
UPDATE

I've downloaded a software called packet sender and installed it on a notebook. Then I have connected this notebook to every router (1-4) I have at home so I could use it for the network tests.
The test I have made consists of:
1-to send a HELLO broadcast via UDP
2-to send a vc.tellvox&&<command> via UDP to the specific IP of the VC computer
3-to send a dummy packet via TCP and see how VC reacts.

For my surprise, it did work! I've been able to see all the packets arriving at the VC computer and VC did react accordingly to each packet.

Then I tested again with Voxwav Pro running on my phone, the exact same way it was not working before, and now it did work. Will test on the others in a few minutes.

Still confused!
 :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk
« Last Edit: April 06, 2015, 01:54:07 PM by marcusvdt »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #6 on: April 06, 2015, 01:53:25 PM »
I've never tested on a network with 5 routers attached but I can see how it would lead to some problems.

Maybe you can learn something from the one that works.

Good luck.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #7 on: April 06, 2015, 01:54:26 PM »
Are any of your routers connecting to the master router using their WAN ports or are they all using regular LAN ports?

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #8 on: April 06, 2015, 05:39:45 PM »
Are any of your routers connecting to the master router using their WAN ports or are they all using regular LAN ports?
It seems the issue is intermittent and is probably related to ETHERNET addresses (physical addresses) not being propagated among all the routers. I will still investigate, but right now Voxwav is working while connected to every router on the network.

For the benefit of others who may have the same issue in the future, I'll tell some more details about my topology and what I did to make it work (at least for now).

All the routers are wired among them, and all using only lan ports for the LAN wires. The WAN port is connected only on router0, which is the router provided by my internet provider.
Only devices like laptops or phones make use of the wifi signal. The VC computer also connects to the LAN via wifi, through router0.

The topology is like this:

Code: [Select]
internet------coax_cable----------router0---------------cat5_cable------16_port_ethernet_switch
                                     |                                   /   |  |  \
                                   WIFI                                 /    |  |   \
                                     |                      ___________/     |  |    \__________
                                VC COMPUTER                |                 |  |               |
                                                           |                 |  router3         |
                                                           router1           |                  router4
                                                                             router2
Android phones and other wifi devices alternate transparently from one router to another without issues.
For example, I have two android tablets working as IP cameras in the same wifi network and listening on TCP port 4080. Zero issues even with port forwarding (NAT) configured to allow access to the cameras from the internet.

My issues seems to have gone once:
1-I logged in to each router admin console through the web browser
2-then went to its diagnostics page
3-then pinged the IP of the VC computer (192.168.1.105)

After that, the IP and corresponding MAC address for the VC computer appeared on the ARP table on each router (the ARP table can usually by seen on the binding menu, on the router's admin console). Coincidence or not, Voxwav started working after that.

If I discover further details about my issue, I'll post here for future reference.

Thanks!!!


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #9 on: April 06, 2015, 06:52:46 PM »
Thanks for the update.  I'm glad you got it working even if we aren't 100% sure what the cause was.

I hope you can keep it working without having to log into your routers all the time.

* What kind of switch is it.  The dumber the better IMO.
* I wonder if it would solve the problem to have the VC machine wired to one of the routers instead of using Wifi.

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #10 on: April 07, 2015, 03:39:56 PM »
are all routers broadcasting the same SSID ? if so ... your PC might be switching from one router to another ... which will make routers confused how to send packets to it
so as james said wiring your PC to a router will solve the issue probably ...

I experienced similar issues as my router support 2 different wifi networks ... had all kind of troubles till I separated the SSID for the 2 networks 

http://www.webopedia.com/TERM/S/SSID.html
When Voice command gets tough, use hand gestures

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Voxwav through routers on the same LAN (UDP problem?)
« Reply #11 on: April 08, 2015, 03:23:10 PM »
are all routers broadcasting the same SSID ? if so ... your PC might be switching from one router to another ... which will make routers confused how to send packets to it
so as james said wiring your PC to a router will solve the issue probably ...

I experienced similar issues as my router support 2 different wifi networks ... had all kind of troubles till I separated the SSID for the 2 networks 

http://www.webopedia.com/TERM/S/SSID.html
Thanks for the interest!
All the routers, except router0 (the main one) are broadcasting the same SSIDfrom, in different RF channels to avoid interference where the wifi signal of one router can hit the other one.
The VC computer is connected to router0 through a different SSID that is being broadcasted only by router0, and it is not switching to another routers because this computer does not know the password for the other SSID.

But yes, I suspect the issue has something to do with switching between routers, but on the other end: my phone. My cell phone does switch between different routers transparently while I move through the house, according to the stronger signal.
The issues are probably related to lower network layers (eg. physical). The only weird thing is that while Voxwav wasn't able to connect to port 33339, I've been able open a telnet app in the phone and make the connection to VC. That was confirmed by the message newclient on VC history tab.
I just repeated the same test, and this time telnet did not work too.

Another interesting thing is that when I use a notebook running Windows to make the telnet tests I don't see the same issue, so maybe this is something with Android specifically.

The issue is intermittent and very annoying, but still don't know how the cause.

Thanks for trying to help anyway...