TL-WR841N v9 DD-WRT to OEM Factory Firmware to Gargoyle

This post is to revert from DD-WRT back to OEM firmware and then to Gargoyle.

As a long-time user and sporadic contributor to the open-source router communities, here is a quick post in converting a TL-WR841N v9 from DDWRT back to factory TP-Link firmware and then flashing the latest Gargoyle build.

Most of the steps come courtesy of this OpenWRT forum post (FYI – Gargoyle is based on OpenWRT).

Step 1: You must know first your hardware version as described here from TP-Link or here from OpenWRT wiki.  In this example, I am running v9 (same as v9.2).  Only do the following steps via Ethernet; not wireless.

Step 2: Download “stripped” TP-Link firmware here.  Stripped firmware removes the bootloader allowing the factory firmware to fit in place of DD-WRT (in this example).  Please pay careful attention to download the proper build for your version of the router (v5 vs v9, etc).  Extract the zip file after downloading.

Step 3: Get a copy of WinSCP and Putty .  I prefer portable versions.  You can also use telnet in place of Putty.

Step 4: Login to DD-WRT, under the “Services” tab and enable both telnet and SSH.  Save settings and reboot the router.

Step 5: Open WinSCP and use the following settings:
Host name (assuming default): 192.168.1.1
Port: 22
File Protocol: SCP
Username: root
Password: <your DD-WRT password>

Step 6: Copy the stripped firmware.
On the right side, browse to /tmp/
Drag-n-drop from left to right the extracted firmware image.  In this example it was “TL-WR841ND-V9-FW0.0.3-stripped.bin”.  It should show up in the /tmp/root folder.  Rename “TL-WR841ND-V9-FW0.0.3-stripped.bin” to “1.bin” to make life easier.

Step 7: Login with Putty or Telnet using the same host and credentials as above.

Step 8: Flash the stripped firmware.  Type the following commands:
cd /tmp/root
Confirm the file is uploaded correctly. Run:
ls
Hit the “Enter”. Confirm the 1.bin file is in the directory.
Next run:
mtd -e linux -r write 1.bin linux
Use whatever name you copied/renamed in Step 6.

Wait and be patient as the new firmware is flashed.  It should take ~3 minutes and I was able to see the progress via Putty/telnet.  Once the flashing is complete the Putty/telnet session should close and the router should reboot.

Step 9: Disable/re-enable your network adapter to get a new IP from the TP-Link firmware.  v9 had a default IP of 192.168.0.1.

Step 10: Flash Gargoyle firmware from the TP-Link firmware.  In the TP-Link firmware, go to “System Tools” on the right side and “Firmware”.  Then browse to the proper Gargoyle firmware.  In this case it was the current Gargoyle factory build for v9: “gargoyle_1.7.1-ar71xx-generic-tl-wr841n-v9-squashfs-factory.bin”.  Hit “Upgrade”.  Wait and again be patient for ~3 minutes which Gargoyle flashes.

Step 11: Enjoy!  Disable/re-enable your network adapter to get a new IP from the Gargoyle firmware which should be 192.168.1.1.  Remember: Gargoyle does not by default turn on wireless; you have to login to enable the wireless radio.

7 thoughts on “TL-WR841N v9 DD-WRT to OEM Factory Firmware to Gargoyle”

  1. Directions as written did not work because the bin file is stored in tmp/root, not root/tmp. So I had to modify the command, from root, to mtd -e linux -r write /tmp/root/1.bin linux and then it worked. After that everything went off without a hitch. The discrepancy was not on my part, WinSCP sets it up like that, with root a sub of tmp. But the process worked. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.