Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulate Slow Internet Connection on a REAL device? [duplicate]

I need to test my application in conditions where even 2G Internet connectivity isn't at its full coverage (i.e. 2 bars instead of 4, 2G).

I prefer conducting these tests over WiFi.

Is there a way (programmatically or otherwise) to tell the Android OS on the real device to slow down or throttle Internet connection 56 Kbit/s?

Note: I know how to do this on the emulator. I'm looking for a way to do this on a real device.

Is this possible?

like image 699
scatmoi Avatar asked Jul 15 '12 02:07

scatmoi


People also ask

How do I simulate network issues?

Simulating a hard-down or node failure is fairly easy. All you have to do is turn off the node itself to verify how the system responds (system reconvergence). If high availability is enabled, a secondary/standby node will immediately take over and become the active node, servicing user requests.


1 Answers

In one of your comments you mentioned that you have a DD-WRT router, which is really a tiny Linux box. So you may be able to get a way with the tc command:

tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit 
tc class add dev $DEV parent 1: classid 1:1 cbq rate 512kbit allot 1500 prio 5 bounded isolated 
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 195.96.96.97 flowid 1:1
like image 142
Eternal Learner Avatar answered Sep 21 '22 07:09

Eternal Learner