Archer D7 support

This is great! Been waiting for This for a long time. Sorry I can't be of help with the ADSL, I ha ve moved to fiber. But highly interested in testing firmware as router once the flash instructions are verified! Keep up the good work!

Hello,

I've compiled successfully the image but it's refused by the stock firmware interface when I try to upload it. How did you install it first time? (tried to upload the .bin file generated)

Unfortunately you need the serial interface. Currenlty is not possible to flash these modems using the web interface

Здравствуйте. На моем archerd7 не с того не с сего перестал работать wi fi, все устройства видят всего одно деление в метре от роутера archer d7 некоторые устройства вообще не обнаруживают сеть роутера Я решил прошить данный роутер openwert и использовать его в качестве обычного маршрутизатора без adsl, возможно ли прошить archer d7 openwert?

@karafen When writing in your native language, please always provide an english translation.
This way other users all around the world can take part in the discussion and possibly benefit from the outcome, without having to use a translator.

Excuse me..
"Hello. On my archerd7, it is not without reason that wi fi stopped working, all devices see only one division in a meter from the archer d7 router; some devices do not detect the router’s network at all. I decided to flash this openwert router and use it as a normal router without adsl, is it possible to flash archer d7 openwert? "

Hi guys,

Thanks so much for this port .. I have a d7 that I no longer need the ADSL portion and would like to install openwrt on it to make use of the AC wifi.

Has this been committed to master? I can't tell from GitHub.
Does this need to be compiled?
How is this working for everyone? Stability, wifi and routing?
Any pointers I should watch if I'm going to try this build out?

Thanks in advance... I'm a rookie when it comes to openwrt but really enjoying the power it gives!

No, https://github.com/openwrt/openwrt/pull/1205 never went anywhere.

Thanks for the update .

My experience is (at least on my version of the D7) it only runs from ram (after rebooting TP-Link firmware starts again). When I flash the flash version into flash (which only works thru serial yet), booting stops at "starting kernel".
BTW: I also have the ability to flash the chip external over CH341A and that works. Tried to tinker with uboot but that never lead to anything except unsoldering and unbricking the flash chip several times.

1 Like

Hello to everyone. I know it's been a while from last update and last reply. Well I'm here to ask a little help. I would like to do something that apparently was appearing quite simple but that is actually taking me out of mind: editing a file in original firmware in a permanent way. I got telnet working and I installed also a busybox on external usb drive as explained here "https://openwrt.org/toh/tp-link/archer-d7#guide" but right now I'm stuck because I'm not able to actually write in root folder (because is a SquashFS read-only). For what I read so far there is the need to extract/copy SquashFS on another location, edit it, compress it again and finally write it back.
Anyone can help me to actually complete these steps? Right now I'm stuck.
Thanks in advanced for any help.

Hello all,

I have solve it, my Archer D7 boot Openwrt from Flash now

The important thing is to change the Kernel Entry Point in

 IMAGE/sysupgrade.bin := tplink-v2-image -s -a 0x400 -L 0x80060000 -E 0x80060000 | \
        append-metadata | check-size $$$$(IMAGE_SIZE)

and also
modify the size of partions inside
MTDPARTS := spi0.0:128k(u-boot)ro,1369k(kernel),14631k(rootfs), ,,,

This figures have to be match to the kernel and image size. The total amount is 16000k and the size of rootfs is 16000k - aligned kernel size

I have patched now the Openwrt 18.x branch at it is still working. You will need the serial access to flash the images via tftp

Regards,
Wolfgang

1 Like

At this time the device firmware don´ t uses the MAC addresses of any interface

[ 0.142217] ar71xx: using random MAC address for eth0
[ 0.382332] ar71xx: using random MAC address for eth1

I have found the MAC String in the mtd5 (rom) Partition
The U-BOOT Log Messages shown the correct MACs

As workaround I have set this addresses in the /etc/config/network and /etc/config/wireless

By the way, my current Openwrt partition table

[    0.910011] 8 cmdlinepart partitions found on MTD device spi0.0
[    0.916028] Creating 8 MTD partitions on "spi0.0":
[    0.920892] 0x000000000000-0x000000020000 : "u-boot"
[    0.927481] 0x000000020000-0x000000176400 : "kernel"
[    0.934145] 0x000000176400-0x000000fc0000 : "rootfs"
[    0.940402] mtd: device 2 (rootfs) set to be root filesystem
[    0.946246] 1 squashfs-split partitions found on MTD device rootfs
[    0.952531] 0x000000360000-0x000000fc0000 : "rootfs_data"
[    0.959698] 0x000000fc0000-0x000000fd0000 : "config"
[    0.966381] 0x000000fd0000-0x000000fe0000 : "romfs"
[    0.972983] 0x000000fe0000-0x000000ff0000 : "rom"
[    0.979345] 0x000000ff0000-0x000001000000 : "art"
[    0.985760] 0x000000020000-0x000000fc0000 : "firmware"

backup your 'art' partition before any flashing, otherwise you have the risk loose wifi

is 5Ghz working for those who got it working... i have trouble with that
log:

root@OpenWrt:/#  dmesg | grep ath10
[   11.296521] ath10k_pci 0000:01:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   11.575963] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
[   11.586848] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.768040] firmware ath10k!pre-cal-pci-0000:01:00.0.bin: firmware_loading_store: map pages failed
[   11.777384] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/cal-pci-0000:01:00.0.bin failed with error -2
[   11.787907] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.920191] firmware ath10k!cal-pci-0000:01:00.0.bin: firmware_loading_store: map pages failed
[   11.934201] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2
[   11.945083] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.092664] firmware ath10k!QCA988X!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   12.426180] ath10k_pci 0000:01:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
[   12.435576] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   12.448621] ath10k_pci 0000:01:00.0: firmware ver 10.2.4-1.0-00037 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 a4a52adb
[   12.493668] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
[   12.504275] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.573593] firmware ath10k!QCA988X!hw2.0!board-2.bin: firmware_loading_store: map pages failed
[   12.583797] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   12.702269] ath10k_pci 0000:01:00.0: otp calibration failed: 2
[   12.708228] ath10k_pci 0000:01:00.0: failed to run otp: -22
[   12.713895] ath10k_pci 0000:01:00.0: could not init core (-22)
[   12.719884] ath10k_pci 0000:01:00.0: could not probe fw (-22)

and one more thing.... i flashed kernel and root separately...
In: tplink-v2-image -s -a 0x400 -L 0x80060000 -E 0x80060000 | \
what are the-s -a -L -E parameters standing for?

  -E <ep>         overwrite kernel entry point with <ep> (hexval prefixed with 0x)
  -L <la>         overwrite kernel load address with <la> (hexval prefixed with 0x)
  -a <align>      align the rootfs start on an <align> bytes boundary
  -s              strip padding from the end of the image
1 Like

5GHz is working ...

I´m using the archer-d7 modifications on the openwrt-18.06 branch

[   11.114451] ath10k_pci 0000:01:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   11.398398] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
[   11.409290] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.581482] firmware ath10k!pre-cal-pci-0000:01:00.0.bin: firmware_loading_store: map pages failed
[   11.592598] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2
[   11.603473] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.780965] firmware ath10k!QCA988X!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   11.795974] ath10k_pci 0000:01:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
[   11.805372] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   11.818426] ath10k_pci 0000:01:00.0: firmware ver 10.2.4-1.0-00037 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 a4a52adb
[   11.912229] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
[   11.922861] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.043941] firmware ath10k!QCA988X!hw2.0!board-2.bin: firmware_loading_store: map pages failed
[   12.053183] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   13.177230] ath10k_pci 0000:01:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal file max-sta 128 raw 0 hwcrypto 1
[   13.313795] ath: EEPROM regdomain: 0x0
[   13.313801] ath: EEPROM indicates default country code should be used
[   13.313804] ath: doing EEPROM country->regdmn map search
[   13.313816] ath: country maps to regdmn code: 0x3a
[   13.313820] ath: Country alpha2 being used: US
[   13.313823] ath: Regpair used: 0x3a
[   13.368166] ath: EEPROM regdomain: 0x0
[   13.368173] ath: EEPROM indicates default country code should be used
[   13.368176] ath: doing EEPROM country->regdmn map search
[   13.368188] ath: country maps to regdmn code: 0x3a
[   13.368193] ath: Country alpha2 being used: US
[   13.368196] ath: Regpair used: 0x3a
[   13.384155] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   13.387253] ieee80211 phy1: Atheros AR9550 Rev:0 mem=0xb8100000, irq=47
[   13.460097] kmodloader: done loading kernel modules from /etc/modules.d/*
[   14.686794] urandom_read: 5 callbacks suppressed

OpenWrt 18.06-SNAPSHOT, r7739-02aed76968

2 Likes

This parameter overwrite the kernel entry and kernel loading address inside the TP-LINK Header located an the first 0x512 byte of the image. Without this overwrite the values inside the "TPLINK_FLASHLAYOUT := 16Mltq" is use but the values are not correct. I use the alignment parameter to start the data partition at a 1k border. The -s is not really necessary

inside  mach-archer-d7-v1.c 

u8 *mac = (u8 *) KSEG1ADDR(0x1ffdf100);

gives the interfaces the original mac addresses :slight_smile:

my current working branch at Github

Github Branch based openwrt-18.06

Branch: tplink-archer-d7-v1

1 Like

Thanks you so much finally i can operate the D7 as a cheep AC AccessPoint. 5GHz works with that branch. Getting sysupgrade to work would be convenient for future updates.

As long the partion values are correct you are able to use sysupdate with the -F ( force ) parameter. Still one open point ...