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.
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 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
File Protocol: SCP
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.
mtd -e linux -r write 1.bin linux
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.