I recently bought an TP-Link TL-MR3420 v2.2 router. After buying it and trying the original firmware, I also wanted to try out the OpenWRT on this router.

When trying to revert back to factory firmware, I used the firmware from TP-Link website (link). Later I found out that this firmware also contains the boot part, so trying to flash it from OpenWRT web interface returned some errors, and when using the SSH console to erase OpenWRT firmware and flash the above mentioned file I winded up with a shiny white brick.

This was how the router was acting.

It is important to know that from this point on, you can't do anything without a serial console.

At the time when this article was written, there were multiple tutorials out there, but I couldn't find one for v2, just for v1.

Firstly, you need to know the pins that need to be used for serial connection on the MR3420 v2 router. Open your router case and identify the 4 pins outlined in the image below.

 

I soldered 4 pins off a male pin header to the PSB at these points.

I used female pin header to create the connection cable between the adapter and these 4 pins (see pictures below).

 

At this point, all you need is an adapter to connect to the router. There are 2 options for this:

  1. Use the serial port of your computer (if your computer has one)
  2. Use an USB to serial adapter (again here you have 2 options)

 The settings for the serial connection in both cases are the following:

Bits per second: 115200
Data bits: 8
Stop bits: 1
Parity: None
Flow control: None

After you get the serial console working, you have to quickly type in "tpl" when you see Autobooting in 1 seconds.

You can use these instructions to go further (having connected your PC to the router LAN port via a network cable of course):

http://wiki.openwrt.org/toh/tp-link/tl-mr3420#flash.via.tftp

For flashing, you can use either the OpenWRT image for this router, or the MR3420 factory firmware that has the boot stripped from it in case you want to go back to stock firmware.

To make things easier, I have cut out the boot part from the most recent factory firmware for MR3420. You can download it from here:

https://www.box.com/s/kps8yu3wszywuhqzy0c3

This should be all. At this point you should have the router working correctly. If not, feel free to write me an e-mail (see Contact page) and I will try to assist you as much as possible.

Now I will go into detail with each serial connection option...

 

1. Using the serial port of your computer

At first, I tried this approach, since I can get electric components very easy and I could build a serial adapter pretty easy. The schematic I used is this one:

However, this circuit required a bit of adaption.

The adapter was using 0V for logical "0" and ~3.3V for logical "1".

By connecting a pull-down resistor between router Tx and router router GND, using a scope, I saw the voltage levels of ~700mV for logical "0" and ~2.8V for logical "1".

So, the final solution to get this working was to connect a pull-down resistor of 4.7kΩ between Tx of router and GND. Also, the supply voltage of the circuit needs to be ~3.3V in order for this to work.

The connections are like this:

RS-3232 circuit MR3420 v2 router board
3.3V -
TxD Tx
RxD Rx
GND GND

There is also a trick to getting this to work... so you will have to follow these steps:

  1. power off the router
  2. connect built circuit to PC
  3. connect pull-down resistor between Tx pin of circuit and GND of circuit (later these will be connected to the router so it's OK to put the resistor on the circuit pins)
  4. power on the circuit and start Putty in serial mode (or whatever other program you want to use to get the serial console on the PC)
  5. power on the router
  6. after the router is powered on, wait ~1 second and connect the circuit pins to the router pins as described in the table above

 You should now see the serial console output on your PC screen.

 

2. Using an USB to serial adapter

As stated above you have two options here:

  1. Use an adapted mobile phone data cable (http://buffalo.nas-central.org/index.php/Use_a_Nokia_Serial_Cable_on_an_ARM9_Linkstation#Preparing_the_Cable)
  2. Using a PL2303 circuit that you can order on the internet (I have ordered this: http://dx.com/p/pl2303hx-usb-to-rs232-ttl-converter-adapter-module-164590)

I didn't work with the 1st alternative, since the second seemed more easier to me and I didn't have a cable available.

I got the PL2303 adapter circuit, but in the end I came to the conclusion that this adapter can't be used straight forward to flash the router.

Update 02.Aug.2013: As I understood from others that used this guide, the PL2303 circuit worked directly for them, so it might be that they ordered a slightly different circuit or I got a circuit that was damaged. You should first try a direct connection to the router with the PL2303 circuit.

The drivers for the circuit can ba downloaded from here: http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41

First issue was that the PL2303 circuit can work in the 0-3.3V range, but it's output voltage for Tx is equal to the supply voltage. Since the supply voltage was the USB supply, it is clear that Tx voltage level was 5V and not ~3V as router input expected.

So, the first step is to build a USB adapter for this, that can convert the 5V supply voltage of the USB to 3V supply voltage for the PL2303 circuit.

For this, you need 2 USB connectors (1 male, 1 female), a voltage regulator (I used LM317 since I already had it) and some wires.

In some cases, like mine, using LM317 also required to use some capacitors and some resistors, so please consult the voltage regulator documentation before doing the circuit. If you are not sure about the required components, you can contact me and I will try to help you.

Back to the adaptation circuit, this is what I used:

 

Component values:

R1 240Ω
R2 340Ω
C1 0.1μF
C2 1μF

Be sure to also connect the USB casings from the male USB connector to the female USB connector, otherwise this will not work.

This will be put between the PC USB port and the USB to TTL adapter USB connector.

Now, all we need is a cable that connects the required pins of the USB to TTL adapter to the router board.

For this cable to work, a pull-down resistor is required on between Tx pin of router and GND, but also a pull-up resistor is required between Rx pin of router and Vcc of router.

These resistors however, will be put on the cable that connects the adapter to the router and not soldered on the router board. You will need a 60Ω pull-down between Rx and GND of USB-TTL adapter and a 4kΩ pull-up between Tx and 3V of USB-TTL adapter. The schematic I used is this:

 

NOTE: In the schematic the names of the pins from the adapter are shown. The 5V pin actually provides 3V since the USB-TTL adapter is now powered from a 3V supply and not directly from the USB (5V supply).

To get all this to work...  you will have to follow these steps:

  1. power off the router
  2. connect built circuit to PC USB port, and connect the cable described above to the output of the USB-TTL adapter
  3. start Putty in serial mode (or whatever other program you want to use to get the serial console on the PC)
  4. power on the router
  5. after the router is powered on, wait ~1 second and connect the other end of the above described cable to the router board.

 You should now see the serial console output on your PC screen.

 

End...

I hope this article helps you to get a router working again.

If you feel that something is missing, something is wrong, or any change should be made, please don't hesitate to write me an e-mail (see contact page) and I will do my best to update the article as soon as possible.