OpenWrt Forum Archive

Topic: TP-Link Archer C2 AC750 support

The content of this topic has been archived between 30 Mar 2018 and 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

plwm wrote:

If anyone is interested - I've compiled an image with all kernel modules and latest security fixes from upstream - including those for Krack attack.

github.com/plwm/openwrt-archer-c2/releases

I'd like to build an Archer C20 V4 target from this project.

Could you upload / send your .config to me?

Thanks!

Please can you give me a hint on how I can take either plwm's or zaccareal's repo and try to update the corresponding userland to the current development code?
I presume only wireless drivers and some device configs are special to this device and quite a lot of shared stuff can be upgraded.
Also I am not sure if this tree can now be merged somehow as I guess this is based off of now archived legacy openwrt sources and now when openwrt and lede are joining forces we will have to targed the lede code base.

pvagner wrote:

Please can you give me a hint on how I can take either plwm's or zaccareal's repo and try to update the corresponding userland to the current development code?
I presume only wireless drivers and some device configs are special to this device and quite a lot of shared stuff can be upgraded.
Also I am not sure if this tree can now be merged somehow as I guess this is based off of now archived legacy openwrt sources and now when openwrt and lede are joining forces we will have to targed the lede code base.

I'm trying to get openvpn and shadowsock-libev and their respective Luci apps to install and work. After trying several routes, I've failed. I'm using the latest bin offered here.

I'm pretty sure I need to compile a bin that already includes these. I'm hoping there is a way to do this (I'm in way over my head). Can we use plwm's source to do this?

define Device/ArcherC2
  DTS := ArcherC2
  KERNEL := $(KERNEL_DTB)
  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC2 -c
  IMAGE/sysupgrade.bin := pad-extra 131072 | append-kernel | tplink-header Arch$
  DEVICE_TITLE := TP-Link ArcherC2
endef
TARGET_DEVICES += ArcherC2

mktplinkfw2

                .id             = "ArcherC2",
                .hw_id          = 0xc7500001,
                .hw_rev         = 0x00000032,
                .hw_ver_add     = 0x00000001,
                .layout_id      = "8Mmtk",
                .hdr_ver        = 3,
                .endian_swap    = true,

now  image  booting  via  web. but  i  have   kernel panic

(Last edited by leks_kt on 5 Feb 2018, 16:06)

Cant flash back the stock Firmware.
Does anybody can share the dump of the Flash?

I erased my flash and now get the errors like this

spiflash_ioctl_read, Read from 0x007f8000 length 0x200, ret 0, retlen 0x200
eeFlashId = 0xffff!

eeprom is wrong!!

I need to run the stock firmware.

(Last edited by SaxMan on 8 Feb 2018, 17:34)

hello , take  my  dump  drive.google.com/open?id=1eyWxa4Mw2WCClBqvzAbazOkt-hEsQ1OH

bumblingWombat wrote:

Hi everyone.

Can someone confirm if this is possible with the C2 AC750 and OpenWRT (from #p367511[1]):
<snip>
But is the "private" network also do-able? I assume it's just DHCP and NAT netfilter rules, but am I correct?

Thanks!

[1] forum.openwrt.org/viewtopic.php?pid=367511#p367511
[2] wiki.openwrt.org/doc/recipes/ap_sta

I actually bought the AC750 C20 V4 and after manually compiling in the MediaTek 7610 from this project into the LEDE project [3], I got everything to work... with standard OpenWRT configuration via LuCI, I have a "lan" network that binds my ethernet ports and the 5 GHz wwan into a private network, out of the box!

Nice!

[3] forum.lede-project.org/t/tp-link-archer-c20-v4-build/8945/29

Hello!

I'm trying to flash the recovery bin on my C2 but I can't get the transfer to finish. TFTPD32 starts the flashing process and, before it reaches 100.000 bytes transferred (1%), it stops. The transfer speed starts to go down and nothing else happens.

I tried to turn the ethernet link speed down to 10mbps, but it didn't help. Right now, my C2 is running this firmware "Archer C2(US)_v1_160128". It rejects any firmware trough the stock web sys upgrade. That's why I'm trying to flash it using TFTP.

Can anyone help me?

Thanks!

Hi!

Can anyone help me with my problem described above? I know it's not cool what I'm doing right now, but I feel like I lost money on this router. It was working fine!

Thanks!

EDIT:

imugur wrote:
dob71 wrote:

For those who struggle with the TFTP download...
I've tried using 2 directly connected laptops and transfer through a hub, configured fixed speed&duplex settings on the laptop's Ethernet port, tried tftpd-hpa, tftpd32 and the simple command line server included with the xmas release (thanks @yoq). The same failures were seen when using the recovery procedure and manually running the bootloader's tftpboot command. Nothing has helped so far with the dreaded "Same block again; ignore it" errors, timeouts and eventual failure.

I have increased the timeout and used anticipation window of 1000 Bytes and worked for me after a lot of attempts.

Thank you! The anticipation window setting solved the problem. On the first try, I was able to successfully flash OpwnWRT.

smile

EDIT 2:

One thing I noticed is that it doesn't show stats for the 5Ghz wireless. I do have a couple of devices connected.

(Last edited by FMAranda on 3 Mar 2018, 15:56)

plwm wrote:

If anyone is interested - I've compiled an image with all kernel modules and latest security fixes from upstream - including those for Krack attack.

github.com/plwm/openwrt-archer-c2/releases

Newbie here... How do I install this coming from stock EU firmware? Upgrading directly with the bin? (Seems too simple).

What's the difference between plwm's and zaccareal's repo?

Thanks in advance!

(Last edited by Alejandro3 on 4 Mar 2018, 12:48)

Alejandro3 wrote:
plwm wrote:

If anyone is interested - I've compiled an image with all kernel modules and latest security fixes from upstream - including those for Krack attack.

github.com/plwm/openwrt-archer-c2/releases

Newbie here... How do I install this coming from stock EU firmware? Upgrading directly with the bin? (Seems too simple).

What's the difference between plwm's and zaccareal's repo?

Thanks in advance!

No, you can't update directly from stock to OpenWRT using TP-Link's sys upgrade. Download the zip from the post #124 (which I quoted below) and follow the steps to flash it using TFTPd recovery method. After that, when you got OpenWRT running on your C2, you can update directly to the latest version. No need to update it using recovery method anymore.

One important thing. I had a lot of troubles trying to flash with this method and it was only possible when I enabled the "Use anticipation window of" option with 1000 bytes. This process can take up to 20-25 minutes.

I think plwm's release is the latest one.

yoq wrote:

xmas release OpenWrt r50020 + 5G driver wink
- will now read the correct mac address from rom, for both 2.4G and 5G wifi

and here is a new openwrt recovery image, back-to-stock recovery image, and a simple tftp server for linux:
beinder.at/pub/c2_recovery.zip

TFTP flashing:
- turn the C2 off
- connect a ethernet cable from any port to your machine
- set your machines' IP to static 192.168.0.66/255.255.255.0
- set up your TFTP server (windows: tftpd32, linux: simple server in folder)
- hold the WPS/Reset button
- turn the C2 on
- keep holding the WPS/Reset button until the WPS light comes on (takes ~10sec)
- the C2 will now attempt to pull the file ArcherC2V1_tp_recovery.bin from your TFTP server
- flashing takes about 1 minute and reboot afterwards
- set your machines' IP back to dynamic
- WebUI for stock firmware is at 192.168.0.1, OpenWrt is at 192.168.1.1

(Last edited by FMAranda on 4 Mar 2018, 15:54)

FMAranda wrote:

No, you can't update directly from stock to OpenWRT using TP-Link's sys upgrade. Download the zip from the post #124 (which I quoted below) and follow the steps to flash it using TFTPd recovery method. After that, when you got OpenWRT running on your C2, you can update directly to the latest version. No need to update it using recovery method anymore.

One important thing. I had a lot of troubles trying to flash with this method and it was only possible when I enabled the "Use anticipation window of" option with 1000 bytes. This process can take up to 20-25 minutes.

I think plwm's release is the latest one.

Thank you so much! I'll try it as soon as I can big_smile 5Ghz working correctly?

Alejandro3 wrote:
FMAranda wrote:

No, you can't update directly from stock to OpenWRT using TP-Link's sys upgrade. Download the zip from the post #124 (which I quoted below) and follow the steps to flash it using TFTPd recovery method. After that, when you got OpenWRT running on your C2, you can update directly to the latest version. No need to update it using recovery method anymore.

One important thing. I had a lot of troubles trying to flash with this method and it was only possible when I enabled the "Use anticipation window of" option with 1000 bytes. This process can take up to 20-25 minutes.

I think plwm's release is the latest one.

Thank you so much! I'll try it as soon as I can big_smile 5Ghz working correctly?

Yes, 5GHz is working fine smile

Guys,

I've edited the wiki page. What you think? openwrt.org/toh/tp-link/ac750

Included the support status, installation, upgrade and forum threads section.

(Last edited by FMAranda on 4 Mar 2018, 17:15)

Help please configure USB MODEM LTE ZTE 833T

Just a silly little question, as I'm not familiar with the development process.

When I ssh in my ac750 it says DESIGNATED Driver (Bleeding Edge, 50147).

Where does that 50147 come from? I looked at the source code plwm provided and cannot find any reference to it. It looks like a subversion repository revision number, but I thought development was done on git?

50147 is kind of build version. I think it increases with every change deveolopers make. But with this high number it's actually long story. The 50147 comes from old openwrt time. Openwrt nearly died, but lede continued as lede reboot, maybe from zero, but recently lede merged back into openwrt again and numbering stayed from lede reboot. So if you sysupgrade to openwrt snapshot (trunk), you will see number like 6 thousands, which is less, but more recent. The most notable difference is that there's no longer recipe for a drink ;-)

(Last edited by nozombian on 9 Mar 2018, 11:31)

Hey folks.

Firstly thanks for great job done here.

I got a problem doctor.

My Archer C2 AC750 Ver 1.0 seems to be bricked.

Actually i tried to flash it via the TFPD method with the wps/reset action

Unfortunately i did rename the .bin . My bad.

During the flash procedure tcpdump was not tellng me anything so i interrupted the flash procedure.

At the moment the Router seems to be bricked as it's impossible to link with it in TCP/IP protocol

Aslo the Reset procedures aboves do not seem to work anymore.

WPS/RESET ten seconds hack
30-30-30 hack

Is there any procedure to recover any stock_rom ?

Than you in advance and excuse my english

(Last edited by spin0 on 10 Mar 2018, 14:50)

I tried to compile new one, it sotta works,  but luci wifi menu is broken sad maybe luci is too
fixed: see under
few tips for compileing using zaccaria @ git.

  • 1. use 32bit version of everything
    2. you will need to install libssl1.0-dev
    3. so just spin up a vm

I'll try recompile with lede17.1 luci
Edit: it works. now where should i upload it for public can use?
Edit 2: done. github.com/orangepizza/openwrt-archer-c2/releases/download/c2-v1/precompiled.zip
I'm new to github but file upload is file upload.

I forget add vim but I'm sure who use console can opkg update && opkg install vim

(Last edited by abnoeh on 11 Mar 2018, 05:43)

spin0 wrote:

Hey folks.

Firstly thanks for great job done here.

WPS/RESET ten seconds hack
30-30-30 hack

Is there any procedure to recover any stock_rom ?

Than you in advance and excuse my english

it lost its bootloader.. I don't think there is a way to recover it unless use spi clip to flash the chip directly.

abnoeh wrote:
spin0 wrote:

Hey folks.

Firstly thanks for great job done here.

WPS/RESET ten seconds hack
30-30-30 hack

Is there any procedure to recover any stock_rom ?

Than you in advance and excuse my english

it lost its bootloader.. I don't think there is a way to recover it unless use spi clip to flash the chip directly.

Thank you . I'll try it and post a feedback here in case of succes.

abnoeh wrote:

I tried to compile new one,

I'll try recompile with lede17.1 luci
Edit: it works. now where should i upload it for public can use?
Edit 2: done. github.com/orangepizza/openwrt-archer-c2/releases/download/c2-v1/precompiled.zip
I'm new to github but file upload is file upload.

Hi abnoeh,

Great work! I feel we need to work on complete the port to the last version and then send a PR for merging it to the official repo.

However, I have these suggestions until the official port is complete:

- Generate the INITRAMFS too, and not only the SQUASHFS image. Doing this during the developemnt is possible to test and check the firmware that you have compiled without flashing it (even with the stock firmware in the device, so it's completly safe). The INITRAMFS can be booted using the serial console and the TFTP server. In order to generate this other image: When execute the "make menuconfig" then select "TARGET IMAGES" ---> and enable RAMDISK. Leave enabled "SQUASHFS" too.
- Share you user ".config" file in the release section (as this file is not added to the repo). With this will be more easy to recompile and help you.

I hope you agree!

In the other hand: I suggest to all people that checks any of these releases to write here the bugs they found. With this info will be more easy to solve troubles and create the PR required to add official support. When we have done the step of merge with the official repo, then we will receive increased support. Until this goal our efforts can be useless.

Regards!

kexecuser wrote:

Hi abnoeh,
snip

I did both. please check again. but I didn't make this build system, @zaccareal did. And I have no real idea how it works...
but it needs some flushing
1. it doesn't want to builded on 64bit. need 32bit version of everything
2. you will need to install libssl1.0-dev or udev bootloader won't compile
3. this uses binery blob for 5gb wifi driver and I doubt it'll be allowed on main repo.
and luci-mtk-wifi doesn't like trunk version of luci, it makes erroe when I open wireless page, but I don't know lua to fix it.

TL:DR ; I'm just a noob with a builder.

(Last edited by abnoeh on 12 Mar 2018, 14:34)

abnoeh wrote:

I tried to compile new one, it sotta works,  but luci wifi menu is broken sad maybe luci is too
fixed: see under
few tips for compileing using zaccaria @ git.

  • 1. use 32bit version of everything
    2. you will need to install libssl1.0-dev
    3. so just spin up a vm

I'll try recompile with lede17.1 luci
Edit: it works. now where should i upload it for public can use?
Edit 2: done. github.com/orangepizza/openwrt-archer-c2/releases/download/c2-v1/precompiled.zip
I'm new to github but file upload is file upload.

I forget add vim but I'm sure who use console can opkg update && opkg install vim

Thank you! So far, no problems smile

Edit: I'll update the wiki with your build

(Last edited by FMAranda on 14 Mar 2018, 03:08)

abnoeh wrote:
kexecuser wrote:

Hi abnoeh,
snip

I did both. please check again. but I didn't make this build system, @zaccareal did. And I have no real idea how it works...

Hi abnoeh,

Good work! I booted it and it runs. Congratulations! ;-)

I post here some comments:

- How to boot the INITRAMFS firmware?
  1) Boot your device using the SERIAL connection, and stop the U-boot with key '4'.
  2) Copy the firmware-initramfs to one TFTP server running in address 192.168.0.100.
  3) Type in the U-boot console: "tftpboot 0x82000000 openwrt-ramips-mt7620-ArcherC2-initramfs-kernel.bin"
  4) After END the TFTP download, type "boot.m 0x82000000"
  VoilĂ ! Your OpenWRT will boot in your device WITHOUT CHANGING ANYTHING IN THE FLASH.

- After booting OpenWRT I recommend to do a backup of your STOCK firmware:
  1) Connect using SSH to your device (change the IP using the SERIAL connection if you need it).
  2) Execute:
      # mkdir /tmp/backup
      # cat /proc/mtd > /tmp/backup/mtd.txt
      # dd if=/dev/mtd0ro of=/tmp/backup/mtd0ro.u-boot
      # dd if=/dev/mtd1ro of=/tmp/backup/mtd1ro.firmware
      # dd if=/dev/mtd2ro of=/tmp/backup/mtd2ro.kernel
      # dd if=/dev/mtd3ro of=/tmp/backup/mtd3ro.rootfs
      # dd if=/dev/mtd4ro of=/tmp/backup/mtd4ro.rootfs_data
      # dd if=/dev/mtd5ro of=/tmp/backup/mtd5ro.config
      # dd if=/dev/mtd6ro of=/tmp/backup/mtd6ro.rom
      # dd if=/dev/mtd7ro of=/tmp/backup/mtd7ro.romfile
      # dd if=/dev/mtd8ro of=/tmp/backup/mtd8ro.radio
  3) Using the SCP command copy these files to your computer and save them in a safe location.

- More or less, all seems to work with this firmware... except:
  1) The 5GHz radio seems to have troubles.
  2) In the booting process I see some problems. DMESG shows:
     [    0.000000] Linux version 4.4.14 (debi@debian) (gcc version 5.3.0 (OpenWrt GCC 5.3.0 12009) ) #12 Mon Mar 12 13:46:22 UTC 2018
     ...
     [    0.119436] rt2880-pinmux pinctrl: failed to lookup the sleep state
     ...
     [    0.687485] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
     [    0.694063] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
     ...
     [    0.702312] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
     ...
     [    5.860580] ralink-usb-phy usbphy: invalid resource
     ...
     [    5.910861] m25p80 spi0.0: found s25fl064k, expected mx25l6405d
     ...
     [   10.096763] MT7610 AP Driver version: 3.0.0.9
     [   10.108069] Loading modules backported from Linux version wt-2016-05-12-0-g7a54796
     [   10.115870] Backport generated by backports.git backports-20160216-0-ge3c56e4
     ...
     [   10.307499] wireguard: Unknown symbol udp_sock_create4 (err 0)
     [   10.313568] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
     [   10.320145] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
     [   10.326811] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
     [   10.333266] wireguard: Unknown symbol udp_sock_create6 (err 0)
     [   10.339342] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
     ...
     [   10.463604] wireguard: Unknown symbol udp_sock_create4 (err 0)
     [   10.469665] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
     [   10.476301] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
     [   10.482976] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
     [   10.489473] wireguard: Unknown symbol udp_sock_create6 (err 0)
     [   10.495604] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
     [   10.525205] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0500 detected
     [   10.533199] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
     [   10.540960] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
     [   10.570918] wireguard: Unknown symbol udp_sock_create4 (err 0)
     [   10.577057] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
     [   10.583693] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
     [   10.590375] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
     [   10.596878] wireguard: Unknown symbol udp_sock_create6 (err 0)
     [   10.603000] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
     [   10.644294] wireguard: Unknown symbol udp_sock_create4 (err 0)
     [   10.650363] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
     [   10.657010] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
     [   10.663708] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
     [   10.670185] wireguard: Unknown symbol udp_sock_create6 (err 0)
     [   10.676326] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
     ...
   Two main things worry me:
     A) The mismatch of the SPI FLASH! My is "mx25l6405d" instead of "s25fl064k" described in the Wiki.
        I hope this doesn't creates troubles when flashing, but I'm not sure. My device is "v1-EU". Please, update the Wiki.
     B) The errors with the 5GHz MT7610 radio driver.
        I feel the driver needs to be improved or updated for solve the problems. Any idea?

- Changes proposed in the ".config" for improving the development (in the sense of helping to fix the firmware):
   # CONFIG_PACKAGE_kmod-block2mtd:  enable for mounting flash partitions (see wiki.openwrt.org/doc/techref/block_mount)
   # CONFIG_PACKAGE_kmod-fs-squashfs: enable for accessing to the squash partition in the flash
   # CONFIG_PACKAGE_kmod-mtd-rw: enable for write access of the flash using MTD tools (useful for writing the firmware section in MTD1 [mtd2+mtd3] without touching the rest)
   # CONFIG_PACKAGE_kmod-mtdtests: enable for testing/checking the flash structure
   # CONFIG_RT_CFG80211: I'm not sure, but this is not required to be enabled for controlling the radio using standard tools?

I hope soon you can generate a PR for merge with the mainstream.
Regards.

Hi guys,

How did you managed to make the 5Ghz working correctly?  I'm not able to connect any device to it.Mine is showing, for example,  "Channel: 52 (? GHz)" .Have i missed some settings?

PS. Thank you guys for the hard work smile