Xiaomi Mi3 wifi performance with TP-LINK archer c2 ac750 router

Hello guys,

I’ve just received this Mi3 phone, and tried my WiFi Speed Test app.
Using the TP-LINK archer c2 ac750 router, the link speed was 433 Mbps at 5 GHz. Finally, I could measure ~210 Mbps real speed via wireless. I think this is very reasonable.

Unfortunately, the link speed using 2.4 GHz network was only 72 Mbps.

And here is the YouTube video about the test:

Advertisements

WiFi Analyzer: 100 000 downloads exceeded!

I’m happy to tell you guys, you downloaded my WiFi Analyzer app more than 100 000 times.

wifianalyzer

Thank you guys!

Youtube tutorials for WiFi Speed Test for Android

I’ve just created a few short videos to demonstrate the usage of my WiFi Speed Test application.
You can watch the play list by clicking on this link or here embedded:


The content:

and others. Enjoy.

WiFi Analyzer Pro has been released

wifi_info_pro_new_pdd

Click on the image to get it

After I received a few questions about the availability of a paid but ad free version from people who don’t like ads but would like to buy it, I’ve decided to create it.

So now, the first version is released, you can buy it on Google Play: WiFi Analyzer Pro

It’s the same as the original version, the only difference that it does not contain ads at all. Before buying it, please try the free version.

How Android WiFi booster apps work

When a mobile has slow wifi connection, most of people try to download some wifi booster application from Google Play.

But do they work? Do they really fix the wifi connection or this is just a lie? Checking the comments, you can be confused because there are people who reported good results and others who had negative experience.

But what is the truth? I tried to collect the reasons and the explanations.

What wifi booster apps can do

Usually, they do only two things:

  1. disconnect than reconnect to the wifi network.
    However it seems to be a stupid thing, it can work but only in two cases:

    • if the router can dynamically change channel and the channels are overcrowded (there are too many overlapping networks). In that case the router may change the used channel to a less overlapping one when the mobile reconnects. It can only work if the router supports this mode and it is enabled!
    • The other case, when there are other routers in the same network (usually it happens in enterprise environment, very rare in home network). In that case, if there is another router with better signal, the mobile will reconnect to this router instead of the previous one.
  2.  tell the system to use wifi in high perf mode.
    It works only from Android 3.1 (HONEYCOMB_MR1) and only if the device (the hardware) also supports it. Some devices have several power saving modes, if a program uses this high perf mode, the system tries to prevent the device to go power saving mode. It can increase the performance.
    But you have to know that this is not a special thing and not only used by booster applications. Usually, high perf mode is used by any applications that need good wifi performance. For example if you are using an application that downloads something from the Internet or use Voice over IP (voice chat), it uses this mode (mostly). And because most applications use this mode, using booster app will not have any additional effect as high perf mode has been already set.

And here is what the booster apps cannot do:

  • Increasing the maximum send signal power. This is not possible because it is limited in the most countries by laws thus the manufacturers also limit it and do not allow to set higher value. And because there is no official android API to access the deep level settings of the network card even if the hardware supports some.
  • Increasing the receive signal power. This is also not possible because it would need stronger/bigger antenna and of course a program cannot change the physical parameters of a device. Don’t forget, this is a two-way communication, even if the router can receive the signal of the mobile, the mobile also needs to receive the signal of the router and vice versa. The smaller antenna of the mobiles have worse performance and it cannot be changed by a program.

To summarize the above states, the booster applications can work in special cases but not really often.
High perf mode is used by normal applications too (and this is the preferred way because they will use this mode only when they need it, to save your battery, instead of to use it always and discharge your battery very fast).

About the reconnecting, you can even do it manually (turn off/on wifi) and can work only in the mentioned special cases. Instead you should use some analyzer application to detect network bottlenecks. They can help you to detect overlapping networks and find the best channel. Also they can warn you for other problems too.

So I think the effect of the wifi booster apps mostly based only on the belief. They don’t really have possibility to fix a bad wifi connection.

Android: how to solve adview CPU consuming

adview can consume CPU when the application is in the background… This is a very common problem. Even if the application in the background or has been stopped, it can consume the CPU continuously.

Other symptom, if you disable ads, the CPU usage is minimal or zero.

This is caused by several reasons including possible adview bug too. Here, you can see how to solve the high CPU usage problem:

The first one is to destroy the adview in onDestroy() and onPause() (don’t forget to recreate it in onResume() and onCreate()):

private void destroyAdView() {
    if (adview != null) {
        adview.destroy();               
    }   
}

@Override
public void onDestroy() {
    destroyAdView();
    super.onDestroy();
}

@Override
public void onPause() {
    destroyAdView();
    super.onDestroy();
}

In newer admob sdk you can call adview.onPause() and adview.onResume() functions, but my experience that sometimes they don’t do what they promise.

If adview still consumes CPU, there is a second solution: removing the full adview from the layout, not only destroying it:

private void destroyAdView() {
    if (adview != null) {
        // In my case the adview has been added to a relativelayout
        RelativeLayout layout = (RelativeLayout) mainView.findViewById(R.id.adRelativeLayout);
        layout.removeView(adview);
        adview.destroy();               
    }   
    }

The two solutions above should solve the high CPU usage problem. Excepting only one case:
If you are using the new Google Play services library for adview. Google will only support this admob library after august, 2014.
It seems there is a bug in the library:
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/1aidjtsin8A
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/Qu4G19NFAuI

So if you experience high CPU usage after switching to the new library, you can use a workaround (pausing webview can have other effects too, so use it for your own risk):

@Override
    public void onDestroy() {
        destroyAdView();
        super.onDestroy();
    }
private void destroyAdView() {
    if (adview != null) {
        // In my case the adview has been added to a relativelayout
        RelativeLayout layout = (RelativeLayout) mainView.findViewById(R.id.adRelativeLayout);
        layout.removeView(adview);
        pauseWebView(adview);
        adview.destroy();               
    }   
    }

private void pauseWebView(ViewGroup v) {
    for (int i = 0; i < v.getChildCount(); i++) {
        View child = v.getChildAt(i);
        if (child instanceof WebView) {
            ((WebView) child).pauseTimers();
        }   
        pauseWebView((ViewGroup) child);
    }   
}

And finally, here is how I am creating the adview and a full example:

@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
...
createAdView();
...
}
private void createAdView() {
    if (adview == null) {
        RelativeLayout layout = (RelativeLayout) mainView.findViewById(R.id.adRelativeLayout);
        LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);

        layout.setLayoutParams(lp);
        RelativeLayout.LayoutParams adsParams = new RelativeLayout.LayoutParams(
                RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
        adsParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
        adsParams.addRule(RelativeLayout.CENTER_IN_PARENT);

        adview = new AdView(fragmentActivity);
        adview.setAdSize(AdSize.BANNER);
        adview.setAdUnitId("ca-xxxx");
        final AdListener listener = new AdListener() {
            @Override
            public void onAdLoaded() {
                //Here we will display the adview if there is ad
                adview.setVisibility(View.VISIBLE);
                super.onAdLoaded();
            }
        };

        adview.setAdListener(listener);

        //This needs to remove empty space when ad is not loaded, for example no internet conn.
        adview.setVisibility(View.GONE);

        layout.addView(adview, adsParams);

        AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
        .build();
        adview.loadAd(adRequest);
    }   
}

void resumeWebView(ViewGroup v) {
        for (int i = 0; i < v.getChildCount(); i++) {
            View child = v.getChildAt(i);
            if (child instanceof WebView) {
                ((WebView) child).resumeTimers();
            }
            try {                
                resumeWebView((ViewGroup) child);
            } catch (Exception e) {
                e.printStackTrace();
            }            
        }
    }

void pauseWebView(ViewGroup v) {     
        for (int i = 0; i < v.getChildCount(); i++) {
            View child = v.getChildAt(i);
            if (child instanceof WebView) {
                ((WebView) child).pauseTimers();
            }
            try {                
                pauseWebView((ViewGroup) child);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

private void destroyAdView() {
        if (adview != null) {
            RelativeLayout layout = (RelativeLayout) mainView.findViewById(R.id.relativeLayout);
            layout.removeView(adview);            
            adview.destroy();            
            adview = null;
        }

    }

 @Override
    public void onPause() {
        if (adview != null) {
            adview.pause();
            pauseWebView(adview);
        }
        super.onPause();
    }

    @Override
    public void onResume() {        
        if (adview != null) {
            adview.resume();
            resumeWebView(adview);
        }
        super.onResume();
    }

@Override
    public void onDestroy() {     
        destroyAdView();
        super.onDestroy();
    }

Samsung Galaxy S3 WiFi performance

s3-graphI’ve just received a Galaxy S3, and tested the WiFi performance. I know it’s an older device, but still very popular. The result was interesting, it was slow using 5 GHz (802.11an) network.

I just put the S3 ~1 meter far from the router, and started the test. The link speed was 150 Mbps (that’s fine), but the measured performance was only 54 Mbps. This is really slow, it should be at least the half of the link speed as usual. Left side, you can see the graph about the performance.

Compared to my Asus MeMo Pad (it uses 2.4 GHz network, 802.11n), my Asus performed 75 Mbps with the same link speed (150 Mbps) and with the same test environment.

I’m curious if this slow WiFi affects only my Galaxy S3 or other devices are also affected.

Here is the video about the test:

Finally, I repeated the test using 802.11n network (2.4 GHz). The result was also interesting. First of all, the bad news, the link speed was only 72 Mbps. Interesting, because the link speed was 150 Mbps when 5 GHz network was used. I think the network card of S3 supports maximum only this connection speed at 2.4 GHz, but really weird behaviour.
The good news: S3 performed very well in this test, the maximum speed was ~40 Mbps that is a very good value compared to the 72 Mbps of link speed.

And a newer video about this test too:

Samsung Galaxy S3 summary:

Link speed 150 Mbps (802.11an, 5 GHz) 72 Mbps (802.11n, 2.4 GHz)
Real speed 54 Mbps 40 Mbps

Test software:
WiFi Speed Test

Router: TL-WDR3600