ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel


Updated on April 6, 2013

How to flash the firmware via telnet safemode

If the router still can ping or you can just go through telnet or even just telnet safemode, then connect to the router can still be done, how that can be done is flash the firmware via telnet.

Sample problem: router sy deleted some files in it, including the file to be able to connect via ssh.

How to flash the firmware via telnet safemode and troubleshooting debricking mr3420/mr3220

If the router still can ping or you can just go through telnet or even just telnet safemode, then connect to the router can still be done, how that can be done is flash the firmware via telnet.

Sample problem: router sy deleted some files in it, including the file to be able to connect via ssh.


1- Make sure you can ping the router.

2- Prepare your firmware file, and change the name to the easier, eg openwrt.bin

3- XAMPP is installed on your computer, for use linux LAMPP

4- Enter your XAMPP htdocs openwrt.bin to

5- Turn on the router, then press and hold the QSS until the LED lights light up faster sys

6- Open putty, fill the hostname ip address of your router eg, Connection type select telnet, then open and will go into safemode telnet,

7- Sign In to tmp directory by typing cd / tmp /

8- Transfer to a tmp code.bin firmware by typing



Lan ip- ip is your computer, not the router ip.

9- Flash your router by typing:


mtd-r write firmware openwrt.bin

and wait until rebooting the router ...

10- completed

OpenWRT - Serial console recovery on TP-LINK MR 3420

If you like hacking devices, then you may end up on situations when it is mandatory to remove covers in order to get the device up and running again. Of course you will lose warranty, but this is part of the game, right?

Situation: I got a nice TP-LINK MR3420 WiFi router with a USB port. The initial distribution loaded on this router makes possible to use the USB port only to connect a USB 3G dongle to back-up your data connection. Pretty flat, when you can get much more from the USB today.

Fortunately the open source community those days is wide spread and covered even embedded field: OpenWRT is a development community working on firmware for various router models. Similar is DD-Wrt and many others. I used OpenWRT due to the fact that they offered more flexibility on what I want to achieve from that router. And maybe because I found first about them :)

Let's start Debricking TPLINK MR3420!

USB cable - new. Cut the end which goes to the cell phone

First you need the cable: USB to serial (logical levels 3,3V). I bought a cable from ebay (DKU-5 type like this) and I modified it in order to be able to connect myself to the router's serial port. Open the USB case to identify the wires: Tx, Rx and GND. Rx must go to serial Tx on the router, Tx must go to serial Rx on the router. Also identify in advance the pins on the router, you need to align build the cable to fit them.

Use a pull-up resistor of 10k Ohm between Tx and Vcc of the cable. Solder a 4 pins female header 2.54 mm and use some hot glue to stiffen the connection

Solder the USB cage to the PCB, ensure that the wires are also soldered to the PCB

After that step, I soldered a 4 pins header male connector on the main board of the router - instructions can be found on the OpenWRT site. They will fit my cable: Rx on router goes to Tx on cable, Tx on router goes to Rx on cable and GND to GND.

Identify the serial port on the router MR3420 PCB. There you have to solder the 4 pins header.

Soldering the header

Cable connected to the serial port of the router. Make a sign on the connector in order to avoid reverse connecting (this solution is not error proof or poka-yoke)

It was cumbersome to find a driver for the cable, the cable is a classic USB to serial using PL2303 chipset from Prolific (annoying name - I lost time, it wasn't prolific at all). After you find the right drivers for the cable, move to the next step.

After the drivers were installed, Windows will report the PL2303 cable as COM18 (on my situation it was 18, may differ)

Setup the serial connection as indicated in the image

Download PuTTY application and connect to the serial converter using following setup:

Open PuTTY and connect via serial using the mentioned setup. You may save that configuration for future use.

Now you are connected to the OpenWRT router via serial console

After that some strange characters should show on the console, that is good, but the cable is poor. Here I stopped, but I was helped by Sorin - thanks!

write following commands in order to reset to factory defaults:

>firstboot && reboot

After that, the router will reboot and you have to use PuTTY again, this time Telnet to connect to the router to . Give following commands to setup root password (write it somewhere in order to have it in case you forget it):


From this moment on, telnet is not accessible anymore, use PuTTY and SSH or web interface (via Internet browser) to connect to the router, user name is and password is the one given via telnet and the one you wrote it down. Do you remember it?

Hurray! Back in control of your router via web browser interface or SSH

After root login, we can access the multiple options of the router. enjoy

From now on you can start to unleash your router, basically this is a small computer with a Linux distribution and you can connect an USB hub and to that hub you can attach a webcam to have an IP cam, an external USB memory stick, a USB hard disk to share files, you can connect a printer to share it over network and many other things.

Follow-up on this article, soon a webcam will be attached to the router.

Watch How to Flash Openwrt Firmware in TL MR3420 V2

Add Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      Olamie 2 years ago

      Pls am having problem with this step ''9'' about this code: ''mtd-r write firmware openwrt.bin'' it saying (Couldn't open image file: firmware!) and i think that's the last step.