Advertisements

Latest comments

Saturday, 29 December 2012 21:09

Flashing OpenWRT to TP-Link TL-MR3020 3G/4G Wireless N Router

This is a guide on how to flash TP-Link TL-MR3020 N Router with OpenWRT.
 
TL-MR3020 N Router Specification
  • CPU Atheros AR9330
  • RAM 32MB
  • NAND 4MB
  • Dimensions 74mm x 67mm x 22mm
  • Power consumption 1.25W Max.
 
Download
By the time I write this article, the OpenWRT firmware for TL-MR3020 is not stable yet, you can select either Beta2 version or the Latest Trunk Snapshot which is risky. The OpenWRT firmware is available at http://wiki.openwrt.org/toh/tp-link/tl-mr3020
 
Installing OpenWRT
  • Connect TP-Link TL-MR3020 to computer.
  • Open a Browser
  • Enter 192.168.0.254 which is the default IP address
  • Enter admin for User Name and admin for Password
  • Go to Status page & check for status, this is optional. Picture below shows the status of my TL-MR3020 router, the Hardware Version is V1
TP-Link TL-MR3020 StatusTP-Link TL-MR3020 Status
 
 
  • Go to System Tools and select Firmware Upgrade
  • Click Browse button and choose the OpenWRT firmware that you had downloaded previously as shown in figure below
Firmware UpgradeFirmware Upgrade
  • Click Upgrade button to start flashing OpenWRT
 
Login to OpenWRT
  • Come back to the Browser
  • Enter 192.168.1.1 (the IP had changing from 192.168.0.254 to 192.168.1.1)
  • If you had flashing the Beta2 version of OpenWRT, you will see a login screen as shown in figure below
OpenWrt - LoginOpenWrt - Login
 
  • Click on Login button to login to OpenWRT
  • Make sure click on Go to password configuration to change the login password and enable SSH
 
Installing LUCI WebGUI
If you had installaing the Lastest Trunk Snapshot without WebGUI, here is a way to install the LUCI WebGUI to the router.
 
Note:
You should look for latest firmware using this link and download the file name with tl-mr3020 generic squashfs.
 
  • Make sure your router is able to online,  see bottom part for my network configuration.
  • SSH to router
  • Enter the following command

opkg update
opkg install luci
opkg install luci-ssl

  • Restart router
  • Open a browser
  • Enter 192.168.1.1 (use your own router IP) and you should able to see the LUCI login screen

 

Connecting the Router to Internet
You must edit the following files in order to connect the router to the internet, I'm always using WinSCP to edit the files:
/etc/config/network
/etc/config/firewall
/etc/config/wireless
 
My configuration is connecting the TL-MR3020 to my existing wireless router (TL-WR1043ND) with the following settings:
  • TL-WR1043ND router set as AP mode with the IP address 192.168.1.1
  • TL-WR1043ND router is encrypted with WPA
  • TL-MR3020 wireless router set as Client mode with the IP address 192.168.0.1
  • There is no network cable (CAT5) connect between TL-WR1043ND router and TL-MR3020 router, the connection is done by WIFI

I will not explain how the code is working, please use your own method to make your router online. You may want to follow this link to bridge your wireless and setup the internet connection. 

Here is an example of network configuration:

/etc/config/network

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.0.1'

config interface 'wwan'
option proto 'dhcp'

 

/etc/config/firewall


config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'

config zone
option name 'lan'
option network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'

config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option network 'wan wwan'

config forwarding
option src 'lan'
option dest 'wan'

config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'

config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'

config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fe80::/10'
option src_port '547'
option dest_ip 'fe80::/10'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config include
option path '/etc/firewall.user'

 

/etc/config/wireless


config wifi-device 'radio0'
option type 'mac80211'
option macaddr '90:f6:52:8b:42:14'
option hwmode '11ng'
option htmode 'HT20'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'
option disabled '0'
option channel '6'
option txpower '27'
option country 'US'

config wifi-iface
option network 'wwan'
option ssid 'use your ssid'
option encryption 'psk'
option device 'radio0'
option mode 'sta'
option bssid '00:30:0A:C2:A9:BA'
option key 'use your own key'

 

Read 18167 times Last modified on Wednesday, 19 February 2014 17:27

Add comment


Security code
Refresh