Installing OpenWrt on TP-Link Archer C7 V2.0 (Backup/Restore)

I need some hints regarding the installation of openwrt on
a TP-Link Archer 7 V2 router.

  1. I installed manually openwrt 18.06.1 on a TP-Link Archer 7 V2.
    The configuration was as AP (Access Point) with some VLANS/WLANs and
    a management network interface. For sake of clarity i call this router as wap01.

Everthing was working as required. After that i tested a backup/recovery
solution, in which i archived the hole file system of the router,
using dd and tar, something like: dd if=/dev/mtdblock3 of=/tmp/wap01-dd-overlay.dd
The tests have been successfully.

  1. After a while i procured a second TP-Link Archer 7 V2, called wap02,
    and for installation, after installing the squashfs-factory.bin
    of the same operwrt 18.06.1 version, in failsafe-mode, i installed
    the wap01-dd-overlay.dd on wap02, the backup image from wap01.
    After that, i reconfigured the management network interface and i just
    adjusted the WLANs for wap02 and everything was working as required.

I procured and installed both routers wap01 and wap02 in Germany.

  1. Here is my issue:
    Using the same procedure, i want the to install the third TP-Archer 7 V2,
    wap03, this time in Romania. For that i, procured the same router in Romania,
    not in Germany. After installing, also in failsafe-mode, the wa01-dd-overlay.dd image
    the router wap03 is not reachable any more.

After booting procedure all leds gone off, except the power led.
The wap03 is not reachable overt the network interface using ssh or https.
I must mention, that the third router wap03 is working fine
using the TP-Link firmware.

I tried may procedures without success.

Thank you for any hints that help me to solve my issue.

If all three are really the same models (i dont know the difference between v2.0 and v2.1), i have cloned many of them and never ran into a problem; but my models are really all identical, all bought in 2015 and they all state "Model: Archer C7 Ver 2.0" on the label.

However you copy /dev/mtdblock3:
For LEDE 17.01 or Openwrt 18.06 i always copied the complete firmware (/dev/mtd5, check your /proc/mtd to be sure; on newer firmware or the now available V5 which isnt compatible to the image anyways, the layout is different).
Maybe something on your router was different initially and is not overwritten that way (like kernel doesnt match module version ect.), thats the only suggestion i have.

After cloning, remove
(will be rewritten after the next reboot)
...otherwise the Wifi MAC address of the cloned router is not its own but the one of the clone source, this is only a real problem if you run multiple routers at the same place.

Additionally i always save any routers "art" partition, so i have the original just in case something bad ever happens.

Many thanks!

Right now i don't have access to the first two routers to copy the complete firmware,
as you suggested, but i'll remove the bin's ... After that i'll post my results here.

At least, all three routers have the same label: C7 Ver 2.0.

After cloning, removing the two files as you recommended, didn't solve the issue.

At next boot /lib/firmware/ath10k/cal-pci-0000:01:00.0.bin
was rewritten, but /lib/firmware/ath10k/QCA988X/hw2.0/board.bin was not.

After reviewing the config files, i adjusted the config/network,
because the configuration of wap01 was to complex, with many trunk
ports and no local management port. After enabling a local management
port and rebooting the router the problem was still not solved.

My intuition told me to adjust the /config/system file.
In the system file from dd. backup image, i found some settings regarding
the LED configuration. After removing this settings, the router was up
and running. Here are the settings that i removed from system file:

### /etc/config/system file snippet:
config led
	option default '0'
	option name 'SYSTEM'
	option sysfs 'tp-link:blue:system'
	option trigger 'none'

config led
	option default '0'
	option name 'LAN1'
	option sysfs 'tp-link:blue:lan1'
	option trigger 'none'

config led
	option default '0'
	option name 'LAN2'
	option sysfs 'tp-link:blue:lan2'
	option trigger 'none'

config led
	option default '0'
	option name 'LAN3'
	option sysfs 'tp-link:blue:lan3'
	option trigger 'none'

config led
	option default '0'
	option name 'LAN4'
	option sysfs 'tp-link:blue:lan4'
	option trigger 'none'

After two years, i forgot why i done these setting :D.

Anyway removing these settings, solved my problem, partially at least.
Partially because the 5GHz wireless adapter was not working.
This was the moment, when i reviewed the firmware files and i realized
that the /lib/firmware/ath10k/QCA988X/hw2.0/board.bin was missing.

I started the hole procedure again:

  1. flash factory.bin (OpenWrt 18.06.01)
  2. install the dd backup image (fail_safe boot)
  3. adjust the config/network (for local port managemnt)and
    config/system (removing the LED configuration) in fail_safe mode.
  4. reboot router in normal mode
  5. the router was up and running as expected. DONE.

Thanks again!

Ok, good you found a working solution, sorry i had that board.bin piece wrong:

True, i tried to replicate it again and only cal-pci-0000:01:00.0.bin is recreated from the calibration data in the routers flash / and "board.bin" is actually deployed by the ath10k firmware package on the Archer-C7.

So your routers 5G Wifi should have the MAC Address from the clone source now (and likely its calibration data, not the one from the actual router; dont know if its any real issue, but surely not as intended. I ran some cloned routers for quite a while with the wrong data and no issues until i faced the duplicate-mac problem: ended up with 2 cloned routers in STA mode connected to the same Wifi which couldnt work because they had identical MAC addresses; and thats stored into & taken from cal-pci-0000:01:00.0.bin.
I seached quite a while for the reason where it would get the "cloned mac" from, and found it in that file.

I tried to reset the MAC address for 5GHz interface using uci:

uci set wireless.default_radio0.macaddr='XX.XX.XX.XX.XX.XX'
uci commit wireless

but it seems, that this setting is not working as expected, because
after that the 5GHz wlans were not available anymore.
Using the uci command i deleted the macaddr and after that the 5Ghz
wlans have been available again.

That's why, what would be the right solution to eliminate the "identical MAC address" on 5Ghz wlans?

During the installation process i have had the opportunity to discover
the most annoying openwrt feature, so far: the LUCI rollback for setting the
router/AP(access point) IP address. It was not possible to change the
IP address using LUCI. On the openwrt forum i found some complains
regarding this "feature". I'll back of my opinion about that, because it would imply to be rude.

Changing the IP address in the /etc/config/network file has had the side effect that the AP could not be managed using LUCI web interface anymore (at least using Material theme).

It took me a while to find out how to handle this "feature". Which i have done.

For the MAC address i think you just mix two options here:

Specifying a "macaddr" you can

  • override the MAC-Address in a "wifi-iface", or
  • define a selector for a "wifi-device"

For the actual SSID (here: test set to a dummy mac on the 2nd SSID on a 5GHz network):

root@ap1:~# uci get wireless.@wifi-iface[1].macaddr
root@ap1:~# ifconfig wlan0-1
wlan0-1   Link encap:Ethernet  HWaddr 00:01:11:22:33:44 

But what you applied is define a selector - openwrt would search for MAC 'XX.XX.XX.XX.XX.XX' and call that interface "radio0"; if it cant find it - the wifi-device doesnt exist.

To reset the MAC Address to the routers default MAC, you really should just delete "cal-pci-0000:01:00.0.bin" (and just this file as above). Or as a workaround: define an alternative MAC for your SSID in its "wifi-iface" section.

Removing the file /lib/firmware/ath10k/cal-pci-0000:01:00.0.bin done the job.

Thanks a lot!

1 Like

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