Is there a possible way to access recovery mode in TL-WR840n remotely via WAN port?


Lately I've been using OpenWRT firmwares on TL-WR840n in a building (aprox. 110 apartments) from my company¹. The main goal was to use Ansible to keep all the routers up to date and to do maintenance remotely. After burning all of the firmwares into the 100+ routers and testing it in production, we've seen a lot of costumers not happy about the Wi-Fi performance (wich is known to be bad, due to mt76x8 driver, I've seen this issue here already). So, due to bad performance, we're taking the routers back to TP-link firmware. Unfortunately, the only way I know of return them to the previous firmware is by Recovery mode, where the router needs to be plugged into a TFTP server via Lan port, and then turned on while holding the reset button.

So, the question is: Is there a way to reverse them to official firmware ONLY using SSH via Wan?

¹ - It was a bold project and went quite wrong, but I learned a lot from it. So, feel free to ask me about it.


If possible, it would likely require opening the case and accessing the serial port on your 100+ machines. It may be a changeable bootloader option.

Otherwise, there may be a way to flash from the OS; but your device page doesn't mention the particulars such an option.

1 Like

tftp push-button recovery is completely handled by the device's bootloader, which is never touched by OpenWrt and remains at its OEM version. The features of this recovery mechanism are fixed and can't be changed without replacing the bootloader with a modified variant (which is kind of difficult to do on a large scale, given that TP-Link tends to append ubootenv to the end of the bootloader without exposing it individually, meaning you have to change each device individually - possible, but unreasonable on the kind of scale you're implying).

From your description, I assume you're talking about ~40 devices - at this scale (and their semi-inaccessibility) it might make sense to invest time on investigating if you can repack TP-Link's OEM firmware into a sysupgrade (or at least mtd) compatible format (if that isn't already the case, I haven't dealt with ramips based TP-Link devices so far). This will take efforts on your side, you may permanently brick a couple of devices while trying - but at your scale, that might be a small price to pay, as long as you brick them on your desk - and not in the field.