Stable Wi-Fi Network How-to and Why We Maybe Can’t Do It in Future

Definition of problem

In metropolises and big cities stable Wi-Fi connection is a big problem – a lot of Access Points and other devices use the same frequency – 2.5 GHz. Number of devices with 5 GHz frequency is small. For example im my location I see 15 visible Access Points and some AP used in invisible mode.

Symptoms of the problem: slow internet connection, often reconnetions and lost Access Points.

Why OpenWrt

Some hardware and software vendors provides only basic possibility for settings and customizations of your router. Some devices do not have а open firmware and source code. OpenWrt – open source project and provides open firmware for a lot of routers and other devices. With OpenWrt you have highly-customized device – time to get more.

Installation

Just check official website for support model of you device. If you can’t found – relax, some devices also have unofficial support without OpenWrt developers, just google it. Instruction for installation is spiciefied for every device, but very ease for supported devices.

For example we make it on TP-Link TL-741ND – cheap ~$20 router and our testing machine in this article. This device is supported and we can see installation instruction here. As I previously said installation is really easy:

We just need to download firmware and upload it to Firmware Upgrate Tool in web-interface. Device reboot, and need to setup password of superuser:

$ telnet -l root 192.168.1.1
# passwd
...type your password...
# exit

Now we can login with ssh and setup Wi-Fi:

$ ssh root@openwrt
...type your password...

BusyBox v1.23.2 (2015-07-19 22:16:29 CEST) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (Bleeding Edge, r46421)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:~#

# vi /etc/config/wireless

config wifi-device  radio0
        option type     mac80211
        option channel  13
        option hwmode   11g
        option path     'pci0000:00/0000:00:00.0'
        option country 'DE'
        option txpower 10
        option htmode 'HT40-'

config wifi-iface
        option device   radio0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption psk2
        option key PASSWORD_FOR_YOUR_AP

For peoples who is unfamiliar with vi editor – i – for enable writing, Esc – finish writing, :wq – exit.

More details

13th and 14th channel is blocked in some country – please check local laws before using. General things in wireless config:

  • channel – set 13th channel
  • country – country with allowed 13th and 14th channels (check local laws)
  • ssid – name of your local AP
  • encryption – type of encryption (WPA2 TKIP or Enterprise recommended)
  • txpower – transmission power in dBm (20 – max, but try first 5 and above)
  • htmode – specifies the channel width in 802.11n and 802.11ac mode, HT40 – 2x 20MHz channels, primary/control channel is upper, secondary channel is below

More details you can find here. Now we use 40MHz in two channels – 13th and 12th with 10dbm power. Let’s check it:

# iwinfo
wlan0     ESSID: "OpenWrt"
          Access Point: F8:D1:11:5C:BA:94
          Mode: Master  Channel: 13 (2.472 GHz)
          Tx-Power: 10 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -95 dBm
          Bit Rate: unknown
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: 168C:002B 168C:A091 [Atheros AR9285]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

It works! If device is locked in your firmware you can use reghack:

$ ssh root@openwrt
# cd /tmp/
# wget http://luci.subsignal.org/~jow/reghack/reghack.mips.elf
# chmod +x reghack.mips.elf
# ./reghack.mips.elf /lib/modules/*/ath.ko
# ./reghack.mips.elf /lib/modules/*/cfg80211.ko
# reboot

Why we maybe can’t do it in future

Federal Communications Commission (FCC) proposed to regulate modification rights to firmware of every devices with Wi-Fi. Yes, you can’t install OpenWrt and have just another black box in your home with basic settings. Learn more here. It’s USA-only, but a lot of hardware vendors don’t made special devices for other countries.

 

Read more:

Introduction to Matrix — Free & Open Source messenger with audio/video calls as Skype/Viber/Slack Alternative

Linux History: 24 Years Step by Step

Lennart Poettering merged “su” command replacement into systemd: Test Drive on Fedora Rawhide

KDE Plasma 5.4 and KDE Apps on Wayland Test Drive

Introduction to Tox — Free & Open Source messenger with audio/video calls as Skype Alternative

  • michaelmd

    finallly support for TP-link modems? about time! might be easier to get in this part of the world!