Installing OpenWrt on TP Link Archer C7 v5

Hello folks,

I recently purchased a TP-Link Archer C7 v5 (AC 1750) with the idea of installing Openwrt. I have installed Openwrt on many routers and am familiar with the software.

I'm having a hard time installing on this particular router. First tried a manual install using the tp-link webpage (manual install).Got an "invalid file type" error

Then tried an install using TFTP. Renamed the firmware file to "ArcherC7v5_tp_recovery.bin". Set my computer to 192.168.0.66/24.Opened up my firewall for tftp. Using wireshark on my ethernet port and also looking at tftp logs realtime to monitor the process.

TFTP logs show a read request for "ArcherC7v5_tp_recovery.bin" and a corresponding "finished" log from 192.168.0.86, which is the TP Link Routers IP address. However,nothing happens! The router just boots up to the original TP Link firmware.

I have checked my TFTP server on 192.168.0.66 using a TFTP client, and it works just fine. I'm able to "get" the firmware file. However, no luck with flashing Openwrt!

Has anyone experienced this problem? Inputs would be much appreciated!

Thanks in advance

Only serial console access will really tell you why the bootloader refuses to flash the uploaded image, but the most likely cause would be non-matching region codes.

I'm in the same boat, trying to flash my Archer C7 v5 with OpenWrt results in the file being transferred successfully but the router continues to boot into the TP-Link firmware. Trying to flash with TP-Link firmware only works going back to their 2021-01-25 build.

My model is a (US) region code, so I think it's unlikely that that's the issue?

Has anyone had success flashing this router recently?

I pick it up from Amazon about a month ago - came with 1.0.15 Build 20200628 rel.63501(4341) tp-link firmware - was able to flash directly to 19.07.7 with no issues. I have not played with the tftp recovery ( the included link seems to indicate that v5 should support it ) - it might be a way to try to install Openwrt without having to install the serial console - see tftp info - good luck.

Hello All,

An update...

Still no luck flashing the router with Openwrt. Incidentally, I purchased mine on Amazon as well!

I did some digging and have some questions.

  • Went to the TP-LINK website and downloaded the latest firmware upgrade file
  • Filename: a7v5_us-up-ver1-1-2-P1[20210125-rel39623].bin
  • A manual upgrade using the TP-LINK web interface with the above file worked.It did not return the usual "invalid file type" error
  • Please note that when I try to flash using openwrt firmware, or other TP-Link factory fw files, I always get an "invalid file type" error

Since, the latest TP-Link factory firmware file worked, I looked at the binary file (TP-Link factory firmware) using the linux "hexdump -C" command on my laptop. Below are the first few lines/bytes of output

00000000  00 ed 63 e8 46 d1 85 fa  51 af b8 75 ee 82 85 a6  |..c.F...Q..u....|
00000010  98 e4 2e 9b 66 77 2d 74  79 70 65 3a 43 6c 6f 75  |....fw-type:Clou|
00000020  64 0a 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |d...............|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

What I found interesting was the "fw-type:Cloud" field in the file!

Next, I used "hexdump -C" to look at the Openwrt firmware file. Below are the first few lines/bytes

00000000  00 44 8a 2e 25 42 d3 b1  a6 40 59 a8 53 b0 b3 f4  |.D..%B...@Y.S...|
00000010  53 8b c9 29 ff ff ff ff  ff ff ff ff ff ff ff ff  |S..)............|
00000020  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

Interestingly, no "fw-type" field in the first few lines!

My questions are as follows:

  • Is the "fw-type" field needed for a successful install/upgrade?
  • Is the absence of this field in the Openwrt file preventing the flashing of the firmware?

Anyways, my knowledge of Openwrt internals is very limited! Just thought I'd bring this up, in the hope that this catches the attention of folks that know the system...

Thanks in advance for input/feedback

Cheers!

This file is for Archer A7 v5. It is different from the C7. You need to flash it with another file. Use tftp recovery mode. Despite it is an A7, the file name should be still "ArcherC7v5_tp_recovery.bin"

http://downloads.openwrt.org/releases/19.07.7/targets/ath79/generic/openwrt-19.07.7-ath79-generic-tplink_archer-a7-v5-squashfs-factory.bin
http://downloads.openwrt.org/releases/19.07.7/targets/ath79/generic/openwrt-19.07.7-ath79-generic-tplink_archer-a7-v5-squashfs-sysupgrade.bin

I purchased a new v5 (EU), upgraded to latest official firmware before flashing openwrt, and openwrt images wont load either. I think the latest TP Link firmwares for Archer C7 v5 have changed something.

It is suspicious that latest firmware for US version at https://www.tp-link.com/us/support/download/archer-c7/#Firmware says you can't roll back (,"Note: You will be unable to downgrade to the previous firmware version after updating this firmware.", image from 2020-12-18).

I soldered serial connection, and tried to install openwrt over TFTP to look at logs.

...
Bytes transferred = 8126464 (7c0000 hex)
Firmware downloaded... filesize = 0x7c0000 fileaddr = 0x80060000.
NM_Error 01402: The file's length is bad(buf:8126464 fileLen16777216)

recovery failed.
now restart...

I have root console and uboot access over serial (I also soldered Rx pin), but not sure how to get it to flash openwrt. Original firmware loads fine, over web or TFTP.

root@ArcherC7v5:/tmp# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00020000 00010000 "factory-uboot"
mtd1: 00030000 00010000 "u-boot"
mtd2: 00010000 00010000 "ART"
mtd3: 00180000 00010000 "uImage"
mtd4: 00e20000 00010000 "rootfs"

Any ideas what to try? tp link firmware actually runs a patched openwrt with sysupgrade, but sysupgrade fails too.

sysupgrade -n ./openwrt-19.07.7-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin
Platform image check OK ...
Sending TERM to remaining processes ... netifd client_mgmt miniupnpd imbd dnsmasq improxy dnsproxy_deamon sysmond tmpServer tdpServer pfclient tsched tdpServer tdpServer uhttpd sync-server dosd cloud-brd cloud-client S98factory_sett factory_setting online_test.sh cloud-https nrd crond S99zzzzzzaconn- conn-indicator sh sh systime_sync ntpd logd klogd hotplug2 sleep ubusd sleep sleep ledctrl 
Sending KILL to remaining processes ... client_mgmt imbd uhttpd crond sh sh systime_sync sleep sleep 
Switching to ramdisk...
Performing system upgrade...
Call platform upgrading hook ...
Start upgrading Status-LED blinking ...
Perform nvrammanager upgrading ...
The file's length is bad: 4456749
[NM_Error](nvrammanager_upgradeFirmware) 00422: upgradeFirmware failed

nvram_ubus: Failed to connect to ubus.
[NM_Error](main) 00860: pthread_cancel failed!

Upgrade completed
Rebooting system...

Hello everyone!
I'm sorry, but I don't speak English, I have to use a translator.
I think I found the solution.
The story is short.
I have an EU firmware Router. I updated to the latest factory Firmware and therefore I was unable to install any of the Openwrt firmware. (I tried the oldest and the new one) The "Invalid filename" was always aborted.
I did Downgrade with Tftpd server to an older factory firmware. (c7v5_ [20201120-rel50406] _2020-11-20_14.00.44.bin)
Then I tried to install the Openwrt firmware from the factory interface again, but again it failed. "Invalid filename" again.
I thought I would try to install the Openwrt firmware with Tftpd server again. And voila ... It worked !!