Device : TP-Link Archer C50 V6
Region: IN
OpenWrt Version : Snapshot
The first time I tried installing OpenWRT, i messed up and bricked my router beyond soft repair and I had to flash the firmware using UART. But since then I have done this twice, on different routers, and had no problems. I am saying this so you know what you are going into. Mistakes can happen so have some failsafe ready just in case. But don't worry follow the steps carefully and you would be running openwrt on your router.
Read this tutorial before moving forward : https://github.com/openwrt/openwrt/commit/e9ac1b19e0f3d383ab83373c261bfb5527a29521,
There are two ways to do this,
Through web Recovery (The easyish way)
TFTP (The harder way)
I am going to breakdown the steps in the easyish way.
Download the official firmware (latest version) of the C50 V6 from the official site, and rename it to "tpl.bin"
Download the OpenWRT snapshot for C50 V6, get the system
upgrade image not the installation image, rename it to "owrt.bin"
For the next step you will need a Linux distro, installing WSL (Ubuntu) will be the easiest way.
Move the files to Ubuntu by copy pasting it through file explorer (start Ubuntu, copy the two files and paste into home directory of Ubuntu, it would be attached as network storage) (Additionally if you are using Android you can use Termux)
Run the commands
dd if=tpl.bin of=boot.bin bs=131584 count=1
cat owrt.bin >> boot.bin
In simple words this commands strips the boot file from the official firmware and transfers it to the OpenWRT binary. This creates a boot.bin file in the same directory
9.Now navigate to the system upgrades section of the router, (firmware upgrade will be in the system tools section)
Here we flash the boot.bin file. And reboot
The first reboot will take alot of time,
Now you should be able to access OpenWRT by going to 192.168.1.1,
If this doesn't work you have to do TFTP method
If you don't want to go through the creation of the file just download it from my link, by make sure your firmware/build version is TP-Link Archer C50 V6 (try to build your own, only use this if the version numbers match)
Boot.bin: https://www.mediafire.com/file/m9rfda99jtuufyf/boot.bin/file
and i should also clarify that this does not come with luci web interface, you need to install it manually. Initially access it through SSH by typing
ssh root@192.168.1.1
press Ender, password is blank (set one immediately)
now run the following (change the default ip to your networks ip)
uci set network.lan.proto="static"
uci set network.lan.ipaddr="192.168.1.2"
uci set network.lan.netmask="255.255.255.0"
uci set network.lan.gateway="192.168.1.1"
uci set network.lan.dns="192.168.1.1"
uci commit network
service network restart
or set DHCP (if the first one doesn't work)
uci set network.lan.proto="dhcp"
uci commit network
service network restart
after this you shout have a internet connection, now to install luci
Now ssh back in with the static IP address you just set, eg: root@192.168.0.1 (the older ip won't work, so remember the static IP you set) (if you set DHCP you have to find it by logging into the ISP router, and set it as static)
apk add luci
this will install luci, and then you can do the rest manually (this doesn't have opkg, it's apk package manager so use "apk add" not "opkg install", unless you build the firmware yourself with opkg support ).
The bin file i provided has wifi enabled (both bands) by default, so you can do the router setup through wifi. You can do it through Termux on Android or through some software like PuTTY from windows
Note: it's always good to have a failsafe ready, so make sure you have mobile data or any other way to connect to internet, a CP2102 USB to UART converter (or a Arduino : you can ground the RST to ground and use its Rx Tx to write the firmware)