Flashing a TP-Link Archer C7 V5.0 in detail

I have a notebook and will do tests before flashing. At the moment I am using an old notebook,

~# dpkg -l | grep tftp
ii  tftpd                                  0.17-18ubuntu2                             i386         Trivial file transfer protocol server

~# service tftpd status
● tftpd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

~# service tftpd start
Failed to start tftpd.service: Unit tftpd.service not found.

~# ls -la /var/lib/tftpboot
ls: Zugriff auf '/var/lib/tftpboot' nicht möglich: Datei oder Verzeichnis nicht gefunden
(not found)

Looks like I have to try another tftp-server.

Well atftpd worked a little bit better out-of-the-box, but has to be configured probably and manpages have to be read.

It looks like for Ubuntu 18.04 the choice is:

dpkg -l | grep tftp
ii  tftpd-hpa                              5.2+20150808-1ubuntu1.16.04.1              i386         HPA's 

~# ls -la /var/lib/tftpboot/
insgesamt 4
drwxr-xr-x  2 root nogroup    6 Nov 30 23:59 .
drwxr-xr-x 71 root root    4096 Nov 30 23:59 ..

root@notebook:~# service tftpd-hpa status
● tftpd-hpa.service - LSB: HPA's tftp server
   Loaded: loaded (/etc/init.d/tftpd-hpa; bad; vendor preset: enabled)
   Active: active (running) since Fre 2018-11-30 23:59:31 CET; 7min ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/tftpd-hpa.service
           └─5549 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure

Nov 30 23:59:31 notebook systemd[1]: Starting LSB: HPA's tftp server...
Nov 30 23:59:31 notebook tftpd-hpa[5536]:  * Starting HPA's tftpd in.tftpd
Nov 30 23:59:31 notebook tftpd-hpa[5536]:    ...done.
Nov 30 23:59:31 notebook systemd[1]: Started LSB: HPA's tftp server.

~# netstat -a | grep tftp
udp        0      0 *:tftp                  *:*                                
udp6       0      0 [::]:tftp               [::]:*  
tftp server

Looks not so bad for me, but I have to read more docs.

Well atftpd worked a little bit better out-of-the-box, but has to be configured probably and manpages have to be read.

It looks ways better now. The default configuration should be sufficient for your needs.

Next copy your image file to "/var/lib/tftpboot". Then install a TFTP client on the same machine (sudo apt-get install tftp) and try to fetch the file from your server with:
tftp localhost get ArcherC7v5_tp_recovery.bin

In case this works without problems try to access the file from a different notebook. As soon as this works as well you can try to flash your router. When it fails from a different client you need to add a firewall rule or disable the firewall temporary.

Thank you again, accelerate! But now I have to go on slowly.

First it looks like, there is no firmware for Germany to download from the official TP-link webpage. Compare https://www.tp-link.com/de/download/Archer-C7.html , but there is https://www.tp-link.com/en/download/Archer-C7_V5.html#Firmware

Can I save the original TP-Link firmware myself?

A 2nd problem is, that the C7 shows 72Mbps with my phone, while a GL-B1300 shows 86Mbps, but the C7 has better dBm-values (-5 - 10dBm difference) and at the end C7 and B1300 have very bad dBm-values (about -80dBm) with 5GHz. So I have to decide which router I use at this place and maybe I use the C7 at another place.

First it looks like, there is no firmware for Germany to download from the official TP-link webpage

That's true, but when you login at your archer c7 and look at the installed firmware version/build/release numbers you should see it's the same as provided at https://www.tp-link.com/en/download/Archer-C7_V5.html#Firmware(c7v5_us-eu-ca-jp-tw-up-ver1-0-4-P1[20180425-rel72768].bin). At least when the latest version was already preinstalled.

Can I save the original TP-Link firmware myself?

I never tried that.

A 2nd problem is, that the C7 shows 72Mbps with my phone, while a GL-B1300 shows 86Mbps, but the C7 has better dBm-values (-5 - 10dBm difference)

Did you do a speed test or is this just what your device is telling you?

at the end C7 and B1300 have very bad dBm-values (about -80dBm) with 5GHz

I can tell you only about my experience and 5GHz can't cope as good with range and walls as the 2,4GHz frequency. Even with -80dBm at 5GHz you should get more speed than with 2,4GHz.

Isee 1.0.4 Build 20180425 rel.72768(4555)

My Android phone tells me the speed.

With my old TP-Link I noted, that speed is not so important as a stable signal. So IMHO this means I should prefer dBm values.

Anyway I will go on now with my Linux-tests so I can flash with tftp. I don't have a 2nd notebook. But I hope I can do a test with a mobile phone and a ftp-client or Solid Explorer and a ftp-connection.

Isee 1.0.4 Build 20180425 rel.72768(4555)

So for me it looks like you have the same firmware installed as available on: https://www.tp-link.com/en/download/Archer-C7_V5.html#Firmware.

My Android phone tells me the speed.

I usually prefer practical speed measurement.

With my old TP-Link I noted, that speed is not so important as a stable signal. So IMHO this means I should prefer dBm values.

Well that's something you have to decide for yourself. As soon as you have a working tftp server the rest is easy :slight_smile:

netstat -lunp|grep 69
udp 0 0 0.0.0.0:69 0.0.0.0:* 957/in.tftpd
udp6 0 0 :::69 :::* 957/in.tftpd

I do not understand this, because I get a prompt, although the IP is not valid. I thought I use a fixed IP, but actually DHCP was configured.
$ tftp 192.168.178.123
tftp> get ArcherC7v5_tp_recovery.bin
Transfer timed out.

But then with the correct IP:
~/test$ tftp 192.168.178.21
tftp> get ArcherC7v5_tp_recovery.bin
tftp> quit

The file was downloaded locally and the md5sum was correct.

So the next step is to check with a mobile phone (Androdi 8.1) and here I have a syntax problem. I tried 1 command with -g too, didn't help.

termux

$ tftp 192.168.178.123
tftp> get ArcherC7v5_tp_recovery.bin
Transfer timed out.
But then with the correct IP:
~/test$ tftp 192.168.178.21
tftp> get ArcherC7v5_tp_recovery.bin
tftp> quit

I don't see what's wrong here. Your TFTP client will try to connect to the ip you specified as soon as you try to fetch a file.

So the next step is to check with a mobile phone (Androdi 8.1) and here I have a syntax problem. I tried 1 command with -g too, didn't help.

Did you try "tftp -gr ArcherC7v5_tp_recovery.bin 192.168.178.2" already?

Looks like my problem was a weak / far away ap. I shortened the filename for the test to test.bin to be faster with the mobile phone.

From another linux pc:

~/test$ tftp 192.168.178.21
tftp> get test.bin
Received 4028679 bytes in 19.5 seconds

From the phone:

termux

But I am unsure if this confirms, that there is no firewall-problem. AFAIK there is no firewall enabled with Ubuntu by default and the notebook is a fresh setup, for testing only, not for productive use.

The notebook is in the same network via Wifi as all the other pcs, phones, etc.

When I flash I will change the network of the notebook and give the notebook a static IP 192.168.0.66, so again the ftp-transfer is within the local network.

I think everything works now and don't think there will be a firewall problem. You can try to flash your router now. Just try it and it should work really fine :slight_smile:

After reading so much, I think I should have get this a bigger attention, although it is for version 4.

https://openwrt.org/toh/tp-link/tp-link_archer_c20_v4#installation

On Linux:

  1. Download http://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt76x8/openwrt-18.06.1-ramips-mt76x8-tplink_c20-v4-squashfs-tftp-recovery.bin.

  2. Configure a computer with static IP 192.168.0.66/24 and a TFTP server. On Debian or Ubuntu you can use either the tftpd-hpa or tftpd server packages.

  3. Rename the downloaded firmware file to tp_recovery.bin and place it in the tftp server's root directory. (If using tftpd-hpa this is /var/lib/tftpboot/ ; if tftpd , it is /srv/tftp/ .) You can test that the file is downloadable with tftp localhost and get tp_recovery.bin .

  4. Connect the computer to one of the router's Ethernet ports while the router is off. Press and keep pressed the router's reset button and power it up. After about 7-10 seconds release the reset button. The power LED will flicker rapidly for ~3 seconds, indicating download of the firmware file.

  5. The router will write the firmware to flash during ~40 more seconds of occasional power LED blinks, and then will reboot by itself, ready for use.

It recommends tftpd-hpa, which works best for me.

Please can you confirm the flashing process.

Press and keep pressed the router's reset button and power it up

I do not have a reset button, but a tiny hole, where I can put in a needle, maybe not so easy to press at the same time the power button. Can I release the power button immediately?

After about 7-10 seconds release the reset button

What happens if I press longer, for example 15 seconds? Do I need a clock?

Sorry, if my questions sound stupid. I am very respectful when flashing devices, had to much problems with phones.

Please can you confirm the flashing process.

Just follow the steps described here:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=bf39d5594b3c8f9409e6d9408a1f370c9f18d0dd
and rename the file to: ArcherC7v5_tp_recovery.bin

I do not have a reset button, but a tiny hole, where I can put in a needle, maybe not so easy to press at the same time the power button. Can I release the power button immediately?

You will have to press the reset button with a needle and yes you immediately can release the power button.

What happens if I press longer, for example 15 seconds? Do I need a clock?

I don't think there will happen much. Just press it for about 15 seconds. Don't be afraid here, your router will start flashing the image file or just continue booting to the stock firmware.

Do you really mean "happen much"? Looks like you meant "not happen much".

Theoretically I am ready to flash, but maybe I can make a backup before. I found http://www.geektalks.org/how-to-backup-flash-from-tplink-wr703n which suggest a very simple way for a WR703N.

backup u-boot:
cat /dev/mtd0 > /tmp/backup_u-boot.bin

backup art:
cat /dev/mtd4 > /tmp/backup_art.bin

backup firmware with your settings:
cat /dev/mtd5 > /tmp/backup_firmware.bin

backup full flash:
cat /dev/mtd0 > /tmp/backup_fullflash.bin
cat /dev/mtd5 >> /tmp/backup_fullflash.bin
cat /dev/mtd4 >> /tmp/backup_fullflash.bin

To do something like this, I have to access the C7 with the stock-fw via ssh. I am asked for a username and a pw. I tried user admin and the router PW, but I didn't get access. Maybe ssh-access has to be allowed in the stock-fw, but I couldn't find a menu whith an ssh-option. Any ideas?

https://openwrt.org/docs/guide-user/installation/generic.backup mentions a solution for the C9, but I do not have an UART console.

The method above works great, but only if you have SSH root access to you router. In some cases when you don't have SSH root access to router, but can connected from UART console. For example TP-Link Archer C9 HW ver 5.0 with original stock firmware

I don't see much of a benefit here. You can easily go back to stock via TFTP. Of course you can try to create images of your device partitions, but for me it is not worth the effort in this case.

I flashed the C7 in the meantime with success. Looks like, there is no ssh access for the user. People are reporting that ssh is reserved for the tether app.

Thank you for your help again!

Edit: I want to mention, that the flickering of my LEDs was very different than described.

  • After about 7-10 seconds release the reset button. The power LED will flicker rapidly for ~3 seconds, indicating download of the firmware file.
  • The router will write the firmware to flash during ~40 more seconds of occasional power LED blinks, and then will reboot by itself, ready for use.

I didn't notice the flickering for 3 seconds, I saw nothing for a "long" time, no idea, maybe 15 seconds or longer there happened nothing and then the Power LED started flickering permanently for a very long time, maybe 20 seconds or longer and then there was a constant light with the Power LED. I would say, wait for about 5 minutes before you try anything, if it worked.

this backup was very easy:

dd if=/dev/$(grep -i '"art"' /proc/mtd |cut -c 1-4) of=/tmp/art.backup

dd if=/dev/mtd0 of=/tmp/boot.backup

You are welcome and good to hear it worked out for you :slight_smile:

@linuxuser If your problem is solved, please consider marking the topic as [Solved] (Click the pencil behind the topic...).

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.