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.

unsignedInt wrote:

My c2 image based on the c20i snapshot trunk (fork @ may 2015).
Wlan (2,4 Ghz) works out of the box, i added usb support and make own c2 router files (dts, etc...).
My init flash was with tftp... now i can update my machine via sysupgrade ...

I'm working currently on rtl8367rb (gmac support).

How did you manage to flash using TFTP? I tried many times with C20i image but was not able to do it.

Could you give me the image (or tell me how did yo udo it) you use to flash your C2?

Thanks

polioman wrote:

How did you manage to flash using TFTP? I tried many times with C20i image but was not able to do it.

Could you give me the image (or tell me how did yo udo it) you use to flash your C2?

Thanks

Archer C2's TFTP recovery procedure is same as Archer C7(see wiki), except file name of firmware is 'ArcherC2V1_tp_recovery.bin'.

EDIT: You also need to remove 512 byte tp-link header first, or it will be bricked.

(Last edited by teslamint on 11 Dec 2015, 10:52)

I'm now working on Netgear WNR3500L v2 with DD-WRT, I think I did that already but I'll give it a try.

Thanks for your answer.

polioman wrote:

I'm now working on Netgear WNR3500L v2 with DD-WRT, I think I did that already but I'll give it a try.

Thanks for your answer.

For now, you should use original firmware(including bootloader, named with '(boot)'), or your router will be bricked.

EDIT: you need remove first 512 bytes of TP-LINK firmware header from the stock firmware, or your router will not boot again.

(Last edited by teslamint on 11 Dec 2015, 11:15)

anyone actually had success with c20? I've been reading c2 is almost the same as c20i. But what about c20?

Hi,
I have also an Archer C2 AC750 router. I am also interested in developping openwrt for this device. I have a question: does it have a JTAG port?

According to this page, The GPL source code is available
https://wikidevi.com/wiki/TP-LINK_Archer_C2_v1.x

Here is the download link http://www.tp-link.us/resources/gpl/GPL … 2v1.tar.gz

I saw someone already made some progress with the c20i image and is now able to flash via web interface. And also the lzma header problem seems to be overcomed. We should get in contact with an openwrt developer to help us.

Kind regards

(Last edited by fratzicu on 26 Dec 2015, 15:27)

fratzicu wrote:

Hi,
I have a question: does it have a JTAG port?

There's TP1~4 and TP7 on the board, but I haven't try yet.

unsignedInt wrote:

My c2 image based on the c20i snapshot trunk (fork @ may 2015).
Wlan (2,4 Ghz) works out of the box, i added usb support and make own c2 router files (dts, etc...).
My init flash was with tftp... now i can update my machine via sysupgrade ...

I'm working currently on rtl8367rb (gmac support).

Any more progress on your image?

Hi,

Are there any board pictures available for Archer C2 AC750?

jmomo wrote:

For those who may be less technical and are looking for a straight answer: No, the TP-Linux Archer C2/AC750 is NOT supported by OpenWRT at this time, and may never be supported.

The current version of hardware on this device uses a MediaTek chipset, and MediaTek is very Linux/GPL hostile.

Some people have gotten the basic bootloader to work, but the built-in ethernet switch and 5Ghz 802.11 wireless is not working, which makes the device pretty useless. Since we (the community) don't have specifications on this hardware, we probably won't ever be able to get it to fully work.

This might change in the future, if people can get the LAN switch and 5Ghz wireless working, but for now, the answer is no.

You can ask nitroshift to help with supporting Archer C2 and Archer C20i because he did OpenWrt port for Witi Board which is also based on Mediatek chipset.

Apparently the LAN and 2.4GHz work in the latest release.
There is little hope the 5GHz radio will ever work because Mediatek is unfriendly.

Any news on the topic ? I have a v1.1 and the will to make it work.
I tried to flash the sysupgrade from the router's interface but it won't take it.

Any directions appreciated.

(Last edited by y_nk on 11 Feb 2016, 12:10)

So is there a way to upload C20i image to C2 via OEM web UI?
Or the only way is cutting 512 bytes from the image and use TFTP?

For those who wants to try build and improve the firmware by yourself, here's my WIP patch: https://gist.github.com/teslamint/6eebe10b99244410acb7

works:
- web upgrade

not works:
- gigabit switch

not tested:
- C20i firmware
- everything else

Please let us know if you have any progress.
Good luck!

teslamint wrote:

For those who wants to try build and improve the firmware by yourself, here's my WIP patch

I haven't device but at least one error I see:

+                ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";

You explicitly set external rgmii interfaces into gpio-mode. But external switch use it. And AFAIK mediatek SOCs need special timeout setting for rgmii, so extra parameters for rtl8367 switch are needed too (as example see dts-file Asus RT-N56U)

(Last edited by 123serge123 on 26 Feb 2016, 04:00)

123serge123 wrote:

You explicitly set external rgmii interfaces into gpio-mode. But external switch use it. And AFAIK mediatek SOCs need special timeout setting for rgmii, so extra parameters for rtl8367 switch are needed too (as example see dts-file Asus RT-N56U)

You are right. But I have no idea how to active it via mdio. Maybe add mdio-bus in device tree can do?

teslamint wrote:

But I have no idea how to active it via mdio. Maybe add mdio-bus in device tree can do?

rtl8366smi - module is all you need. It emulate Simple Managment Interface (SMI) over gpio-line (i2c pins). And rtl8367 driver use interface of rtl8366smi module to manage the switch. I think that without any modification if you load rtl8366smi and rtl8367 modules you can see and manage switch (swconfig must show new switch). But for full functionality (get network trafic) you need correct rgmii settings as I'd pointed above.

123serge123 wrote:

rtl8366smi - module is all you need. It emulate Simple Managment Interface (SMI) over gpio-line (i2c pins). And rtl8367 driver use interface of rtl8366smi module to manage the switch. I think that without any modification if you load rtl8366smi and rtl8367 modules you can see and manage switch (swconfig must show new switch).

I tried that, but it failed to detect chip. Did I do something wrong?

123serge123 wrote:

But for full functionality (get network trafic) you need correct rgmii settings as I'd pointed above.

In the GPL source, I can find this comment:

/* 
 * According to <RTL8367RB_Switch_ProgrammingGuide> 4.14 Force External Interface 
 * For RTL8367RB, MAC6 <---> RG1(Port1) and MAC7 <---> RG2(Port2)
 */

I think that is the hint we want to, but I still can't figure it out how to do...

teslamint wrote:

I tried that, but it failed to detect chip. Did I do something wrong?

Which openwrt version you use and show logs pls.

123serge123 wrote:
teslamint wrote:

I tried that, but it failed to detect chip. Did I do something wrong?

Which openwrt version you use and show logs pls.

trunk r48754. here you go:

U-Boot 1.1.3 (Jun 23 2014 - 15:15:14)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb0000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
******************************
Software System Reset Occurred
******************************
------------------
 Archer C2 v1.0.0
------------------
spi_wait_nsec: 29
spi device id: ef 40 17 0 0 (40170000)
find flash: W25Q64BV
============================================
Ralink UBoot Version: 4.1.2.0
--------------------------------------------
ASIC 7620_MP (Port5<->GigaSW)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Jun 23 2014  Time:15:15:14
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =64 Mbytes

continue to starting system.
 0
disableEthForward(1158):disable switch forward...

3: System Boot system code via Flash.(0xbc020000)
do_bootm:argc=2, addr=0xbc020000
## Booting image at bc020000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 4.3.4 (teslamint@tesl9-mbp.local) (gcc version 5.2.0 (OpenWrt GCC 5.2.0 r6516) ) #4 Fri Feb 26 14:13:21 UTC 2016
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is TP-Link Archer C2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00026c74
[    0.000000] Readback ErrCtl register=00026c74
[    0.000000] Memory: 61432K/65536K available (2631K kernel code, 118K rwdata, 368K rodata, 136K init, 189K bss, 4104K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007568] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.070066] pid_max: default: 32768 minimum: 301
[    0.074688] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081063] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.094238] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.103829] pinctrl core: initialized pinctrl subsystem
[    0.109543] NET: Registered protocol family 16
[    0.377964] PCI host bridge /pcie@10140000 ranges:
[    0.382561]  MEM 0x0000000020000000..0x000000002fffffff
[    0.387631]   IO 0x0000000010160000..0x000000001016ffff
[    0.400242] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.405632] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.411869] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.417234] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.423429] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.428708] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.435390] PCI host bridge to bus 0000:00
[    0.439316] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.446027] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.451732] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.458334] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.467686] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.474094] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.480815] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.487418] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.494006] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.500612] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.507186] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.512016] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.518608] pci 0000:00:00.0: card - bus=0x0, slot = 0x0 irq=0
[    0.524276] pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    0.529929] pci 0000:01:00.1: card - bus=0x1, slot = 0x0 irq=4
[    0.536461] clocksource: Switched to clocksource systick
[    0.542852] NET: Registered protocol family 2
[    0.548005] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.554731] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.560952] TCP: Hash tables configured (established 1024 bind 1024)
[    0.567179] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.572803] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.579166] NET: Registered protocol family 1
[    0.583846] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.590539] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.615518] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.621183] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.633221] io scheduler noop registered
[    0.637024] io scheduler deadline registered (default)
[    0.642191] ralink-usb-phy usbphy: invalid resource
[    0.647569] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.654938] console [ttyS0] disabled
[    0.658441] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.668051] console [ttyS0] enabled
[    0.668051] console [ttyS0] enabled
[    0.675093] bootconsole [early0] disabled
[    0.675093] bootconsole [early0] disabled
[    0.687853] spi spi0.0: force spi mode3
[    0.692123] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[    0.697109] 6 ofpart partitions found on MTD device spi0.0
[    0.702701] Creating 6 MTD partitions on "spi0.0":
[    0.707612] 0x000000000000-0x000000020000 : "u-boot"
[    0.714460] 0x000000020000-0x0000007c0000 : "firmware"
[    0.783412] 2 tplink-fw partitions found on MTD device firmware
[    0.789493] 0x000000020000-0x000000160000 : "kernel"
[    0.796167] 0x000000160000-0x0000007c0000 : "rootfs"
[    0.803087] mtd: device 3 (rootfs) set to be root filesystem
[    0.809075] 1 squashfs-split partitions found on MTD device rootfs
[    0.815390] 0x000000430000-0x0000007c0000 : "rootfs_data"
[    0.822783] 0x0000007c0000-0x0000007d0000 : "config"
[    0.829762] 0x0000007d0000-0x0000007e0000 : "rom"
[    0.836325] 0x0000007e0000-0x0000007f0000 : "romfile"
[    0.843341] 0x0000007f0000-0x000000800000 : "radio"
[    0.850981] rtl8367b rtl8367b: using GPIO pins 1 (SDA) and 2 (SCK)
[    0.857474] rtl8367b rtl8367b: ACK timeout
[    0.861768] rtl8367b rtl8367b: ACK timeout
[    0.865968] rtl8367b rtl8367b: unable to read chip number register
[    0.872286] rtl8367b rtl8367b: chip detection failed, err=-145
[    0.878274] rtl8367b: probe of rtl8367b failed with error -145
[    0.886669] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): failed to initialize switch core
[    0.895655] mtk_soc_eth 10100000.ethernet: error bringing up device
[    0.902665] rt2880_wdt 10000120.watchdog: Initialized
[    0.908431] NET: Registered protocol family 17
[    0.913061] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.925963] 8021q: 802.1Q VLAN Support v1.8
[    0.945574] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.953592] Freeing unused kernel memory: 136K (8030e000 - 80330000)
[    3.325826] init: Console is alive
[    3.329673] init: - watchdog -
[    5.073242] init: - preinit -
Failed to connect to the switch. Use the "list" command to see which switches are available.
swconfig list
swconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>|load <config>|show)
Failed to connect to the switch. Use the "list" command to see which switches are available.
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.035657] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    7.054757] procd: - early -
[    7.057810] procd: - watchdog -
[    7.567913] procd: - ubus -
[    7.877210] random: ubusd urandom read with 18 bits of entropy available
[    7.961429] procd: - init -
Please press Enter to activate this console.
[   10.458630] tun: Universal TUN/TAP device driver, 1.6
[   10.463870] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   10.485689] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
[   10.493312] Backport generated by backports.git backports-20151218-0-g2f58d9d
[   10.686613] u32 classifier
[   10.689387]     input device check on
[   10.693183]     Actions configured
[   10.699018] Mirror/redirect action on
[   10.709316] nf_conntrack version 0.5.0 (962 buckets, 3848 max)
[   10.753043] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.840565] xt_coova: ready
[   10.893823] xt_time: kernel timezone is -0000
[   10.937376] PPP generic driver version 2.4.2
[   10.944826] NET: Registered protocol family 24
[   10.985650] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0500 detected
[   10.993643] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[   25.093422] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   25.117766] jffs2_build_filesystem(): unlocking the mtd device... done.
[   25.124580] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   48.327268] jffs2: notice: (1756) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   59.574967] random: nonblocking pool is initialized



BusyBox v1.24.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 DESIGNATED DRIVER (Bleeding Edge, r48754)
 -----------------------------------------------------
  * 2 oz. Orange Juice         Combine all juices in a
  * 2 oz. Pineapple Juice      tall glass filled with
  * 2 oz. Grapefruit Juice     ice, stir well.
  * 2 oz. Cranberry Juice
 -----------------------------------------------------
root@OpenWrt:/#

Sorry, it seems that your board use MDIO interface for switch control. Current driver can work over SMI (gpio-based) only. You can overwrite rtl8367 driver to use mdio or emulate rtl8366smi interface with new driver. Full source you can see in Padavan project (it support rtl8367/rtl8370 with smi and mdio management).

123serge123 wrote:

Sorry, it seems that your board use MDIO interface for switch control. Current driver can work over SMI (gpio-based) only. You can overwrite rtl8367 driver to use mdio or emulate rtl8366smi interface with new driver. Full source you can see in Padavan project (it support rtl8367/rtl8370 with smi and mdio management).

I'll look into it. Thanks!

HI, is there progress with that ? Thanks!!!

threiner wrote:

HI, is there progress with that ? Thanks!!!

No news for now.

Can I expect to see full OpenWRT support on the Archer C2 ?
Or is it a dead end ?