Sunday, 09 June 2013 15:11

Recover bricked TL-MR3020 Wireless N Router

After flashing the latest OpenWRT image file (openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory dated 03-Jun-2013), my TL-MR3020 is bricked. All the LED is keep on blinking (about 3 seconds once) except power LED, and the network is getting connected and disconnected every 3 seconds. Very lucky that the problem was fiexed by using serial console and Tftpd32 method.
 
Note:
Using serial console method require to open the case cover (void warranty) from TL-MR3020 router, and solder a10K resistor and 4 ways header pin to it as shown in figure below.
Solder a 10K resistor and 4 ways header pin to PCB
 
 

Prerequisite

  • Tftpd32: A free tftp and dhcp server for windows, freeware tftp server. Very efficient for booting over LAN.
  • PuTTY: SSH and telnet client, free and open-source terminal emulator, serial console and network file transfer application.
  • USB to UART converter support 3.3V

As shown in figure below is my USB-UART converter which come with 6 ways header pin for interfacing. The voltage selector must set to 3.3V since the TL-MR3020 router have its I/O pins working at 3.3V. Plug in the USB-UART converter to computer, I get about 3.6V measure by poking at VCC and GND

USB to UART converter
 
 
 

Opening the case

Pry it open with a thin but very stable blade tool. Start above the mini USB power port where the case is not glued.

Opening case
 
 
 

Connection Diagram

Do not connect the router VCC to USB-UART VCC, it may break your adapter or your router

TL-MR3020 USB-UART
GND GND
RX TXD
TX RXD
USB-UART converter and TL-MR3020 router connection diagram 
 
Finally, connect an ethernet cable from TL-MR3020 network (do not worry about network, it is not working at the moment) to the computer and plug in the USB-UART converter to computer. 
Device manager 
 
 

Setting up network IP address

Assign a static IP address to the computer, it is configured to 192.168.1.2 since the router IP address is 192.168.1.1 (even though it is not working).
Computer IP address
 
 
 

Install OpenWRT from the U-Boot console 

Download the latest Attitude Adjustment RC1 snapshot and save it to C:\Program Files\Tftpd32 (Tftpd32 default installation folder) as shown in figure below
Tftpd32 installation folder
 
Run Tftpd32 as shown in figure below, where Server interface is your computer IP address, it should detected automatically
Tftpd32
 
 
  • Run Putty as show in figure below
  • I'm using COM4 since my USB-UART driver detected as COM4
  • Speed 9600 is not work for me even though USB-UART driver shows 9600, I must use 115200
PuTTY configuration
 
 
Click on Open button, the PuTTY screen should look like this

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

After a 1-2 seconds it shows Autobooting in 1 seconds, when displaying this enter tpl immediately.
 
You will get a U-Boot-console, it shows as hornet>, and you must enter the following commands:
Where setenv ipaddr is the router IP,  setenv serverip is the computer IP, openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin is the OpenWRT image file

hornet> setenv ipaddr 192.168.1.1
hornet> setenv serverip 192.168.1.2
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.2; our IP address is 192.168.1.1
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
Erased 60 sectors
hornet> cp.b 0x80000000 0x9f020000 0x3c0000
Copy to Flash... write addr: 9f020000

done
hornet> bootm 9f020000

Note:
It is necessary to unplug the USB-UART everytime a new PuTTY instance started
Read 107213 times Last modified on Sunday, 12 June 2016 10:38

46 comments

  • Comment Link admin Thursday, 26 April 2018 11:01 posted by admin

    @pereira.adelmo, I have no idea how to solve your router problem.

  • Comment Link pereira.adelmo Wednesday, 25 April 2018 12:43 posted by pereira.adelmo

    in my case , i have this error in bootloader

    [ 6.840000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002b001c: 0x85bd instead
    [ 6.850000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002b0020: 0xf004 instead
    [ 6.860000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002b0024: 0xcc75 instead
    [ 6.870000] Further such events for this erase block will not be printed
    [ 6.880000] Old JFFS2 bitmask found at 0x002b39ec
    [ 6.890000] You cannot use older JFFS2 filesystems with newer kernels
    [ 6.900000] Old JFFS2 bitmask found at 0x002b6eac
    [ 6.900000] You cannot use older JFFS2 filesystems with newer kernels
    [ 6.930000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0000: 0x1729 instead
    [ 6.940000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0004: 0x6726 instead
    [ 6.940000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0008: 0xa7b3 instead
    [ 6.950000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c000c: 0xc229 instead
    [ 6.960000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0010: 0x1fc2 instead
    [ 6.970000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0014: 0x7f9d instead
    [ 6.980000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0018: 0xaded instead
    [ 6.990000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c001c: 0x9729 instead
    [ 7.000000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0020: 0x35ab instead
    [ 7.010000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0024: 0xd538 instead
    [ 7.010000] Further such events for this erase block will not be printed
    [ 7.040000] Old JFFS2 bitmask found at 0x002c911c
    [ 7.050000] You cannot use older JFFS2 filesystems with newer kernels
    [ 7.060000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d0000: 0x8d59 instead
    [ 7.070000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d0004: 0xbe9d instead
    [ 7.080000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d0008: 0xa5be instead
    [ 7.090000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d000c: 0x1c6f instead
    [ 7.100000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d0010: 0x3816 instead
    [ 7.110000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d0014: 0xfec7 instead
    [ 7.120000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d0018: 0x7eb4 instead
    [ 7.130000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d001c: 0x1b6a instead
    [ 7.130000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d0020: 0x91f6 instead
    [ 7.140000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002d0024: 0x72de instead
    [ 7.150000] Further such events for this erase block will not be printed
    [ 7.190000] Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
    [ 7.200000] empty_blocks 0, bad_blocks 0, c->nr_blocks 46
    [ 7.200000] VFS: Cannot open root device "(null)" or unknown-block(31,2)
    [ 7.210000] Please append a correct "root=" boot option; here are the available partitions:
    [ 7.220000] 1f00 128 mtdblock0 (driver?)
    [ 7.220000] 1f01 935 mtdblock1 (driver?)
    [ 7.230000] 1f02 2968 mtdblock2 (driver?)
    [ 7.230000] 1f04 64 mtdblock4 (driver?)
    [ 7.240000] 1f05 3904 mtdblock5 (driver?)
    [ 7.240000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

    and no is possible update my firmware

  • Comment Link zllxlx Tuesday, 24 April 2018 09:28 posted by zllxlx

    You can help me? my router just have one led ? when im try to flashing firmware im erase anything from command line on putty cause my router is too slow

  • Comment Link razlan Sunday, 04 March 2018 12:34 posted by razlan

    stuck here..please help

    [ 0.495893] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
    [ 0.505783] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11, base_bau▒`@@``^uacvcg▒`▒▒▒▒▒▒▒@▒▒▒▒mucxuy▒``▒pp``p``p``p`]p▒`p``p``r``p`@zuyeveg▒@▒`@@`a^rmduyc▒@ppba▒[email protected]`bnq

  • Comment Link Adrian Sunday, 04 February 2018 04:13 posted by Adrian

    EXCELENT - VERY GOOD!!! thanks Friend te has pasado saludos desde Argentina

  • Comment Link Vinz Wednesday, 18 October 2017 06:06 posted by Vinz

    ok, found someone with exact the same problem: https://forum.piratebox.cc/read.php?8,21099,21346

  • Comment Link Vinz Wednesday, 18 October 2017 05:28 posted by Vinz

    hi admin,
    I can completely follow your guide, everything loads fine.
    The last command starts a boot-sequence, which always ends like this:

    ... ...
    [ 1.100000] VFS: Cannot open root device "(null)" or unknown-block(0,0)
    [ 1.100000] Please append a correct "root=" boot option; here are the available partitions:
    [ 1.110000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

    Power cycle does not help. After a short "all LEDs" there is power-LED and WPS-LED steady on.
    No blinking, that I know to enter rescue mode.
    Any ideas? Cant find further help on the web.

  • Comment Link admin Tuesday, 25 July 2017 19:32 posted by admin

    I get my USB-UART converter from Malaysia.
    https://www.cytron.com.my/p-uc00b?search=usb%2520serial&description=1&sort=relevance&order=DESC

  • Comment Link Irfan Tuesday, 25 July 2017 18:38 posted by Irfan

    Where you buy USB-UART with DTR & RTS & Voltage Selector? I can't find one.

  • Comment Link admin Thursday, 15 June 2017 12:32 posted by admin

    Just press the enter key if you see the blank screen. If the problem still persist, most probably there is no communication between Computer & Router.

  • Comment Link Kamesh Saturday, 10 June 2017 21:45 posted by Kamesh

    Hi, When the Putty opens. its blank.

  • Comment Link Izo Wednesday, 19 April 2017 04:29 posted by Izo

    Thanks you saved my mr3020 :)

  • Comment Link admin Sunday, 09 April 2017 12:14 posted by admin

    I'm not sure your USB-Serial adapter require resistor or not, just solder a resistor to your router, it won't harm your router .

  • Comment Link John Saturday, 08 April 2017 16:26 posted by John

    I'm using Silab uart CP2102 ( searching google for detail). When I connect 3 pins to 3 pins like you (I doesn't have resistor) nothing happened. I try to use Micro A to power up it, all the leds blink and blink...

  • Comment Link admin Saturday, 08 April 2017 13:12 posted by admin

    Hi, Duy:
    It depends on your USB-Serial adapter. Certain USB-Serial adapter built-in with pull-up resistor & hence does not require resistor.
    Please refer to previous comment on how to power the router & USB-Serial adapter.

  • Comment Link admin Saturday, 08 April 2017 12:45 posted by admin

    Hi, John
    The router is power with 5V, but the router GPIO uses 3.3V. So you need a 3.3V USB-serial adater to connect to your router, otherwise you need to connect a Logic Level Converter between router & USB-serial adapter.

    For my case, my router is power with 5V, my USB-serial is connected directly to the router with only three cable (Rx, Tx & ground) since my USB-Serial adapter supported 3.3V GPIO

  • Comment Link Duy Friday, 07 April 2017 10:24 posted by Duy

    Does it really need a resistor? My usb uart is silab cp2102, comes with 6 pins: 5.5V, TXD, RXD, VND, 3.3V, VCC.How do I connect them to my router? Using the 5V, 1A adapter to power up the mr3020? Or power up it by using 3.3V to VCC (MR3020)

  • Comment Link John Friday, 07 April 2017 10:08 posted by John

    I'm using silab USB to UART 2102. How do I power up the mr 3020

  • Comment Link admin Thursday, 26 January 2017 21:08 posted by admin

    It is not possible to use the Raspberry Pi as a USB-serial converter.

  • Comment Link Francesco Thursday, 26 January 2017 02:05 posted by Francesco

    I have a Raspberry pi. You think can I use it to transfer the MR3020 firmware to router without using usb to UART converter?

Leave a comment

Back to Top