0

I'm making a udp connection between a PC and a mobile (Android device) over 3G to stream video and other things. I tested my code over Wifi connection and it works just fine.

The problem is: when connecting over 3G, the connection doesn't work unless the first two fields of the IPs are the same

for example:

  • if the PC IP = 10.220.x.x and the mobile IP = 10.220.x.x, the connection works.
  • if PC IP = 10.220.x.x and the mobile IP = 10.219.x.x, the connection doesn't work.

Anyone knows where the problem is or how could it be solved? I mean it's so hard to get similar IPs, I could keep disconnecting and re-connecting to get different IPs forever and just get two similar IPs once in a million (since i cannot manually change IP in a 3G network) and it is driving me crazy.

Thanks

Ant4res
  • 1,217
  • 1
  • 18
  • 36

1 Answers1

0

Most mobile networks are NATed against the Internet (blocks UDP traffic). Furthermore it looks like your operator also has different subnets that are firewalled against each other, blocking all UDP traffic.

In general using UDP in mobile networks nowadays is a bad idea. The common usage of UDP is Voice-over-IP and that is a use-case nearly all mobile network operator disallow because this could cost them profit.

Robert
  • 39,162
  • 17
  • 99
  • 152