Tp-Link TL-MR3020 Minipwner Guide

This is a revisitation and simplification, made by me, of the guide on minipwner.com. Thanks to minipwner.com for providing the minipwner.tar file

This guide is specific to the Tp-Link TL-MR3020 router

Disclaimer:

I am not responsible for any damages. If you follow this guide it is at your own risk.

The distribution used to perform all the operations was Debian 7 Testing. But you can use any distribution.

Hardware Required:

Tp-Link TL-MR3020

4Gb USB flash drive (Cruzer Fit is recommended for its small size)

Partition the USB flash drive as follows:

Partition 1: Linux Swap Device

Partition 2: ext4

Insert the USB stick into the router

Download the OpenWrt image for the TP-Link MR3020 from

http://downloads.openwrt.org/snapshots/trunk/ar71xx/

and download the files:

openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin

openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin

Download the minipwner.tar file at this link:

http://www.minipwner.com/images/minipwner.tar

plug the router into the electrical outlet and connect it to the PC with the ethernet cable.

Via browser type the address 192.168.0.254

Username: admin Password: admin

Go to the system tools > firmware upgrade section and load the firmware:

openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin

Click on the upgrade button and the firmware will be loaded. At the end the router will reboot.

Disconnect the power and reconnect it.

the new router ip address will be 192.168.1.1 (the web section will no longer work)

telnet to the system

telnet 192.168.1.1

Change the router password in the OpenWrt terminal passwd

in the OpenWrt terminal go to the tmp directory:

cd /tmp

Open a new terminal and go to the directory where the files were downloaded

run this command:

rcp openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/

Now to perform the upgrade type in the OpenWrt terminal:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin

Once finished the router will reboot.

Connect to the router again using the command:

ssh root@192.168.1.1

when prompted, enter the password.

Copy minipwner.tar to /usr/share From a new terminal go to the directory on the PC where the minipwner.tar file is located. Run this command:

rcp minipwner.tar root@192.168.1.1:/usr/share

From the Openwrt terminal type:

cd /usr/share
tar -xf minipwner.tar

Copy the MAC ADDRESS of the wireless card to be able to insert it in the new configuration file

to do this we enable the wifi option from the file /etc/config/wireless

in /etc/config/wireless

you will find a line that says:

# REMOVE THIS LINE TO ENABLE WIFI
option disabled 1

Insert the # as shown here:

# REMOVE THIS LINE TO ENABLE WIFI
# option disabled 1

Save with :wq! and press enter. Run these commands: wifi ifconfig wlan0

Copy the mac Address to a text file (you will need it several times).

Run these commands:

cd /usr/share/minipwner
cp -f /etc/config/network /etc/config/network.orig
cp -f /etc/config/wireless /etc/config/wireless.orig
cp -f /etc/config/firewall /etc/config/firewall.orig
cp -f /etc/profile /etc/profile.orig
cp -f /etc/opkg.conf /etc/opkg.conf.orig
cp -f /etc/config/system /etc/config/system.orig
cp -f /etc/config/dhcp /etc/config/dhcp.orig
cp -f ./network.1 /etc/config/network
cp -f ./wireless.1 /etc/config/wireless
cp -f firewall.1 /etc/config/firewall 

Edit the file /etc/config/wireless

vi /etc/config/wireless

Delete the old MAC ADDRESS and insert the one previously copied.

Now you need to configure the wifi. If your router has Open wifi the only thing you need to do is set the SSID of your router. The default SSID is TOKI (Change TOKI with your SSID).

If you have an encrypted wireless network (let’s say WPA2 PSK), configure it like this:

Option encryption psk2+tkip
option key tua_key

More info on OpenWrt Wiki

Save with :wq! and press enter.

Now you need to restart the network:

/etc/init.d/network restart

Check that wlan0 has the IP address assigned.

ifconfig wlan0 

If there are problems, troubleshoot them.

Run these commands:

cd /usr/share/minipwner
opkg update
opkg install kernel
opkg install kmod-usb-storage
opkg install kmod-fs-ext4
opkg install block-mount
cp -f profile.1 /etc/profile
cp -f fstab.1 /etc/config/fstab
cp -f opkg.conf.1 /etc/opkg.conf
cp -f system.1 /etc/config/system
mkdir /mnt/usb
/etc/init.d/fstab enable
/etc/init.d/fstab start
ls /