Differences

This shows you the differences between two versions of the page.

toh:tp-link:tl-mr3020 [2012/11/12 19:14]
equinoxefr
toh:tp-link:tl-mr3020 [2014/05/15 13:39] (current)
tmomas Small change for clarification ('hub' added)
Line 1: Line 1:
====== TP-Link TL-MR3020 ====== ====== TP-Link TL-MR3020 ======
 +See also [[toh:tp-link:TL-MR3040]] and [[toh:tp-link:TL-WR703N]] or [[toh/tp-link/tl-mr10u|TP-Link TL-MR10U]], [[toh/tp-link/tl-mr11u|TP-Link TL-MR11U]], [[toh/tp-link/tl-mr12u|TP-Link TL-MR12U]] and [[toh/tp-link/tl-mr13u|TP-Link TL-MR13U]]\\ **''Note:''** Many of these routers are marketed as a //"3G travel router"// but  **none actually include a 3G modem** - the marketing term rather means that the OEM firmware supports a certain range of 3G/4G modems to be externally connected to USB because it contains drivers for those USB modems! Ignore that, because with OpenWrt ANY router with USB supports 3G/4G hardware ... ;-)
-Even though it is marketed as a //"3G travel router"//, the **TL-MR3020** does not include a 3G modem. It simply means that the OEM firmware and GUI support a certain range of USB 3G modems. OpenWRT supports USB 3G modems, too. The router is powered through a mini-USB socket stub (5V) and comes with a USB power adapter.+{{:media:toh:tp-link:tl-mr3020:tl-mr3020-02.jpg?400|TP-Link TL-MR3020}}
-The router is very similar to the [[toh:tp-link:TL-WR703N]].+The router is powered through a mini-USB socket stub (5V) and comes with a USB power adapter.
===== Supported Versions ===== ===== Supported Versions =====
Line 10: Line 11:
| v1.4 | 2012-01 | Trunk  ([[https://dev.openwrt.org/changeset/29763|r29763]], probably earlier) | AR9331 chipset | | v1.4 | 2012-01 | Trunk  ([[https://dev.openwrt.org/changeset/29763|r29763]], probably earlier) | AR9331 chipset |
| v1.6 | 2012-03 | Trunk  ([[https://dev.openwrt.org/changeset/30753|r30753]], probably earlier) | AR9331 chipset | | v1.6 | 2012-03 | Trunk  ([[https://dev.openwrt.org/changeset/30753|r30753]], probably earlier) | AR9331 chipset |
-| v1.7 | 2012-05 | Trunk  ([[https://dev.openwrt.org/changeset/32786|r32786]]) | AR9331 chipset |+| v1.7 | 2012-05 | 12.09-RC1, Trunk  ([[https://dev.openwrt.org/changeset/32786|r32786]]) | AR9331 chipset | 
 +| v1.8 | ??      | 12.09-RC1 (tested), Trunk (tested) | AR9331-AL1A; internal serial port has no pins, only solder-pads (P1 clearly visible) | 
 +| v1.9 | ??      | 12.09 (tested)      | AR9331-AL1A | 
 + 
 +The current release 
 +OEM source code available at: [[http://www.tp-link.com/resources/gpl/150Router.rar]]
===== Features ===== ===== Features =====
Line 17: Line 23:
  * SoC: Atheros AR9330 rev 1   * SoC: Atheros AR9330 rev 1
-  * 802.11 b/g/n 150Mbps +  * 802.11 b/g/n 150 Mbps 
-  * Powered via mini-USB (5V)+  * Powered via USB B-Mini (5 Volts)
  * Tiny form factor   * Tiny form factor
-    * 5.7cm x 5.7cm PCB  +    * 5.7 cm x 5.7 cm PCB  
-    * 6.7cm x 7.4cm x 2.2cm case +    * 6.7 cm x 7.4 cm x 2.2 cm case
-Input voltage: the router will function correctly when powered with voltage as low as 2.6V (determined experimentally) instead of 5V. Thus it can be powered directly from Li-Ion batteries (3.7V) without the need for an external adapter to 5V.+=== Power consumption === 
 + 
 +Input voltage: The router will function correctly when powered with voltages as low as 3.3 Volts (determined experimentally) instead of 5V USB-Power. Thus, it can be powered directly from one single Li-Ion battery (which usually starts fully charged at 4.2V and has a nominal voltage of 3.7) without the need for an external 5V adapter
 + 
 +This router is standardly powered via USB at 5V. The voltage regulators' input voltage should be at least between 3.7V - 5.5V, but not over 5.5V. The device will get damaged at too high voltages*. Maximum current draw at 5V is 255mA (Active Download + LAN + WLAN + USBboot), average current draw with WiFi is 125mA, idle is 68mA. Hence the average router power consumption is 0.6W, which is incredibly low. 
 + 
 +Power consumption will be higher if a USB device is attached to its USB port!  
 +More information and a rough diagram here [[https://apollo.open-resource.org/lab:argus|Interesting webpage with more data about power consumption and so on]]
===== Installation ===== ===== Installation =====
-Currently only OpenWRT developer versions support the hardware. Download the lastest trunk snapshot [[http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin|here]].+Currently the TL-MR3020 is supported in the stable OpenWrt version Attitude Adjustement.
-Download the latest Attitude Adjustment Beta 2 snapshot from [[http://downloads.openwrt.org/attitude_adjustment/12.09-beta2/ar71xx/generic/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin|here]].+So you can either download a daily-built snapshot or build your own from sources.
-=== Method using web GUI (recommended) ===+  * Download the latest Attitude Adjustment from [[http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin|here]] (recommended) 
 +  * Download the lastest trunk snapshot [[http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin|here]] (risky)
-Connect via ethernet cable, log in to the router's web GUI (default login/password: admin/admin) and overwrite the factory firmware by installing the .bin image like a regular firmware update. Wait for the progress bar to finish twice (the device will reset itself in the process), and [[toh:tp-link:tl-mr3020#basic configuration|proceed with basic configuration]] as with any fresh OpenWRT install.+{{:meta:icons:tango:48px-dialog-warning.svg.png?nolink}} **WARNING**: Snapshot images are always risky. Check the forum discussion for latest opinions on available images.
-Web GUI upload has been confirmed to work with v1.0, v1.4 and v1.6 hardware and requires no serial access unless something goes wrong.+==== Method Using Web GUI (Recommended) ==== 
 + 
 +Connect to the TL-MR3020 router via Ethernet cable at IP address **192.168.0.254**, log in to the router's web GUI (default login/password: **admin** / **admin**) and overwrite the factory firmware by installing the **openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin** firmware image like a regular firmware update. 
 + 
 +Wait for the progress bar to finish twice (the device will reset itself in the process), and [[toh:tp-link:tl-mr3020#basic configuration|proceed with basic configuration]] as with any fresh OpenWRT install. 
 + 
 +Web GUI upload has been confirmed to work with v1.0, v1.4, v1.6, v1.7, v1.8 and 1.9 hardware revisions and requires no serial access unless something goes wrong.
See [[https://forum.openwrt.org/viewtopic.php?pid=154203#p154203|forum]] if you encounter problems. See [[https://forum.openwrt.org/viewtopic.php?pid=154203#p154203|forum]] if you encounter problems.
-=== Manual method using TFTP (experts) === +==== Manual Method Using Serial Console and TFTP (Experts) ===
-Connect the MR3020 via serial and power the MR3020 up. After a 1-2 seconds it shows "Autobooting in 1 seconds", when displaying this enter "tpl" immediately.+ 
 +To install OpenWrt from the U-Boot console, you need to install a TFTP server on your computer (**tftp-hpa** is recommended). 
 + 
 +Then download OpenWrt factory image to /srv/tftp (for example), and execute the TFTP server by typing **tftpd -l -s /srv/tftp**. 
 + 
 + 
 +Connect the TL-MR3020 using a serial console and power up the TL-MR3020. 
 + 
 +After a 1-2 seconds it shows **Autobooting in 1 seconds**, when displaying this enter **tpl** immediately.
-You will get a UBoot-console, it shows "hornet>" and you can enter the following commands there: 
<code> <code>
-setenv ipaddr <device-ip, eg. 192.168.1.4>+Using default environment
-setenv serverip <server-ip, eg. 192.168.1.2>+In:    serial 
 +Out:  serial 
 +Err:  serial 
 +Net:  ag7240_enet_initialize... 
 +No valid address in Flash. Using fixed address 
 +No valid address in Flash. Using fixed address 
 +: cfg1 0x5 cfg2 0x7114 
 +eth0: 00:03:7f:09:0b:ad 
 +ag7240_phy_setup 
 +eth0 up 
 +: cfg1 0xf cfg2 0x7214 
 +eth1: 00:03:7f:09:0b:ad 
 +athrs26_reg_init_lan 
 +ATHRS26: resetting s26 
 +ATHRS26: s26 reset done 
 +ag7240_phy_setup 
 +eth1 up 
 +eth0, eth1 
 +Autobooting in 1 seconds 
 +[type tpl here]</code>
-tftpboot 0x80000000 firmware-image.bin+You will get a U-Boot-console, it shows as **hornet>**, and you must enter the following commands:
-erase 0x9f020000 +0x3c0000+<code>hornet> setenv ipaddr <device-ip, eg. 192.168.1.111> 
 +hornet> setenv serverip <server-ip, eg. 192.168.1.100> 
 +hornet> tftpboot 0x80000000 openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin 
 +eth1 link down 
 +dup 1 speed 100 
 +Using eth0 device 
 +TFTP from server 192.168.1.100; our IP address is 192.168.1.111 
 +Filename 'openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin'. 
 +Load address: 0x80000000 
 +Loading: ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ################################################################# 
 +        ###################################################### 
 +done 
 +Bytes transferred = 3932160 (3c0000 hex) 
 +hornet> erase 0x9f020000 +0x3c0000
-cp.b 0x80000000 0x9f020000 0x3c0000+First 0x2 last 0x3d sector size 0x10000                                                                                                        61 
 +Erased 60 sectors 
 +hornet> cp.b 0x80000000 0x9f020000 0x3c0000 
 +Copy to Flash... write addr: 9f020000
-bootm 0x9f020000+done 
 +hornet> bootm 9f020000
</code> </code>
-=== OEM mass flashing ===+==== OEM Mass Flashing ====
Flashing hundreds of devices using the web interface can be a real pain. You can use this shell script to automate it: Flashing hundreds of devices using the web interface can be a real pain. You can use this shell script to automate it:
Line 88: Line 161:
</code> </code>
-==== Failsafe Mode ==== +==== Install Snapshot Image ==== 
-Power the MR3020 on and when the WPS Button starts to blink , push it until it blinks faster; the device is now in Failsafe-Mode+ 
 +If you install openwrt from trunk, the firmware image doesn't include LuCi. You need configure wireless network from telnet to install Luci. You will need already working internet access. 
 + 
 + 
 +For this example: 
 + 
 +Main router: 
 +  Ip:        '192.168.2.1' 
 +  Ssid:      'Example-network' 
 +  Bssid:      '11:11:11:11:11:11' 
 +  Encryption: 'WPA2 - PSK' 
 +  Key:        'PaSSworD' 
 +  Channel:    '9' 
 +( You need fill these by your network properities ) 
 + 
 +Terminal program: 
 +  Putty 
 + 
 +After install trunk image wait few minutes then recycle power router and set your computer ip address to: 
 + 
 +<code> 
 +ip:      192.168.1.2 
 +subnet:  255.255.255.0 
 +gateway: 192.168.1.1 
 +</code> 
 + 
 +Start your terminal and connect 192.168.1.1 via telnet ( port 23 ). Right now LAN INTERFACE include wireless too. We need to set wireless to WAN interface. Change wireless configuration below example. 
 + 
 +<code> 
 +vi /etc/config/wireless 
 + 
 +config wifi-device  radio0 
 +        option type    mac80211 
 +        option channel  9 
 +        option hwmode  11ng 
 +        option path    'platform/ar933x_wmac' 
 +        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 txpower 27 
 + 
 +config wifi-iface 
 +        option device      radio0 
 +        option network    wan 
 +        option mode        sta 
 +        option ssid        Example-network 
 +        option encryption  psk2 
 +        option bssid      11:11:11:11:11:11 
 +        option key        PaSSworD 
 +</code> 
 + 
 +Wireless setup completed now we need to get ip WAN interface via main router dhcp server. Set your network config like below example. 
 + 
 +<code> 
 +vi /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 globals 'globals' 
 +        option ula_prefix 'fd48:931d:0f42::/48' 
 + 
 +config interface 'lan' 
 +        option ifname 'eth0' 
 +        option type 'bridge' 
 +        option proto 'static' 
 +        option ipaddr '192.168.1.1' 
 +        option netmask '255.255.255.0' 
 +        option ip6assign '60' 
 + 
 +config interface 'wan' 
 +        option proto    'dhcp' 
 +        option _orig_ifname radio0 
 +        option _orig_bridge false 
 +</code> 
 + 
 +Reboot your router 
 + 
 +<code> 
 +reboot 
 +</code> 
 + 
 +Your terminal session will be closed. You need reconnect to router. 
 + 
 +Test your router: If your router is properly connected to the internet you should get something like the below lines: 
 + 
 +<code> 
 +ping -c3 www.google.com 
 +PING www.google.com (xxx.xxx.xxx.xxx): 56 data bytes 
 +64 bytes from xxx.xxx.xxx.xxx: seq=0 ttl=52 time=88.295 ms 
 +64 bytes from xxx.xxx.xxx.xxx: seq=1 ttl=52 time=87.783 ms 
 +64 bytes from xxx.xxx.xxx.xxx: seq=2 ttl=52 time=87.503 ms 
 + 
 +--- www.google.com ping statistics --- 
 +3 packets transmitted, 3 packets received, 0% packet loss 
 +round-trip min/avg/max = 87.503/87.860/88.295 ms 
 +</code> 
 + 
 +Now you can install Luci and enable it by below commands: 
 + 
 +<code> 
 +opkg update 
 +opkg install luci 
 +/etc/init.d/uhttpd enable 
 +/etc/init.d/uhttpd start 
 +</code> 
 + 
 +Now you can access LuCi interface by 192.168.1.1 with your browser. 
 + 
 +===== Failsafe Mode ===== 
 + * Set your computer's IP to 192.168.1.2, subnet 255.255.255.0 
 +  * Connect the TL-MR3020 to your computer via ethernet 
 +  * Power on the TL-MR3020 
 +  * When the WPS button starts to blink
 +    * on AA (Attitude Adjustment / 12.09) push the WPS button; 
 +    * on BB (Breaking Barrier / trunk) move the sliding switch quickly from one side to the other. 
 +  * Do this until the WPS button starts blinking faster. 
 +  * The device is now in Failsafe-Mode 
 +  * You may access it by using **telnet 192.168.1.1** 
 +  
 +Info on resetting to OpenWrt defaults can be found at: [[http://wiki.openwrt.org/doc/howto/generic.failsafe#in.failsafe.mode|generic.failsafe]] 
 + 
 +==== Downgrade Attitute Adjustment from Trunk ==== 
 + 
 +Downgraded wrong image ( jff2 instead of squashfs ) cause cant get ip or connect to luci. Failsafe mode still working but firstboot command wont work because it is already on working. You can upload correct firmware and write it with mtd command but failsafe mode can't connect internet. You need to local tftp server to get firmware. 
 + 
 +Set your pc ip 192.168.1.10/24 and gateway 192.168.1.1. Download [[http://code.google.com/p/mongoose/|mongoose http server]] and correct firmware same folder and start mongoose. It will host all files in his path ( if you start it from downloads folder it will host all files in downloads folder ) 
 + 
 +now we can get firmware via failsafe telnet: 
 + 
 +<code> 
 +wget http://192.168.1.10:8080/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin 
 +mtd -r write /tmp/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin firmware 
 +Writing from /tmp/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin to firmware ... 
 +Rebooting ... 
 +/bin/sh: /sbin/reboot: Input/output error 
 +</code> 
 + 
 +DONT DO ANYTHING. Just wait and router reboot itself. wait few minutes and you will able to reach Luci via 192.168.1.1. 
 + 
 +===== Restoring Original Firmware ===== 
 +-> [[doc:howto:generic.uninstall]] 
 + 
 +{{page>meta:infobox:dangerous&noheader&nofooter&noeditbtn}} 
 + 
 +With the TL-WR842ND router, there is a catch: the stock firmware is obtained from the OEM: http://www.tplink.com/en/support/download/?model=TL-MR3020 
 + 
 +  * in case the file name of this firmware file does not contain the word **//"boot"//** in it, you can simply revert back to original firmware 
 +  * in case the file name of this firmware file does contain the word **//"boot"//** in it, you need to cut off parts of the image file //before// flashing it: 
 + 
 + 
 +An example of an image file with the word "boot" in it is ''mr3020nv1_en_3_17_2_up_boot(140408).bin''. 
 + 
 +Cut the first 0x20200 (that is 131,584 = 257*512) Bytes from original firmware: 
 +<code> 
 +dd if=orig.bin of=tplink.bin skip=257 bs=512 
 +</code> 
 + 
 +You should transfer the firmeware image to the /tmp folder and revert back to original firmware (if availlable you can flash the firmware via the webinterface as well): 
 + 
 +Via the safer method using sysupgrade: 
 +<code> 
 +sysupgrade /tmp/tplink.bin 
 +</code> 
 + 
 +Or you use the mtd method: 
 +<code> 
 +mtd -r write /tmp/tplink.bin firmware 
 +</code> 
 + 
 +It is also possible to revert to the stock firmware using the method with tftp described in "Manual Method Using Serial Console and TFTP (Experts)". (you still need the firmware images without the boot part). 
 + 
 +OEM TP-Link firmware for the TL-MR3020 with the **//boot part removed//** to revert to the original OEM firmware: 
 +  * TL-MR3020 **//V1//** [[http://q.gs/6giYF|TL-MR3020-V1-stripped.zip]] 
 + 
 +===== Basic Configuration ===== 
 +Since this part is identical to the one recommended for generic devices, see [[doc:howto:basic.config|Basic configuration]].
-==== Flash Layout ====+===== Original Flash Layout =====
Please read the article [[doc:techref:Flash Layout]] for a better understanding. It contains a couple of explanations. Then let's have a quick view at flash layout of this particular device: Please read the article [[doc:techref:Flash Layout]] for a better understanding. It contains a couple of explanations. Then let's have a quick view at flash layout of this particular device:
Line 102: Line 357:
^ filesystem  |  none            |  none              | SquashFS          |  none            |  none        | ^ filesystem  |  none            |  none              | SquashFS          |  none            |  none        |
-ART = Atheros Radio Test - it contains mac addresses and calibration data for the wifi (EEPROM). If it is missing or corrupt, ath9k won't come up anymore.\\ +ART = Atheros Radio Test - it contains RF calibration data for the wifi. If it is missing or corrupt, wireless won't come up anymore.\\
- +
-===== Basic configuration ===== +
-Since this part is identical for all devices, see [[doc:howto:basic.config|Basic configuration]]. +
===== Hardware ===== ===== Hardware =====
-==== Info ==== +==== Opening the Case ====
- +
-  * [[https://gist.github.com/2059480#file_dmesg|dmesg TP-Link TL-MR3020]] +
- +
-=== Opening the case ===+
The case consists of two parts: a white base and a gray lid. The lid has two snap hinges, one right above the mini USB connector and one on the opposite side about 10 mm left of the "TP-LINK" logo. The lid is additionally glued in place on the underside on all four sides. You can try to pry it open with a thin but very stable blade tool. Start above the ethernet port where the case is not glued, and work your way around the glued corner towards the "3G USB" port (no glue there) until you reach the logo side. You should now be able to peek inside the case on the lose corner. The case consists of two parts: a white base and a gray lid. The lid has two snap hinges, one right above the mini USB connector and one on the opposite side about 10 mm left of the "TP-LINK" logo. The lid is additionally glued in place on the underside on all four sides. You can try to pry it open with a thin but very stable blade tool. Start above the ethernet port where the case is not glued, and work your way around the glued corner towards the "3G USB" port (no glue there) until you reach the logo side. You should now be able to peek inside the case on the lose corner.
Line 120: Line 367:
Next proceed along to the LED side, but beware of the fragile light conductors running straight down beneath the clear plastic. They easily bend or break when you push-in your tool too far. Once three sides are open, you can steadily lift the lid until the remaining side breaks lose and neatly frees the second hinge in the process. If you work carefully and manage not to break either one of the two hinges, the gray lid should snap neatly back into place after some manual cleaning with a cutter knife. Next proceed along to the LED side, but beware of the fragile light conductors running straight down beneath the clear plastic. They easily bend or break when you push-in your tool too far. Once three sides are open, you can steadily lift the lid until the remaining side breaks lose and neatly frees the second hinge in the process. If you work carefully and manage not to break either one of the two hinges, the gray lid should snap neatly back into place after some manual cleaning with a cutter knife.
-=== Internal pictures === +==== Internal Pictures ==== 
-{{:toh:tp-link:tl-mr3020_top.jpg?450}} +{{:media:tp-link_mr3020_top-pcb.jpg?450}} 
-{{:toh:tp-link:tl-mr3020_bottom.jpg?450}}+{{:media:tp-link_mr3020_bottom-pcb.jpg?450}}
{{:toh:tp-link:img_20121015_170949.jpg?450}} {{:toh:tp-link:img_20121015_170949.jpg?450}}
-==== Serial ====+==== Hardware summary ==== 
 +|                            ^  IC  ^  Info  ^  Datasheet  ^ 
 +^                  Processor | AR7240 |  | {{:toh:tp-link:atheros.ar7240.pdf|Click}}  | 
 +^                  Flash ROM| Spansion S25FL032P |  | http://www.spansion.com/Support/Datasheets/S25FL032P_00.pdf  |   
 +^                      SDRAM| Windbond W9425G6JH |  | http://www.winbond.com/NR/rdonlyres/11505884-F632-41F9-9438-A3EC025FEAED/0/W9425G6JH.pdf |   
 +^                            | Zentel A3S56D40FTP-G5 |  |  | 
 +^        Chipset (Wi-Fi controller)| AR9331 | 1x1 | http://see.sl088.com/w/images/6/69/AR9331.pdf | 
 + 
 +==== Serial Console ====
== Pinout == == Pinout ==
Line 135: Line 390:
To get a reliable serial connection, **you might have to connect a 10k pullup resistor** between TX and VCC. This is because the TX pin is connected to a voltage divider (2x5.6k) and a capacitor is put between the real pin and the TX connector. Some serial adaptors might work without the pullup resistor (confirmed for one ST3232-based adaptor), but others definitely require it (confirmed for a FTDI FT232RL-based model). To get a reliable serial connection, **you might have to connect a 10k pullup resistor** between TX and VCC. This is because the TX pin is connected to a voltage divider (2x5.6k) and a capacitor is put between the real pin and the TX connector. Some serial adaptors might work without the pullup resistor (confirmed for one ST3232-based adaptor), but others definitely require it (confirmed for a FTDI FT232RL-based model).
-If you need a serial adaptor, you can build a [[http://buffalo.nas-central.org/index.php/Use_a_Nokia_Serial_Cable_on_an_ARM9_Linkstation#Preparing_the_Cable|serial hack adapter]] (DKU-5, CA-42). Relatively cheap, off-the-shelf and known-to-work alternatives would be SparkFun's [[http://www.sparkfun.com/products/9873|FTDI Basic Breakout 3.3V]] and [[http://www.sparkfun.com/products/9717|FTDI Serial Cable 3.3V]].+If you need a serial adaptor, you can build a [[http://buffalo.nas-central.org/index.php/Use_a_Nokia_Serial_Cable_on_an_ARM9_Linkstation#Preparing_the_Cable|serial hack adapter]] (DKU-5, CA-42). Relatively cheap, off-the-shelf and known-to-work alternatives would be SparkFun's [[http://www.sparkfun.com/products/9873|FTDI Basic Breakout 3.3V]] and [[http://www.sparkfun.com/products/9717|FTDI Serial Cable 3.3V]] (the resistor is not needed with this specific cable).
The right settings for accessing the serial console are as follows: The right settings for accessing the serial console are as follows:
Line 151: Line 406:
where [device name] is the name of your serial adaptor, usually tty.usbserial* on Mac and ttyUSB* on Linux. To quit screen, press CTRL-a, followed by CTRL-k, followed by y. where [device name] is the name of your serial adaptor, usually tty.usbserial* on Mac and ttyUSB* on Linux. To quit screen, press CTRL-a, followed by CTRL-k, followed by y.
-The password to get into uboot prompt is **tpl**. You must type it quickly while the serial console is displaying+=== U-Boot Bootloader Console === 
 + 
 +The password to get the U-Boot prompt is **tpl**. You must type it quickly while the serial console is displaying:
<code>[...] <code>[...]
ag7240_phy_setup ag7240_phy_setup
Line 159: Line 416:
[type tpl here]</code> [type tpl here]</code>
-uboot takes several commands. Start with **help**.+U-Boot accepts several commands. Type **help** to display the list of available commands.
-Once the original firmware has booted up completely, you can press **return** to activate the Linux login prompt: +<code>hornet> help
- +
-<code>TL-MR3020 mips #185 Fri Oct 21 16:26:50 CST 2011 (none) +
-TL-MR3020 login: root +
-password: 5up</code> +
- +
-To install openwrt from Uboot terminal, a tftp server must be installed on your computer (tftp-hpa). Then download Openwrt factory image to /srv/tftp (for instance), and execute "tftpd -l -s /srv/tftp". +
- +
-Connect to the MR3020 using serial tty and execute the following instrucctions: +
- +
-<code> +
-Using default environment +
- +
-In:    serial +
-Out:  serial +
-Err:  serial +
-Net:  ag7240_enet_initialize... +
-No valid address in Flash. Using fixed address +
-No valid address in Flash. Using fixed address +
-: cfg1 0x5 cfg2 0x7114 +
-eth0: 00:03:7f:09:0b:ad +
-ag7240_phy_setup +
-eth0 up +
-: cfg1 0xf cfg2 0x7214 +
-eth1: 00:03:7f:09:0b:ad +
-athrs26_reg_init_lan +
-ATHRS26: resetting s26 +
-ATHRS26: s26 reset done +
-ag7240_phy_setup +
-eth1 up +
-eth0, eth1 +
-Autobooting in 1 seconds +
- +
-hornet> help+
?      - alias for 'help' ?      - alias for 'help'
bootm  - boot application image from memory bootm  - boot application image from memory
Line 210: Line 434:
setenv  - set environment variables setenv  - set environment variables
tftpboot- boot image via network using TFTP protocol tftpboot- boot image via network using TFTP protocol
-version - print monitor version+version - print monitor version</code>
-hornet> tftpboot 0x80000000 openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin +=== Linux Console ===
-eth1 link down +
-dup 1 speed 100 +
-Using eth0 device +
-TFTP from server 192.168.1.100; our IP address is 192.168.1.111 +
-Filename 'openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin'. +
-Load address: 0x80000000 +
-Loading: ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ################################################################# +
-        ###################################################### +
-done +
-Bytes transferred = 3932160 (3c0000 hex) +
-hornet> erase 0x9f020000 +0x3c0000+
-First 0x2 last 0x3d sector size 0x10000                                                                                                        61 +Once the original firmware has booted up completely, you can press **return** to activate the Linux login prompt.
-Erased 60 sectors +
-hornet> cp.b 0x80000000 0x9f020000 0x3c0000 +
-Copy to Flash... write addr: 9f020000+
-done +The password to get a root Shell access is **5up**: 
-hornet> bootm 9f020000 + 
-</code>+<code>TL-MR3020 mips #185 Fri Oct 21 16:26:50 CST 2011 (none) 
 +TL-MR3020 login: root 
 +password: 5up</code>
==== GPIOs ==== ==== GPIOs ====
Line 258: Line 460:
|      6 |              |            |                |                      |            |                |                  | |      6 |              |            |                |                      |            |                |                  |
|      7 |  unused Pulled to ground            |  R15        |                |                      |            |                |                  | |      7 |  unused Pulled to ground            |  R15        |                |                      |            |                |                  |
-|      8 |  USB power(?) |           |                 |                      |            |                |                  |+|      8 |  USB power | R112          | 2.8V                |                      |            |                |                  |
|      9 |              |            |                |                      |            |                |                  | |      9 |              |            |                |                      |            |                |                  |
|    10 |              |            |                |                      |            |                |                  | |    10 |              |            |                |                      |            |                |                  |
Line 310: Line 512:
The WPS button is located at the top (illuminated by the WPS LED) and can be easily pressed with a finger. The sliding switch is located at the side and has three positions: 3G, WISP, AP. The WPS button is located at the top (illuminated by the WPS LED) and can be easily pressed with a finger. The sliding switch is located at the side and has three positions: 3G, WISP, AP.
 +Sample scripts to read the sliding switch: [[https://forum.openwrt.org/viewtopic.php?pid=172111#p172111|on boot]], [[https://forum.openwrt.org/viewtopic.php?pid=172110#p172110|on switch change]], [[https://gist.github.com/jefferyto/8010733|to change network configurations]]
 +
 +===== Bootloader Mods =====
 +Information about [[doc:techref:bootloader]] in general and [[doc:techref:bootloader:uboot|Das U-Boot]] in particular.
 +
 +==== U-Boot 1.1.4 modification for routers ====
 +Forum member [[https://forum.openwrt.org/profile.php?id=72549|pepe2k]] made a modification of **U-Boot 1.1.4** for **Qualcomm Atheros** SoCs based devices (the project is still being developed, so new devices and SoCs will be supported in the future).
 +
 +This modification started from [[http://code.google.com/p/wr703n-uboot-with-web-failsafe/|wr703n-uboot-with-web-failsafe]] project, but supports more devices, all modern web browsers, has a lot of improvements and other modifications (like U-Boot NetConsole, custom commands, overclocking possibilities etc.).
 +
 +More information:
 +
 +  * Official repository on GitHub: [[https://github.com/pepe2k/u-boot_mod|U-Boot 1.1.4 modification for routers]]
 +  * Discussion about this project on [[https://forum.openwrt.org/viewtopic.php?id=43237|OpenWrt forum]]
 +  * An article (in Polish) about one of the first version of this project on [[http://www.tech-blog.pl/2013/03/29/zmodyfikowany-u-boot-dla-routerow-tp-link-z-atheros-ar9331-z-trybem-aktualizacji-oprogramowania-przez-www-i-konsola-sieciowa-netconsole/|www.tech-blog.pl]]
 +
 +===== Hardware Hacks =====
==== External Antenna Hack ==== ==== External Antenna Hack ====
-{{:toh:tp-link:tl-mr3020-wlan-antenna-hack2.jpg?450}} +{{:media:mr3020-antenna-rpsmamod.jpg?450}} 
-{{:toh:tp-link:tl-mr3020-wlan-antenna-hack4.jpg?450}}+{{:media:mr3020-antenna-pigtailmod.jpg?450}}
If you want to add an external antenna connector or would like to know more about the MR3020 power consumption in different op-states you can find more info [[https://apollo.open-resource.org/lab:argus#modifications|Apollo-NG MR3020 External Antenna Hack]] If you want to add an external antenna connector or would like to know more about the MR3020 power consumption in different op-states you can find more info [[https://apollo.open-resource.org/lab:argus#modifications|Apollo-NG MR3020 External Antenna Hack]]
-==== Adding i2c bus ====+==== Adding I2C Bus ====
-If you want to add i2c bus to your MR3020, you can use GPIO 7 and 29. Remove R15 and R17, then add pullup between 3.3v and gpio pin.+If you want to add I2C bus to your MR3020, you can use GPIO 7 and 29. Remove R15 and R17, then add pullup between 3.3v and gpio pin.
{{:toh:tp-link:img_0229.jpg?600}} {{:toh:tp-link:img_0229.jpg?600}}
Line 336: Line 555:
You can find more info in french here http://www.equinoxefr.org/post/2012/11/12/mr3020-et-i2c-avec-les-gpio/ You can find more info in french here http://www.equinoxefr.org/post/2012/11/12/mr3020-et-i2c-avec-les-gpio/
-==== USB hub hack ====+==== USB Hub Hack ====
You can embedded usb hub to add more peripheral to your best router. You can embedded usb hub to add more peripheral to your best router.
Line 347: Line 566:
More info in french on http://www.equinoxefr.org/post/2012/11/05/projet-de-robot-wifi-torture-dun-routeur-tplink-mr3020/ More info in french on http://www.equinoxefr.org/post/2012/11/05/projet-de-robot-wifi-torture-dun-routeur-tplink-mr3020/
 +==== GPIO Pinout ====
 +
 +{{:media:tp-link_mr3020_top-pcb-gpio-pins.jpg?400|}}
 +
 +===== USB port and monitoring Serial Console via USB-Serial =====
 +
 +The USB port on the TL-MR3020 is not compatible with USB1 devices (aka full speed) and only works properly with USB2 (aka high speed) devices. You can however plug a USB-Serial adapter as long as you plug that through a <$10 USB 2.0 hub. While you're at it, use another port of the USB hub to plug in a USB thumb drive and write data there (like serial console logs) so as not to wear out the built-in flash.
 +
 +See this page for more tips and how to create a serial console server out of your TL-MR3020:
 +[[http://marc.merlins.org/perso/linux/post_2012-12-05_Serial-Console-With-WR703N.html]]
 +
 +===== Boot log =====
 +
 +==== Factory Boot Log ====
-==== Boot log (Factory) ==== 
<code> <code>
U-Boot 1.1.4 (Aug 17 2011 - 09:25:09) U-Boot 1.1.4 (Aug 17 2011 - 09:25:09)
Line 567: Line 799:
</code> </code>
-===== Restoring original firmware =====+==== OpenWrt Boot Log and Info ====
-Restoring the original firmware follows the usual procedure: +  * [[https://gist.github.com/2059480#file_dmesg|dmesg TP-Link TL-MR3020]]
- +
-  * Get original firmware image into /tmp +
-  * Make sure it's in the correct format +
-  * Flash with //mtd// +
-  * Factory reset +
- +
-{{:meta:icons:tango:dialog-warning.png?nolink |Warning!}}**WARNING:** The following steps were tested successfully on an **MR-3020 V1.4**. Make sure that the firmware link used in the instructions below **matches your hardware revision** by following the firmware link in the link section below. +
- +
-First, set the mode switch to //WISP//. Without it, you might have trouble connecting after the reboot. Connect via ssh/telnet/serial and use the following commands: +
- +
-<code># opkg update && opkg install unzip +
-# cd /tmp +
-# wget http://www.tp-link.com/Resources/software/TL-MR3020_V1_120320.zip +
-# unzip TL-MR3020*.zip +
-# mtd -r write mr3020*up*.bin firmware +
-</code> +
- +
-After a couple of seconds, the router reboots automatically. Reconnect, open [[http://192.168.0.254/|http://192.168.0.254]], log in with //admin// / //admin//, and do a factory reset with //System Tools// / //Factory Defaults//.+
===== Link Dump ===== ===== Link Dump =====
Line 595: Line 809:
  * A backup of the whole original SPI flash content is available from [[http://db.tt/Cp4F1EtX|here]].   * A backup of the whole original SPI flash content is available from [[http://db.tt/Cp4F1EtX|here]].
  * [[http://www.heise.de/netze/artikel/Taschenrouter-als-IPv6-Verteiler-1440851.html|Taschenrouter als IPv6-Verteiler (auf Deutsch)]]   * [[http://www.heise.de/netze/artikel/Taschenrouter-als-IPv6-Verteiler-1440851.html|Taschenrouter als IPv6-Verteiler (auf Deutsch)]]
 +  * [[https://apollo.open-resource.org/lab:argus|Interesting webpage with more data about power consumption and so on]]
-==== Relevant forum links:====+==== Relevant Forum Links ====
[[https://forum.openwrt.org/viewtopic.php?id=33429|TP-Link TL-MR3020 Support]] [[https://forum.openwrt.org/viewtopic.php?id=33429|TP-Link TL-MR3020 Support]]
===== Custom IPv6 image for mr3020 (v1.7) ===== ===== Custom IPv6 image for mr3020 (v1.7) =====
-a custom image with ipv6 support: radvd, wide-dhcpv6, 3g stick support, made for RCS-RDS Fiberlink dual stack PPPoE service,+A custom image with ipv6 support: radvd, wide-dhcpv6, 3g stick support, made for RCS-RDS Fiberlink dual stack PPPoE service,
but should be okay for static wan settings on other ISPs: but should be okay for static wan settings on other ISPs:
http://www.ip6.ro/firmware/mr3020/ http://www.ip6.ro/firmware/mr3020/
Line 608: Line 823:
===== Tags ===== ===== Tags =====
---- ----
-{{tag>2011Dec FastEthernet 1Port USB2.0 1USB Serial integrated 802.11bgn 1Radio AR9331 ath9k 32RAM 4Flash MIPS MIPS32 24Kc AR7241 AP121}}+{{tag>2011Dec FastEthernet 1NIC 1WNIC no_switch 1Ant USB2.0 1USB Serial integrated 802.11bgn AR9331 ath9k 32RAM 4Flash MIPS MIPS32 24Kc AR7241 AP121 portable_router}}

Back to top

toh/tp-link/tl-mr3020.1352744041.txt.bz2 · Last modified: 2012/11/12 19:14 by equinoxefr