1

I cannot figure out how to send a UDP packet over a 4G LTE network from an Android app (no WiFi). Does anyone have any ideas or know where I can find some documentation? I need to write two android apps, one client and one server, so that I can send UDP packets with timestamps from one device to the other. This is to test 4G LTE network latency from device to device.

Please help!

Thanks!

JParks
  • 179
  • 1
  • 1
  • 13

2 Answers2

2

You can use the DatagramSocket class:

This should work regardless of WiFi or mobile connection type, although you may find some mobile operators have some restrictions on UDP connections.

Mick
  • 24,231
  • 1
  • 54
  • 120
  • I will look into this during the course of the week. Fortunately I have 3 LTE research networks and NDA's and access to all the major carriers, so hopefully I can get it to work or get some restrictions lifted. Thanks! – JParks Mar 21 '16 at 22:08
1

There are many existing Android Iperf apps that can be used for exactly what you are trying to do. I use Magic Iperf to do this type of testing myself.

Jeff
  • 688
  • 1
  • 13
  • 30