I have been working with OpeWrt on a project for the company I work and due to this I bought a router capable of installing Linux on it, at a relative chip price (about Bs. 350 / $45). OpenWrt is Linux distro for wireless routers, compounds of a kernel and selection of programs. To install those programs it uses a package manager called opkg that is a sort of aptitude/dpk for this distro. You can do many thing from CLI (like a real linux user does) but you als count with a web interface called LuCI.
Why to install OpenWrt?
The TP-LINK TL-WR841N comes with a lot of functions with its original firmware, which can be controlled from the web interface, but you can’t extend it beyond that functions. With OpenWrt you will count with the same functions your router had and you will be able to install extra software that extends those functions. As an example you can install a web proxy like Squid on the router, or set up a VPN.
There are several versions for router TL-WR841: v3, v5, v5.2 y v7.1, and almost all of them has download binaries for the last OpenWrt (Backfire) except version 7.1, but you can install an image provided by a user based on the previous stable release called Kamikaze. Let’s see how to install OpenWrt on router TP-LINK TL-WR841N v7.1:
- Download router TL-841N v7.1 image
- Got to the router’ s web interface and find System Tools > Firmware Upgrade section:
- Choose the downloaded image and wait until the process finishes.
Once it had finished the router will reboot and start to work with the default settings. I mean, you can use the web interface from address http://192.168.1.1 or even use a terminal through ssh.
Remember it has not password, so you must leave it blank and change it from the web interface o from a ssh sesion.
Setting the Wifi as AP
I wanted to have at least the same features the router had with the original firmware, so the first thing I tried to set was the wifi but it wasn’ t enabled. To activate it you can edit the /etc/config/network file with a content similar to this one:
config 'wifi-device' 'radio0' option 'type' 'mac80211' option 'macaddr' 'd8:5d:4c:ea:0b:e7' option 'hwmode' '11ng' option 'htmode' 'HT20' list 'ht_capab' 'SHORT-GI-20' list 'ht_capab' 'SHORT-GI-40' list 'ht_capab' 'TX-STBC' list 'ht_capab' 'RX-STBC1' list 'ht_capab' 'DSSS_CCK-40' option 'country' 'US' option 'channel' '11' option 'txpower' '0' #option 'disabled' '1'
The last option must be commented in order to enable the AP. You can also enable from the web interface, just go to Network > Wifi as shown below:
After that you will have rou wireless router set as AP and wired router…and running Linux!!