0

Noobish question -

I have a perl script running on a linux server which opens UDP port 7015. netstat -ulnp shows:

udp        0      0 0.0.0.0:7015                0.0.0.0:*                               16365/perl

nmap -sU -p 7015 'hostname' on a remote machine shows:

7015/udp open|filtered unknown

Now when I run a client java program on an Android device, and send a datagram, it works flawlessly under wifi, but not through the cell network - after wifi is turned off or the device is moved out of wifi range. Other than possible port-blocking by the provider, why would this socket work under wifi, but not GPRS?

softex
  • 3
  • 1

1 Answers1

0

Cellular network providers do some strange things with their traffic shaping policies. I'm willing to wager that they're dropping UDP. I know that some networks, and providers have a transparent proxy between your handset and the network that do some "naughty" rewriting things to packets. Sometimes they rewrite packets and spoof the TCP handshake so that things appear to load quicker.

In this case, I'll bet that they're dropping that traffic silently. There's probably bugger all you can do about it. When I'm writing android apps, I go out of my way to make sure that all connectivity back to a host is over HTTP in the form of a RESTful API, so that it looks, to most intents and purposes like a normal web connection.

Tom O'Connor
  • 27,440
  • 10
  • 72
  • 148
  • Yes, I have had success using java's HttpService, in effect hitting the server periodically with an HTTP POST. It works OK, but I am now testing all this with an M2M sim with - get this - a 200K/mo data plan. I was hoping to push a small packet over a socket with just a small amount of overhead - say 100 bytes total. I just know that http post is going to blow through that plan after just a few transmits. I'll give TCP another shot. And I'll try to get some response from the provider (Rogers), but many seem to have tried - and failed - to get definitive answers on this point. – softex Oct 16 '11 at 22:38