Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ar71xx: add support for TP-Link Archer A7 v5 #1462

Closed
wants to merge 1 commit into from

Conversation

aep
Copy link
Contributor

@aep aep commented Oct 10, 2018

this is identital to Archer C7, but with a different flash layout

TP-Link Archer C7 v5 is a dual-band AC1750 router, based on Qualcomm/Atheros
QCA9563+QCA9880.

Specification:

750/400/250 MHz (CPU/DDR/AHB
128 MB of RAM (DDR2)
16 MB of FLASH (SPI NOR)
3T3R 2.4 GHz
3T3R 5 GHz
5x 10/100/1000 Mbps Ethernet
10x LED, 2x button
UART header on PCB
Flash instruction:

Upload lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin via Web interface
Flash instruction using TFTP recovery:

Set PC to fixed ip address 192.168.0.66
Download lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin
and rename it to ArcherC7v5_tp_recovery.bin
Start a tftp server with the file tp_recovery.bin in its root directory
Turn off the router
Press and hold Reset button
Turn on router with the reset button pressed and wait ~15 seconds
Release the reset button and after a short time
the firmware should be transferred from the tftp server
Wait ~30 second to complete recovery.

With help from: Michael Hilgenstock
Signed-off-by: Arvid E. Picciani aep@exys.org

@aep aep changed the title add support for TP-Link Archer A7 v5 ar71xx: add support for TP-Link Archer A7 v5 Oct 10, 2018
this is identital to Archer C7 v5, but with a different flash layout

TP-Link Archer C7 v5 is a dual-band AC1750 router, based on Qualcomm/Atheros
QCA9563+QCA9880.

Specification:

750/400/250 MHz (CPU/DDR/AHB
128 MB of RAM (DDR2)
16 MB of FLASH (SPI NOR)
3T3R 2.4 GHz
3T3R 5 GHz
5x 10/100/1000 Mbps Ethernet
10x LED, 2x button
UART header on PCB
Flash instruction:

Upload lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin via Web interface
Flash instruction using TFTP recovery:

Set PC to fixed ip address 192.168.0.66
Download lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin
and rename it to ArcherC7v5_tp_recovery.bin
Start a tftp server with the file tp_recovery.bin in its root directory
Turn off the router
Press and hold Reset button
Turn on router with the reset button pressed and wait ~15 seconds
Release the reset button and after a short time
the firmware should be transferred from the tftp server
Wait ~30 second to complete recovery.

With help from: Michael Hilgenstock
Signed-off-by: Arvid E. Picciani <aep@exys.org>
@mkresin mkresin added the target/ar71xx pull request/issue for ar71xx target label Oct 11, 2018
{"fs-uboot", 0x20000, 0x20000},

{"os-image", 0x40000, 0x180000}, /* Stock: base 0x40000 size 0x120000 */
{"file-system", 0x1c0000, 0xd80000}, /* Stock: base 0x160000 size 0xde0000 */
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could dynamic partitioning be used here by deleting the os-image and file-system partitions and replacing them with {"firmware", 0x40000, 0xf00000},? It looks like build_image() can create the two partitions on the fly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could, but i'd rather copy paste from the other devices. It's already difficult enough to get something upstream. Probably easier when there's nothing new.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for adding dynamic partitioning.

I'm currently in the process of adapting all ar71xx targets to use this, as the os-image partition size of 0x180000 is too small and causes build errors using kernel 4.14

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xback very nice. it usually takes around 6 months for a PR to get merged, so no rush. Let me know when the existing targets changed and i'll adapt the PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aep

I pushed the changes for the other ar71xx targets, switching most of them to dynamic partitioning.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I also bought an Archer A7 mistakenly thinking it would be supported by openwrt.

OVERLY WORDY INFO FOLLOWS FOR NOOBS LIKE MYSELF:

I created a ubuntu VirtualBox and tried to build using the pull request via:
git clone https://github.com/openwrt/openwrt.git
cd openwrt
git fetch origin +refs/pull/1462/merge
git checkout FETCH_HEAD
make menuconfig
make -j8

But this ran into problems for the above and no openwrt-ar71xx-generic-archer-a7-v5-squashfs-factory.bin was created.

However, with this patch on just master openwrt, I was able to create the bin file.
git checkout master
git apply [patch_name.patch]
rm .config
make defconfig
make menuconfig
One gotcha here is that I needed to change to "ath79" before "TP-LINK Archer A7 v5" would show under "Default Profile".

Then I just ran "make -j8" again and the bin file was created. I logged into the factory router GUI, and uploaded this bin. Everything came back and I had SSH access to 192.168.1.1.

There is no LuCI GUI in this build by default and opkg is not yet supporting this ath79 so in order to get this I had to rebuild with luci:
./scripts/feeds update
./scripts/feeds install -a -p luci
make menuconfig
make -j8

SCP (now the sysupgrade bin) into the router's /tmp dir and use sysupgrade from the router to get it updated. Done. Have LuCI.

Copy link

@Crackow Crackow Nov 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comment! I've been putzing about, unable to create the *factory.bin.

I have just one quick question. To which patch are you trying to link? Chrome shows "this patch" in bold and elinks displays it as just grey text.

Also, thank you to aep!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I had a good bit of help from the IRC channel. They pointed me at this patch. In fact, I believe they crated a patch link for me. I think I recall them saying it was from the mailing list as opposed to the pull request.

Using the patch linked here, I was able to follow my recipe pasted above. Good luck!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I want to be able to opkg install stuff, will this version work?

I assume ath79 device tree hasn't been released, so we won't have opkg repository for it, is that right?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been installing downloaded .ipk files.

@8grad
Copy link

8grad commented Oct 14, 2018

Hey @aep thanks for your comments and help.
I have bought the model Archer A7(EU) Ver.5.0 and tried to flash the router via Webinterface with this openWRT Factory Software: openwrt-18.06.1-ar71xx-generic-archer-c7-v5-squashfs-factory.bin

However, I get the message 'invalid file type'. Also I have tried to flash via TFTP.

  • √ I connect via a gigabit swich
  • √ set up my machine to use IP 192.168.0.66
  • √ set up my TFTP-Server on OS X
  • √ test my TFTP-Server via tftp 192.168.0.66 and get ArcherC7v5_tp_recovery.bin wich results in a Received 4028679 bytes in 0.8 seconds

After the given TFTP Instructions the Router only reboots with it's given tp-link Firmware 1.0.1 Build 20171103 rel.56447(4555)

Am I using the wrong release, since you are saying download lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin but release 18.06.1 is prefixed with openwrt-XX

I appreciate your help.
Marc

@aep
Copy link
Contributor Author

aep commented Oct 14, 2018

Hi @8grad . ignore the commit message, this is just copy paste required for upstreaming in openwrt.

You need to build this pull request and select archer A7 in menuconfig, then use lede-ar71xx-generic-archer-a7-v5-squashfs-factory.bin from bin. note the a, not c.

see https://help.github.com/articles/checking-out-pull-requests-locally/ for how to get a pull request into your local clone

@8grad
Copy link

8grad commented Oct 15, 2018

Hey @aep,
I feel totally stupid after realizing, that — of cause — I have to compile your PR. Thanks for your work and for pointing me to the right direction. It all works very well with your contribution.

@sethzilla
Copy link

Thank you @aep. So far this is working great for me.

@xhbl
Copy link

xhbl commented Oct 22, 2018

Hey @aep,
I pulled your request and merged to v18.6.1 and successfully compiled the openwrt-ar71xx-generic-archer-a7-v5-squashfs-factory bin file. Flashed to my A7(US) without other issues except that all LEDs are off. not sure if I made something wrong or not.
Thanks for your great job!

@aep
Copy link
Contributor Author

aep commented Oct 23, 2018

@xhbl A7 US version may be yet another board. would you be able to take a picture of the board?

@8grad
Copy link

8grad commented Oct 23, 2018

Hey @xhbl
I had the same issue here. After installing LuCI, you can login and configure the LED's of your router: http://192.168.X.X/cgi-bin/luci/admin/system/leds
Otherwise just edit /etc/config/system

config led 'led_wlan'
        option trigger 'switch0'
        option name 'Internet'
        option sysfs 'archer-c7-v5:green:power'
        option default '0'

config led 'led_wlan5g'
        option name 'WLAN5G'
        option trigger 'phy0tpt'
        option sysfs 'archer-c7-v5:green:wlan5g'
        option default '0'

config led 'led_wan'
        option trigger 'switch0'
        option port_mask '0x02'
        option sysfs 'archer-c7-v5:green:power'
        option name 'Power'
        option default '1'

config led 'led_lan1'
        option name 'LAN1'
        option trigger 'switch0'
        option port_mask '0x04'
        option default '0'
        option sysfs 'archer-c7-v5:green:lan1'

config led 'led_lan2'
        option name 'LAN2'
        option trigger 'switch0'
        option port_mask '0x08'
        option default '0'
        option sysfs 'archer-c7-v5:green:lan2'

config led 'led_lan3'
        option name 'LAN3'
        option trigger 'switch0'
        option port_mask '0x10'
        option default '0'
        option sysfs 'archer-c7-v5:green:lan3'

config led 'led_lan4'
        option name 'LAN4'
        option trigger 'switch0'
        option port_mask '0x20'
        option default '0'
        option sysfs 'archer-c7-v5:green:lan4'

config led 'led_usb1'
        option name 'USB1'
        option interval '50'
        option default '0'
        option trigger 'none'
        option sysfs 'archer-c7-v5:green:usb'

Hey @aep,
I pulled your request and merged to v18.6.1 and successfully compiled the openwrt-ar71xx-generic-archer-a7-v5-squashfs-factory bin file. Flashed to my A7(US) without other issues except that all LEDs are off. not sure if I made something wrong or not.
Thanks for your great job!

@aep
Copy link
Contributor Author

aep commented Oct 23, 2018

oh... thats actually my fault, i forgot to rename the leds in bringup.
the openwrt naming scheme for leds is super confusing.

will fix it when i get time to do that.

thanks for the find

@xhbl
Copy link

xhbl commented Oct 23, 2018

Hey @xhbl
I had the same issue here. After installing LuCI, you can login and configure the LED's of your router: http://192.168.X.X/cgi-bin/luci/admin/system/leds
Otherwise just edit /etc/config/system

config led 'led_wlan'
        option trigger 'switch0'
        option name 'Internet'
        option sysfs 'archer-c7-v5:green:power'
        option default '0'

config led 'led_wlan5g'
        option name 'WLAN5G'
        option trigger 'phy0tpt'
        option sysfs 'archer-c7-v5:green:wlan5g'
        option default '0'

config led 'led_wan'
        option trigger 'switch0'
        option port_mask '0x02'
        option sysfs 'archer-c7-v5:green:power'
        option name 'Power'
        option default '1'

config led 'led_lan1'
        option name 'LAN1'
        option trigger 'switch0'
        option port_mask '0x04'
        option default '0'
        option sysfs 'archer-c7-v5:green:lan1'

config led 'led_lan2'
        option name 'LAN2'
        option trigger 'switch0'
        option port_mask '0x08'
        option default '0'
        option sysfs 'archer-c7-v5:green:lan2'

config led 'led_lan3'
        option name 'LAN3'
        option trigger 'switch0'
        option port_mask '0x10'
        option default '0'
        option sysfs 'archer-c7-v5:green:lan3'

config led 'led_lan4'
        option name 'LAN4'
        option trigger 'switch0'
        option port_mask '0x20'
        option default '0'
        option sysfs 'archer-c7-v5:green:lan4'

config led 'led_usb1'
        option name 'USB1'
        option interval '50'
        option default '0'
        option trigger 'none'
        option sysfs 'archer-c7-v5:green:usb'

Hey @aep,
I pulled your request and merged to v18.6.1 and successfully compiled the openwrt-ar71xx-generic-archer-a7-v5-squashfs-factory bin file. Flashed to my A7(US) without other issues except that all LEDs are off. not sure if I made something wrong or not.
Thanks for your great job!

Great! works like a charm!

@READ10
Copy link

READ10 commented Oct 25, 2018

+1; patched 18.06.1, built and installed using factory firmware upgrade, and the installation went perfectly
Many thanks, I bought an A7 by mistake instead of a C7 and was very happy to find this PR.

@bobafetthotmail
Copy link
Contributor

ignore the commit message, this is just copy paste required for upstreaming in openwrt.

It's supposed to be working install instructions man, put some effort in it.

@rotanid
Copy link
Contributor

rotanid commented Dec 18, 2018

this device was added to the ath79 target now: 1e4ee63
after the requested changes and a rebase this should make ar71xx possible, too

@aep
Copy link
Contributor Author

aep commented Dec 18, 2018

@rotanid 1e4ee63 looks fine to me. any reason to keep this PR open?

@ynezz
Copy link
Member

ynezz commented Dec 18, 2018

any reason to keep this PR open?

Indeed, I don't see any valid reason to keep it open. Thanks!

@aep aep closed this Dec 18, 2018
@jslee7897
Copy link

Does the 5G work with this patch? I only see radio0 is enabled.

@aep
Copy link
Contributor Author

aep commented Dec 30, 2018

@jslee7897 yes, 5ghz radio works fine. Please note that this PR is abandoned in favor of upstream change 1e4ee63

@ModMyRouter
Copy link

ModMyRouter commented Apr 20, 2019

Hello @aep, I am trying to flash my AC1750 A7. I'm super new to open source firmware for routers. I have flashed a Buffalo router with DDWRT firmware years ago. There was not a compatibility issue with the Buffalo router, so flashing via Web Interface was easy.

I am looking at this page -- https://openwrt.org/toh/hwdata/tp-link/tp-link_archer_a7_v5
The site shows -- Installation method(s): U-Boot TFTP recovery
But, your upstream link mentions uploading openwrt-ath79-generic-tplink_archer-a7-v5-squashfs-factory.bin via WebInterface. Will I have any issues if I use my TP-Link WebInterface?
The file matches the description of your upstream link:
Firmware OpenWrt snapshot Install URL: http://downloads.openwrt.org/snapshots/targets/ath79/generic/openwrt-ath79-generic-tplink_archer-a7-v5-squashfs-factory.bin

Is the stable build of OpenDDWRT only available for:
TP-Link | Archer C7 AC1750 | v5 | 18.06.2 . ?

Can you send me in the right direction so I don't cause my AC1750 A7 to boot loop or brick?

@aep
Copy link
Contributor Author

aep commented Apr 20, 2019

Personally i recommend flashing via tftp, because it always works, even after you flashed a broken firmware. It's rather difficult to brick modern tplink devices, so don't worry too much.

This PR was never merged. Ignore it and go with whatever the wiki says.

@bobafetthotmail
Copy link
Contributor

bobafetthotmail commented Apr 20, 2019

Firmware OpenWrt snapshot Install URL: http://downloads.openwrt.org/snapshots/targets/ath79/generic/openwrt-ath79-generic-tplink_archer-a7-v5-squashfs-factory.bin

A word of caution here. Snapshot images are the development firmware images and have no web interface by default (you need to connect through SSH remote terminal and install it). They are also updated frequently so you won't be able to install some packages after a week or so.
It might not be a pleasant experience, so keep the stock firmware on hand in case you want to roll back and wait for the stable release.

Will I have any issues if I use my TP-Link WebInterface?

According to the commit adding support for this device, you can use both web interface and tftp recovery.
1e4ee63
You might need to rename it to make it shorter and with only letters, like "firmware.bin" but should work.

I updated the wiki, now both "GUI OEM" and "u-boot recovery" are listed as available.

Is the stable build of OpenDDWRT only available for:
TP-Link | Archer C7 AC1750 | v5 | 18.06.2 . ?

It was added after OpenWrt 18.06 release and new devices aren't backported to older releases.

It will be in the next OpenWrt release, the 19.something that is going to happen in a few months.

OpenDDWRT

lol, OpenWrt and DDWrt are two different projects.

@ModMyRouter
Copy link

Thanks for the quick replies @aep @bobafetthotmail

I’m returning my TP-Link AC1750 A7 due to lack of support for open source firmware and no VPN client option with stock firmware. The replacement router will be an Asus AC3200. According to my research, Asus routers have Merlin firmware that allows for OpenVPN client options and most are compatible with stable OpenWRT and DDWRT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target/ar71xx pull request/issue for ar71xx target
Projects
None yet
Development

Successfully merging this pull request may close these issues.