Android Wifi Bandwidth

。_饼干妹妹 提交于 2019-12-07 08:14:27

Ok, first Wifi that is 54Mbps is 54 x 1024 x 1024 bits per second. So maximum 6.75 MB/s.

I did the experiment on my network that reports as 54 Mbps in my windows 7 box. Between my Windows 7 box (server) and XP box (client) I achieved 3.0 MB/s using basically the code above.

I then ran the same code between my Nexus 7 (server) and XP (client) and got 0.3 MB/s. So a significant drop-off in speed. I put the following in the constructor of the server thread:

android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);

and in the MANIFEST:

<uses-permission android:name="android.permission.RAISED_THREAD_PRIORITY"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

I also moved near the router and turned wifi off and then back on. It reported on the Nexus 7 as 54Mbps and when I ran it I got 3.0 MB/s.

So at this point same outcome as Windows 7 and about 44% of theoretical network throughput.

Using more than one TCP connection may allow us to get closer to 100% throughput.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!