}

Improving WiFi performance on Linux LEDE

Created:

Introduction

In this tutorial we will change the router settings to obtain better WiFi performance than with the default settings. First we will explain how to do the performance analysis and then we will start tunning the router for maximum WiFi speed.

This tutorial will also work for different Linux distribution, but the opkg command should be change to fit your linux distro.

Perfomance improvements obtained with new configuration

Step 1: Measure current performance

We are goint to use iperf to measure the performance, install it with opkg:

sudo opkg install iperf
sudo iperf -s

With the last command we started the iperf server on the router. You will need also the iperf command on the client side.

On the client side execute (check the router ip address to match yours):

iperf -c 192.168.1.1 -t60 -i1

Out perfomance measure will be done on a 5ghz WiFi. The output should be similar to this:

------------------------------------------------------------
Client connecting to 192.168..1, TCP port 5001
TCP window size:  129 KByte (default)
------------------------------------------------------------
[  4] local 192.168.1.143 port 60952 connected with 192.168.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 2.0 sec  27.9 MBytes   117 Mbits/sec
[  4]  2.0- 4.0 sec  22.4 MBytes  93.8 Mbits/sec
[  4]  4.0- 6.0 sec  23.2 MBytes  97.5 Mbits/sec
[  4]  6.0- 8.0 sec  20.1 MBytes  84.4 Mbits/sec
[  4]  8.0-10.0 sec  17.6 MBytes  73.9 Mbits/sec
[  4] 10.0-12.0 sec  20.0 MBytes  83.9 Mbits/sec
[  4] 12.0-14.0 sec  26.4 MBytes   111 Mbits/sec
[  4] 14.0-16.0 sec  22.5 MBytes  94.4 Mbits/sec
[  4] 16.0-18.0 sec  25.2 MBytes   106 Mbits/se

Out current wifi settings are:

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:00.0'
        option htmode 'HT20'
        option txpower '15'
        option country 'US'

We are going to enable the following options (all disabled by default):

  • bursting: Enables frame bursting
  • ff: Enables fast frames
  • compression: Enables hardware compression
  • noscan:
  • turbo: Enables turbo mode

We also are going to increase the channel width to 40mhz witht he HT40+ option.

Out final config should be similar to this one, remeber to keep you option path:

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:00.0'
        option htmode 'HT40+'
        option txpower '15'
        option country 'US'
        option bursting 1
        option ff 1
        option compression 1
        option turbo 1