Disclaimer
I have two routers and these steps worked on one router, but not on the other. This is just a reminder.
Intro
Recently i got a few of used Archer C6 v2 routers very cheap. They were used in a Covid testing facility which in 2023 went under. Interesting thing is - they were using openwrt on those devices.
While I a fan of openwrt, the devices in question are super slow when using openwrt, so oem firmware it is.
The problem
On openwrt forums there is a load of posts which deal with problems in restoring oem firmware, but non of which actually worked. So trying this and that i finally managed to restore it.
The solution
Upgrade openwrt
First thing which was needed was to upgrade openwrt. At the time of the writing, version is: openwrt-23.05.3-ath79-generic-tplink_archer-c6-v2-squashfs-sysupgrade.bin
Setup tftp
For this we need dnsmasq. Since im running fedora, selinux was causing issues, so i kinda disabled it:
setenforce 0
Then set up dnsmasq with editing /etc/dnsmasq.d/tftp.conf:
port=0
interface=eno1
bind-dynamic
enable-tftp
tftp-root=/srv/tftpd
tftp-mtu=1500
Put the oem debug image to /srv/tftpd. It must have the name ArcherC6v2_tp_recovery.bin.
Start dnsmasq with systemctl start dnsmasq.
IP
Set your PCs ip address to 192.168.0.66 (it has to be exact) and connect the PC to your router LAN ports. Router will have 192.168.0.86.
Run upgrade
Finally, turn of the router if not already turned off. Then with a toothpick press the reset button and while it is pressed turn the router on. Keep the button pressed until you see in the journal that the file has been sent.