Tag: tp-link tl-mr3020

Minipwner Tp-Link TL-MR3020 Guide

This is a revised and simplified version, made by me, of the guide written on minipwner.com. Thanks to minipwner.com for making the file minipwner.tar available.
This guide is written specifically for the router Tp-Link TL-MR3020

Notice:
I am not responsible for any kind of damage. You choose to follow this guide at your own risk.

The distribution used for performing all the operations was Debian 7 Testing. However, it is possible to use any distribution.

Hardware required:
Tp-Link TL-MR3020
USB flash drive 4Gb (the Cruzer Fit is recommended for small size)

Repartition 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/

Download the files:
openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin
openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin

Download minipwner.tar from this link:
http://www.minipwner.com/images/minipwner.tar

connect the router to a power outlet and connect the Ethernet cable to the PC.

In the browser, type the address 192.168.0.254
Username: admin
Password: admin

Go to the system tools> firmware upgrade and load the firmware:
openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin

Click on the button upgrade and the firmware will be loaded. After that the router will reboot.

Disconnect the power source and reconnect it.

The new IP address of the router will be 192.168.1.1 (the web section will no longer work)

connect via telnet to the system
telnet 192.168.1.1

Change the router's password in the OpenWrt terminal
passwd

in OpenWrt terminal go to the tmp directory:
cd /tmp

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

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

Upgrade from OpenWrt terminal:
sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin

After that the router will reboot.

Reconnect to the router using the following 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 computer's directory where the minipwner.tar file is located.
Execute this command:
rcp  minipwner.tar root@192.168.1.1:/usr/share

From OpenWrt terminal type:
cd /usr/share
tar -xf minipwner.tar

Copy the MAC ADDRESS of the wireless card in order to be able to put in the new configuration file In order to do this it is necessary to enable wifi option from the file /etc/config/wireless
vi /etc/config/wireless

Find this line:
# 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.
Execute these commands:
wifi
ifconfig wlan0

Copy the mac ADDRESS in a text file (will be used several times).

Execute 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 previously copied one.

At this point it is necessary to configure the Wifi.
If your router has Open Wifi the only thing you need to do is to set the SSID of your router.
The default SSID is TOKI (Change TOKI with your SSID).

If you have a wireless network encryption (for example, WPA2 PSK), set up in this way:
Option encryption psk2+tkip
option key your_key

More info on OpenWrt Wiki

Save with :wq! and press enter.

Now restart the newtork:
/etc/init.d/network restart

Check that wlan0 has an assigned IP address.
ifconfig wlan0

If there are problems please troubleshoot.

Execute 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 /mnt/usb

Check that the USB stick is mounted by "mount" or "df"

Execute these commands:
cd /usr/share/minipwner
ln -s /mnt/usb /opt
ln -s /etc /mnt/usb/etc
opkg update
opkg install netcat
opkg -dest usb install tar
opkg -dest usb install openssh-sftp-client
opkg -dest usb install nmap
opkg -dest usb install tcpdump
opkg -dest usb install aircrack-ng
opkg -dest usb install kismet-client
opkg -dest usb install kismet-server
opkg -dest usb install perl
opkg -dest usb install openvpn
opkg -dest usb install nbtscan
opkg -dest usb install snort
opkg -dest usb install karma
opkg -dest usb install samba36-client
opkg -dest usb install elinks
opkg -dest usb install yafc
cp -f /etc/config/wireless /etc/config/wireless.old
cp -f /etc/config/network /etc/config/network.old
cp -f /etc/config/dhcp /etc/config/dhcp.old
cp -f ./network.2 /etc/config/network
cp -f ./wireless.2 /etc/config/wireless
cp -f ./dhcp.2 /etc/config/dhcp
ln -s /mnt/usb/usr/share/nmap /usr/share/nmap

Edit /etc/config/wireless
vi /etc/config/wireless

Delete the old MAC address and paste the previously copied one.
Save and exit.
:wq!

Restart the router:
reboot

Minipwner is ready: Wireless access is open with SSID TOKI.
The new router IP is now 192.168.50.1

If you want to install additional packages in the USB, type:
opkg -dest usb install (packagename)
example:
opkg -dest usb install elinks

If there are problems in the libraries, in most cases they can be resolved with a symlink like this:
ln -s /mnt/usb/usr/share/nmap /usr/share/nmap

minipwner.com forum is very useful for resolving any kinds of problems.