How I bricked my router?
I bricked my router while I was trying to revert back to stock firmware. Previously it was running OpenWRT. I downloaded the original firmware from the TP-Link website, extracted the zip file and transferred it to /tmp directory of the router and ran the command sysupgrade -F /tmp/firmware.zip which bricked my router.
Now when I switch on the router, all the LEDs lights up and turns off.
Steps I followed to unbrick the router:
I downloaded the tftpd64 from the official website and installed on my Windows 10 machine. Configured my ethernet adapter to use 192.168.0.66 and subnet mask to 255.255.255.0 and disabled my wireless adapter. I renamed the stock firmware to ArcherC7v4_tp_recovery.bin. Powered on the router while pressing reset button, router goes to recovery mode and th WPS light turns on.
Here is the screenshot of tftpd sending the firmware.
The problem is that the stock firmware is too large (14MB) to send in short recovery window of the router. I can flash OpenWRT firmware via this method but not the official or the DD-WRT firmware. Can somebody please help me to unbrick this router?
Since you can load OpenWrt, use it to sysupgrade a stripped stock firmware, and it will be back to stock. It is a good idea with any revert to stock that once the stock firmware boots, use it's web page to revert to factory settings and then again flash the stock firmware unaltered.
Download from TP-Link and unzip on your PC. Do not try to flash the zipped file.
If the stock firmware file does not have "boot" in the name you only strip the first block of 512 bytes. If it does have "boot" in the name you need to strip 257 blocks of 512 bytes.
The strip can be done in place on the router's RAM disk (/tmp) with the dd command.
The latest stock firmware didn't contained boot soo I stripped 512 bytes, I ran this command in /tmp folder and did sysupgrade. This is the output:
root@OpenWrt:/tmp# sysupgrade -n -F stripped.bin
Image metadata not found
Invalid image type.
Image check 'platform_check_image' failed but --force given - will update anyway!
Commencing upgrade. Closing all shell sessions.
Router is bricked again.
Edit: This was the output of dd command
dd if=firm.bin of=stripped.bin bs=512 skip=1
29563+1 records in
29563+1 records out
I have tried stripping 512 bytes of both dd-wrt and stock firmware but no luck, the router still bricks after trying to flash stripped firmware file. I also tried with older stock firmware but still failed. If anyone found the solution, please help me
I'm running the command myself on my router and will let you know if the stripped file is different than original.
Update: I checked the file size and stripped file is 512 bytes less than the original. The output actually shows how much data has been written to the new file.
I flashed the stripped firmware using mtd -r write /tmp/stripped.bin firmware unfortunately this dosen't worked, is there any way to revert it back to stock?
I dont recommend using mtd if sysupgrade is available for your router. The above forum link also states that if the firmware file doesnt contain the word boot in it you can just flash the file to get back to stock.
Have you tried flashing the stock firmware without stripping it?
new devices seem to use completely different type of firmware bundle. looking at Archer C7(EU)_V4_180425.bin i see it contains some env/partitions info in the beginning followed by u-boot image at offset 2014. expecting fw header at 22014 but there was none.
if you had flash dump you could restore that one otherwise it might possible that even u-boot tftp upgrade won't work given there are no other problems with tftp (from first post it can be seen transfer speed is quite low, approx. 500KB/s and it times out eventually while it probably should transfer in a matter of seconds)
I think this is the reason why @random_dude cant flash the stock firmware from recovery procedure. 500kb/s is quite low for Ethernet, maybe a faulty cable or faulty port, try changing the cable and/or Ethernet port if you have more than one. As @psyborg suggested the firmware should transfer in just a couple of seconds. In the 2nd post it says:
TIMEOUT waiting for Ack block #9649
So it is expecting the firmware to be transferred by then but since it does not get enough bytes transferred it fails and restarts the device.
I would suggest to use the official firmware and do not strip it, and if you can try to flash it through the recovery procedure because it will most likely unbrick your device and switch it back to stock. Try to unzip the file if it's in .zip or .rar format and then use the extracted .bin file. Rename it as the router is asking for the file.
I guess debricking would be a lot easier if one has serial access, because then stopping the boot process is rather simple and a couple of commands can write the firmware and switch back to stock.