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


      3 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.


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)