WiFi Speed Test for Android Guide

WiFi Speed Test for Android

wifi_analyzer_promo5_png

Content

Introduction
Online demo
How to test the speed between two mobile devices
How to test the speed between a mobile device and a computer
How to test the Samba share speed
How to test the network stability (continuous test mode)
How to use Test results list
Understanding wireless network warnings and network details
Use Ethernet mode

Introduction

After I received a few feedbacks from my users that the functions of my application are not clearly understandable  (and they may be right because I am a developer and look at my program in developer glass), I’ve just decided to write a detailed guide.

In this post, I will guide you how to use the WiFi Speed Test for Android application, step by step.  You need to perform only a three-five easy and simple steps to test your network.
First of all, here is a schematic graphic about the theoretic topology:
graphic
As you can see, this is a client-server application, because the traffic goes from the client to server (or from server to client in download mode) via local network. So the test has two basic components: this application started in client mode, and this application started in server mode on other mobile/tablet, or my wifi_speed_test_server program started on a computer.
Just imagine it as an Internet speed test, where the remote server is not located on the Internet but located on your local network. That’s the reason why you need a second device that can be an other mobile device or a computer. This is the only way to measure the speed of your local network.

Before you are reading more, make sure that the WiFi Speed Test application is installed on all of your devices and already running and your devices are connected to the same network.

Online demo

I created a few demo animations to make the usage of my application easier. You can find them here: online demo animations

Also a youtube video is available:

Without ads

From now, you can buy the ad free version of WiFi Speed Test: Get WiFi Speed Test Pro on Google Play.

Update (2016.10.03): iperf support added

How to test the speed between two mobile devices

Note: use this test if you want to measure the speed between your mobile devices and you have at least two Android based mobile devices (does not matter if it is a mobile phone or a tablet).

  • step1: Take one of your mobile, scroll down and select TCP SERVER mode
  • device-2013-11-26-184736
  • step2: Click on Start. Note the displayed IP address (e.g.: 192.168.20.4). It is displayed in the next form: 192.168.20.4:1212 (where 1212 is the default port used by the application).
  • device-2013-10-07-193645
  • step3: Take the other mobile, scroll down, select TCP CLIENT mode.
  • step4: Give  the above IP address (in my example: 192.168.20.4) for Remote server address.  When you start the test, these values will be saved automatically.
  • device-2013-11-26-185012
  • step5: Click on Start, and the test will begin. After the test finishes, scroll to the right side and see your result in the result list.
  • device-2013-10-07-193312device-2013-10-07-193318

How to test the speed between a mobile device and a computer

Note: use this test if you want to measure the speed between your mobile device and a computer. Your computer can run Windows or Linux/Unix, both operating systems are supported.

  • step1: Download my wifi_speed_test_server.py or wifi_speed_test_server.exe (older name: tcpserver.py or tcpserver.exe) program for your computer. The python script also runs on Linux, the .exe is designed for Windows. You can download it from here.
  • step2: Before continuing, please read the tcpserver manual and do the required steps. Just for remember: start a cmd line and start it: python wifi_speed_test_server.py or wifi_speed_test_server.exe
  • step3: Take your mobile, scroll down and select TCP CLIENT mode.
  • step4: Give  the IP address of your computer (in my example: 192.168.20.4) for Remote server address (the way to know the IP address is in the tcpserver manual).  When you start the test, these values will be saved automatically.
  • device-2013-11-26-185012
  • step5: Click on Start, and the test will begin. After the test finishes, scroll to the right side and see your result in the result list.
  • device-2013-10-07-193312device-2013-10-07-193318

How to test the Samba share speed

Note: I assume you already have a configured Samba share. My application also handles if it needs authentication.

  • step1: Take your mobile, scroll down and select SMB CLIENT mode.
  • step2: Give the shared folder path, in the next form: IP address/shared-folder-name. For example: 192.168.20.4/my-shared-folder. If authentication is needed, set the Username, Password and Domain fields (they are optional parameters). When you start the test, these values will be saved automatically.
  • device-2013-11-26-185115
  • step3: Click on Start, and the test will begin. After the test finishes, scroll to the right side and see your result in the result list.
  • device-2013-10-07-193312device-2013-10-07-193318

How to test the network stability (continuous test mode)

Note: this type of test is intended for testing your network stability and in this mode you can discover your Wifi strength in all corners of your flat. This will keep testing the speed for as long as you want. You will need to manually stop it.

  • step1: Take your mobile, press Settings and go to Settings/Network Settings/Transfer Settings and select Transferred data size.
  • step2: select Limitless: until stop option than go back
  • device-2013-10-07-202359
  • step3: choose between the following test modes and start the test: How to test the speed between two mobile devices, How to test the speed between a mobile device and a computer
  • Tip (from v.1.6.1): during the test, select Current speed instead of Average speed so you can see the actual result. You can change the duration of the sampling period between 1 and 10 seconds in Settings/Network settings/Sampling period menu, so when you are using the Current speed mode, the result is calculated based on the last N seconds(default: 1 second).

How to use Test results list

In portrait mode, just scroll to the right side, you can find your previous results in this list. If you click one of the results, you can find the detailed information in the pop-up window. In landscape mode, if the screen width is at least 600 pixels, you will see the Test results list in the right panel.

device-2013-10-07-193312device-2013-10-07-193318device-2013-10-07-193323

device-2013-10-01-200459_10col

Understanding wireless network warnings and network details

This function is available from v1.6.1. If you scroll to the left side to the Wireless Network Details panel, you can find here a lot of useful information. You can check the basic information of your network like SSID, IP and MAC address, frequency, AP vendor and others.

device-2013-10-16-200114

The most important elements are the RSSI (signal strength) and frequency. If the signal power level of your network is lower than -75 dBm you will get a warning about it. Usually the higher signal power gives you better performance.
Also the application warns you if there are other networks using overlapping frequency. Overlapping frequencies can cause interference on your network (for example packet duplicating) and can decrease the performance. The algorithm is not too strict, it will only warn you if the difference is not higher than 11 MHz (2 channel) and the signal power strength is at least -75 dBm or higher.
Just an example: if the frequency of your network is 2462 MHz, than you will get warnings if there are other networks that are using the frequencies between 2451-4273 MHz and their signal power level (RSSI) is at least -75 dBm or higher. You can reach the best performance if there are no other networks within +-11 MHz compared to your frequency. Unfortunately, in crowded wireless environment you can’t avoid this type of interference.

Other options


Use Ethernet mode

  • If your device uses an Ethernet connection instead of Wifi, go Settings/Network Settings and enable Ethernet mode. In this mode all Wifi related update will be disabled.
  • device-2013-10-07-193251

Wifi, Ethernet and Samba speed test for Android

With reference to my previous post (Local network speed test for Android) and based on the feedbacks I released the new version (v1.4.1) of my Wifi Speed Test application.

Here are the new features:
* Added Ethernet mode: this is very useful if your device uses Ethernet connection instead of Wifi. It is common case with smart mediaplayers or other Android based smart devices or hubs. You can enable it on Settings/Network Settings by clicking Ethernet mode. After enabling it, you can test your Ethernet speed with this android application.
* Added screenshot button: You can take a screenshot about your result and share it instantly on Facebook, G+ or anywhere you want.
* Added latency information: from now, the latency is also displayed for your network (sometimes pretty useful).
* Minor GUI redesign to get more space.
* And of course some bug fixes.

And the “old” features (if someone did not read my previous post):
* Test Wi-Fi/LAN speed between your mobile phones/tablets.
* Test Wi-Fi/LAN speed between your mobile devices and your computer
* Test Samba share speed (from v1.1)

You can download it from Google Play or SlideMe:
* https://play.google.com/store/apps/details?id=com.pzolee.android.localwifispeedtester
* http://slideme.org/application/wifi-speed-test

If you liked it please rate on Google Play, if not (well it can happen) just send me a bug report what’s wrong. Also you can send me any other idea about what you would change or new feature request.
Thank you!

Don’t forget, if you want to use with your computer, you need my tcpserver application that is a Python program:
https://bitbucket.org/pzolee/tcpserver
How to use it: https://bitbucket.org/pzolee/tcpserver/wiki/Home

Finally a few screenshots again:
device-2013-09-12-192742

device-2013-09-12-192809

Local network speed test for Android

*** THIS CONTENT IS ALREADY OBSOLETED

*** For the details of the newer version read this post: https://pzoleeblogen.wordpress.com/2013/11/26/wifi-speed-test-for-android-how-to/

A few weeks ago, I just wanted to test the speed of my local network between my Android based mobile and my computer due to slow file transfer problem.
Unfortunately, I was not able to find any useful LAN speed test application, however there were a lot of Internet speed test applications (but they can’t test the speed of the local network).

This problem inspired me to write an easy LAN speed test application. You can find it on the Android Market: Local WiFi Speed Test

You can test the speed of your WiFi/LAN between your mobile devices, or between a mobile device and your computer. Also because my original problem was caused by slowness of a Samba share, I added a possibility to test Samba speed between your mobile and a computer.

How it works

First of all, the application always displays the current SSID of the connected WiFi network, the current signal strength level (in dBm) and the current link level, so you can use it any time to check these values without starting the test.

Here is a video about my application:

Speed test between Android based devices

  • Install the above application to your mobile devices.
  • Select Server mode on one of them and click on Start: it will display a progress bar and wait for an incoming connection
  • Select Client mode on the other device, add the hostname and port displayed by the server and click on Start. You can follow the speed changes on the speedometer. The progress bar displays the current position of the transferred data.
  • You can stop the test any time. If the status becomes “failed” it means some network issue happened.
Settings:
  • On Settings/Target settings you can set the default IP address/host name and the port number. They are loaded when the program starts.
  • On Settings/Transfer settings you can set the transferred data size (1, 10, 100 MB or limitless) and the message block size.
  • On Settings, you can switch between megabyte/kilobyte and megabit/kilobit

Speed test between Android based device and your computer

Samba share test

  • Select SMB client on your mobile, and add the samba share path to host field in the next form: myhost/shared-folder, or username:password@myhost/shared-folder
  • Click on Start: you can follow the same results as in the first case.

Classic speed test

For this test, you may need to install an external program to your computer. This program will simulate the server.

  • If you are running Linux, you can use netcat command on that way: nc -l(p) PORT > /dev/null
  • If you are running Windows or you don’t want to use the netcat command, you can download my tcpserver program written in python. You can download it from here: https://bitbucket.org/pzolee/tcpserver/downloads/tcpserver.py
    • After downloading, you can run it with the next command: python tcpserver.py -o nul PORT (to start it you need an installed Python framework: python.org). I didn’t want to offer a compiled .exe program, because perhaps you wouldn’t trust in it.
  • Select Client mode on your mobile, give the hostname/IP address of your computer and the PORT.
  • Click on Start and check the results.

Stability/Walking test

  • Go to Settings/Transfer settings and select “limitless”.
  • Now you can choose one from the above test types and run the test until you stop it.
  • Because there is no limit, the test will run forever, and you can check if your network is stable during a longer period, or just walk in your house or garden and discover the speed changes. If there is any network issues the test will hang and the status will change to “failed”.

Finally, here are a few pictures about the program:
lwst1
lwst2
lwst3

How to get UDP buffer statistics information on Linux

Well, however UDP is an unreliable protocol, maybe you would like to reach high performance using it due to several reasons, for example because your network devices (routers, switches) can only use this protocol instead of TCP. In that cases, the major problem is the packet loss because the kernel will drop the packages if its receiver or transmitter buffers are full.
To prevent it, you should fine-tune the buffers, but how will you know what the best sizes are?
If you increase the size of the buffers too high, you will lose more packages that you want when something evil happens for example your computer is restarted or crashed. If you are using too low values, kernel will drop the packages when the buffers are full.

The current size of the RX (incoming) and TX (outgoing) buffers and the number of dropped packages are stored in /proc/net/udp on Linux. This is not a very human readable file, thus I’ve written a smart python script that can collect the above statistics information and display them or write them to a CSV format file.

You can download it from here: https://github.com/pzolee/udpstat
Just download udpstat.py and get the help:

:~/udp-environment# ./udpstat.py -h
Usage: udpstat.py [options] port

UDP buffer size (RX, TX) and dropped packages statistics program, written by
PZolee (pzoleex @ freemail.hu), 2012

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-o , --output=
The name of the output file
-r, --rx Measure the size of RX(incoming) buffer
-t, --tx Measure the size of TX(outgoing) buffer
-d, --drops Measure the number of dropped packages for RX and TX
buffers
-b BLOCK_SIZE, --displayed-blocks=BLOCK_SIZE
The displayed block size for the TX, RX queues.
Possible values: B, K, M, all; default: all
-l , --listened-port-type=
The type of the listened port, default: local
-f FREQ, --freq=FREQ The time between two polls in sec, default: 1
-u RUNTIME, --run-time=RUNTIME
The running time if given. Default: untill CTRL+C
-c, --csv Generate CSV output format

For example if you want to see both tx and rx buffers including the number of dropped packages when your application receives data via UDP, just start it giving the listened port (that your application uses) and the time for the collecting (if it is not given it will collect the statistics information until CTRL+C is pressed):

:~# ./udpstat.py 5001 -u 10
Start collecting RX and TX queue statistics information and dropped packages result for port (5001)
2012-09-03T14:28:38.550504;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 0 bytes, 0 KB, 0 MB; dropped packages: 0;
2012-09-03T14:28:39.551747;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 0 bytes, 0 KB, 0 MB; dropped packages: 0;
2012-09-03T14:28:40.552996;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 0 bytes, 0 KB, 0 MB; dropped packages: 0;
2012-09-03T14:28:41.554350;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 332055496 bytes, 324272 KB, 316 MB; dropped packages: 0;
2012-09-03T14:28:42.555650;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 536869432 bytes, 524286 KB, 511 MB; dropped packages: 118733;
2012-09-03T14:28:43.556819;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 536869432 bytes, 524286 KB, 511 MB; dropped packages: 374088;
2012-09-03T14:28:44.558018;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 509777816 bytes, 497829 KB, 486 MB; dropped packages: 493162;
2012-09-03T14:28:45.559211;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 481418456 bytes, 470135 KB, 459 MB; dropped packages: 493162;
2012-09-03T14:28:46.560400;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 481418456 bytes, 470135 KB, 459 MB; dropped packages: 493162;
2012-09-03T14:28:47.561667;tx queue: 0 bytes, 0 KB, 0 MB; rx queue: 443327512 bytes, 432937 KB, 422 MB; dropped packages: 493162;
Maximum tx queue: 0 bytes, 0 KB, 0 MB;
Maximum rx queue: 536869432 bytes, 524286 KB, 511 MB;
Dropped packages: 493162

Running this program you can detect easily how full the buffers are and when the kernel starts to drop packages. Increasing the buffer size step by step, you will be able to specify the proper values.

How to mount a Truecrypt encrypted Windows system drive on Linux

This will be just a short post about how to mount an ecrypted Windows system drive on Linux. My laptop has a dual-boot system (Windows-Linux) and the whole Windows partition is encrypted by Truecrypt with pre-boot authentication. Yesterday, I booted my Ubuntu, but later, I wanted to get some files from the Windows partition without rebooting my laptop.

The solution I found was easy:

I just installed Truecrypt on Ubuntu and used it to mount the Windows encrypted system partition.
You can do it executing the following command:
root@thor-t410:~# truecrypt –mount-options=system /dev/sda1 /mnt/truecrypt/

where –mount-options=system means that this is an encrypted system drive, /dev/sda1 my encrypted drive and /mnt/truecrypt the place I wanted to mount it to. After executing the command, you should type your password.

Here is the output:

root@thor-t410:~# truecrypt –mount-options=system /dev/sda1 /mnt/truecrypt/
Enter password for /dev/sda1:
Enter keyfile [none]:
Protect hidden volume (if any)? (y=Yes/n=No) [No]:
Incorrect keyfile(s) and/or password or not a TrueCrypt volume.

Note that pre-boot authentication passwords need to be typed in the pre-boot environment where non-US keyboard layouts are not available. Therefore, pre-boot authentication passwords must always be typed using the standard US keyboard layout (otherwise, the password will be typed incorrectly in most cases). However, note that you do NOT need a real US keyboard; you just need to change the keyboard layout in your operating system.
Enter password for /dev/sda1:
Protect hidden volume (if any)? (y=Yes/n=No) [No]:

As you see I mistyped the password first time, because z/y was replaced in my Hungarian keyboard and in this case Truecrypt used US keyboard thus I had to repeat the good password with replacing the z/y.

To umount this drive just execute the following command:

truecrypt -d /mnt/truecrypt