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.

I am new here, but I am a Linux hacker and now have a bunch of Archer C2's that I need modified. I booted the C2 with a modified 2.6.36 kernel I created myself. Maybe this is not a big deal but I figured I would post my steps since this information does not seem to be readily available here.

For the kernel I unpacked GPL_ArcherC2v1.tar.gz and followed the README to build the kernel.

./Makefile.prep
make kernel_build

After that was successful, I modified the Linux code and config and built the kernel again. The interesting kernel file is "linux.7z".

Then I used teslamint's patch to patch openwrt/master. I am only interested in the "mktplinkfw2" tool at this point. After building this tool, I created a boot image with:

./mktplinkfw2 -B ArcherC2 -k /tmp/linux.7z -r /tmp/rootfs.squashfs \
     -E 0x8000c150 -L 0x80000000 -o /tmp/uImage

I retrieved the entry point (0x8000c150) by disassembling the Linux ELF image:

mipsel-linux-objdump -Dr /tmp/vmlinux | grep '<kernel_entry>'

To boot my new image (uImage), I aborted the boot sequence (pressing '4' over serial). Then used the following U-Boot commands (appropriate for my network):

setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.100
tftpboot 0x82000000 uImage
bootm 0x82000000

Note that I am booting directly from memory. There is no need to wear down the flash for testing.

Now I am ready to actually debug/port drivers and start getting OpenWRT flying on this thing. Many thanks to teslamint for posting the WIP patch. Since I am totally unfamiliar with the OpenWRT tools, that really saved me a lot of work.

I would love to see OpenWRT support for the Archer C2/C20i device.

If someones need a device let me know. I'm willing to sponsor it.....

What is working/not working ?

And is it possible to have full OpenWRT support for the device ?

No. Gbit switch and WiFi 5GHz in this router is unsupported.

Hi.

Don't know if it helps somehow but we can get root access via telnet (still trying via ssh).

Found this guide online: http://www.flupzor.nl/2015/04/30/root_on_ac750.html

Tested in latest EU firmware.

~ # cat /etc/passwd
admin:$1$$iC.dUsGpxNNJGeOm1dFio/:0:0:root:/:/bin/sh
dropbear:x:500:500:dropbear:/var/dropbear:/bin/sh
nobody:*:0:0:nobody:/:/bin/sh

~ # ls /etc/
vsftpd_passwd              init.d                     SingleSKU_5G_RU.dat
vsftpd.conf                group                      SingleSKU_5G_NZ.dat
ushare.conf                fstab                      SingleSKU_5G_MY.dat
services                   default_config.xml         SingleSKU_5G_KR.dat
samba                      TZ                         SingleSKU_5G_FCC.dat
resolv.conf                SingleSKU_RU.dat           SingleSKU_5G_CE.dat
reduced_data_model.xml     SingleSKU_NZ.dat           SingleSKU_5G_CA.dat
ppp                        SingleSKU_MY.dat           RT2860AP5G.dat
passwd.bak                 SingleSKU_KR.dat           RT2860AP.dat
passwd                     SingleSKU_FCC.dat          MT7620_AP_2T2R-4L_V15.BIN
iptables-stop              SingleSKU_CE.dat           MT7610E-V10-FEM-1ANT.bin
inittab                    SingleSKU_5G_VN.dat

/etc # netstat -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:20002         0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:1900            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:52589           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 :::22                   :::*                    LISTEN
tcp        0      0 :::23                   :::*                    LISTEN
udp        0      0 0.0.0.0:20002           0.0.0.0:*
udp        0      0 0.0.0.0:33079           0.0.0.0:*
udp        0      0 0.0.0.0:67              0.0.0.0:*
udp        0      0 0.0.0.0:1900            0.0.0.0:*
udp        0      0 0.0.0.0:1900            0.0.0.0:*
udp        0      0 127.0.0.1:33403         0.0.0.0:*
udp        0      0 127.0.0.1:50172         0.0.0.0:*
udp        0      0 :::546                  :::*
udp        0      0 :::546                  :::*
raw        0      0 0.0.0.0:2               0.0.0.0:*               2
raw        0      0 0.0.0.0:255             0.0.0.0:*               255
raw        0      0 0.0.0.0:255             0.0.0.0:*               255
raw        0      0 :::58                   :::*                    58
raw        0      0 :::58                   :::*                    58
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     STREAM     LISTENING        614 /var/tmp/.zserv

The root password should be 1234, but it's a no-go via ssh.

jogness wrote:

I am new here, but I am a Linux hacker and now have a bunch of Archer C2's that I need modified. I booted the C2 with a modified 2.6.36 kernel I created myself. Maybe this is not a big deal but I figured I would post my steps since this information does not seem to be readily available here.

For the kernel I unpacked GPL_ArcherC2v1.tar.gz and followed the README to build the kernel.

./Makefile.prep
make kernel_build

After that was successful, I modified the Linux code and config and built the kernel again. The interesting kernel file is "linux.7z".

Then I used teslamint's patch to patch openwrt/master. I am only interested in the "mktplinkfw2" tool at this point. After building this tool, I created a boot image with:

./mktplinkfw2 -B ArcherC2 -k /tmp/linux.7z -r /tmp/rootfs.squashfs \
     -E 0x8000c150 -L 0x80000000 -o /tmp/uImage

I retrieved the entry point (0x8000c150) by disassembling the Linux ELF image:

mipsel-linux-objdump -Dr /tmp/vmlinux | grep '<kernel_entry>'

To boot my new image (uImage), I aborted the boot sequence (pressing '4' over serial). Then used the following U-Boot commands (appropriate for my network):

setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.100
tftpboot 0x82000000 uImage
bootm 0x82000000

Note that I am booting directly from memory. There is no need to wear down the flash for testing.

Now I am ready to actually debug/port drivers and start getting OpenWRT flying on this thing. Many thanks to teslamint for posting the WIP patch. Since I am totally unfamiliar with the OpenWRT tools, that really saved me a lot of work.

Glad to help you and thanks for the hints. Now I can make the custom firmware based on the original firmware.

When using the boot method described by jogness, are you able to netboot the squashfs too or just the kernel? For me this only works for the kernel.
About ssh on stock firmware: The credentials are admin/admin, but is seems incorrectly configured so it's pretty much useless as a simple way in:

admin@192.168.0.1's password: <admin> <RETURN>
PTY allocation request failed on channel 0
shell request failed on channel 0

Update: Ok, so I can access the RTL8367RB with swconfig at this point, lets see about rgmii...
Update2: Switch is working, but the default vlans need some work
Update3: It's mostly usable now, Switch, LEDs, 2.4G WiFi and webupgrade are working:
https://bitbucket.org/dbeinder/openwrt- … 4899cdf3a2
I basically took the rtl8366_smi module, took out the I²C stuff and frakenstein'd the MDIO routines from the TP-Link GPL release in its place. It's quite ugly and a lot of duplicated code but I don't have the time to restructure the driver

(Last edited by yoq on 6 Aug 2016, 15:53)

Hi! can someone link me the good firmware for the Archer c2? i tried a few but they don't work.. sad

Is it working now or ?

Yep, it's mostly working - problem is, my build environment is an unholy mess and I don't have access to a C2 at the moment to test any changes. If you build the state from my bitbucket link, you'll get a working switch, LEDs, 2.4G WiFi. I changed a few things after that and also got the 5G Wifi working, but I only have binaries of the current state.
You can webupgrade directly, however:

  • i've been running this for a month now, but no guarantees - so only try this if you're prepared to TFTP-flash a recovery image

  • ports on the switch page: port0 is WAN, port1-4 are LAN, port6 is CPU, port5&7 don't exist but show up anyway

  • 5G WiFi is not managable by openwrt, (and never will be since it is a WEXT driver), to use it copy the folder from the zip to root and insmod the kernel module. WiFi configuration is done by editing the /etc/Wireless/iNIC/iNIC_ap.dat file or using iwpriv commands. After configuring one or more networks, rai0, rai1 ... raiN interfaces will show up - you can manage / bridge those like any other interface on the openwrt web ui

  • Both WiFi modules are using the wrong MAC addresses, they load it from the Ralink config rom not from the tplink partition. It works but these MACs are not really unique - this is only a problem if you use multiple devices next to each other. I have 4 Archer C2's, and two of them had the same ralink MAC, so I just hex-edited the flash  ¯\_(ツ)_/¯

The build includes USB and vfat support, LuCi, and kernel 4.4.7. 5G Wifi driver is ported from padavan project.

Source on Bitbucket
C2 firmware + 5G WiFi module

EDIT: newer build, kernel 4.4.14 by eddy551: forum.openwrt.org/viewtopic.php?pid=345670#p345670

(Last edited by yoq on 4 Dec 2016, 11:33)

yoq wrote:

Yep, it's mostly working - problem is, my build environment is an unholy mess and I don't have access to a C2 at the moment to test any changes. If you build the state from my bitbucket link, you'll get a working switch, LEDs, 2.4G WiFi. I changed a few things after that and also got the 5G Wifi working, but I only have binaries of the current state.
You can webupgrade directly, however:

  • i've been running this for a month now, but no guarantees - so only try this if you're prepared to TFTP-flash a recovery image

  • ports on the switch page: port0 is WAN, port1-4 are LAN, port6 is CPU, port5&7 don't exist but show up anyway

  • 5G WiFi is not managable by openwrt, (and never will be since it is a WEXT driver), to use it copy the folder from the zip to root and insmod the kernel module. WiFi configuration is done by editing the /etc/Wireless/iNIC/iNIC_ap.dat file or using iwpriv commands. After configuring one or more networks, rai0, rai1 ... raiN interfaces will show up - you can manage / bridge those like any other interface on the openwrt web ui

  • Both WiFi modules are using the wrong MAC addresses, they load it from the Ralink config rom not from the tplink partition. It works but these MACs are not really unique - this is only a problem if you use multiple devices next to each other. I have 4 Archer C2's, and two of them had the same ralink MAC, so I just hex-edited the flash  ¯\_(ツ)_/¯

The build includes USB and vfat support, LuCi, and kernel 4.4.7. 5G Wifi driver is ported from padavan project.

C2 firmware + 5G WiFi module


Hi, I have the Archer C2 AC750. I the firmware you linked, but when I went to install it via the routers web interface, I get an error that says 'The uploaded file does not match the device's current hardware version.'. Anyway to fix that? Thanks in advance.

Do you have the V1 version?
There seems to be a V2 and V3 around too: tp-link.com/en/download/Archer-C2_V3.html
If you do have a V1, what firmware is currently running?

Edit: The V3 seems to be an entirely different machine (ar71xx based) if a cursory look at the GPL source is any guide. It seems to based on openwrt though?!

(Last edited by yoq on 9 Oct 2016, 18:58)

yoq wrote:

Do you have the V1 version?
There seems to be a V2 and V3 around too:
If you do have a V1, what firmware is currently running?

Edit: The V3 seems to be an entirely different machine (ar71xx based) if a cursory look at the GPL source is any guide. It seems to based on openwrt though?!


Yes, I have the V1 version (EU). Right now it's running Archer C2(EU)_V1_160706 from this page TP-Link firmware downloads page on their website (can't link)

TP Link Website wrote:

The EU firmware was specialized for CE certification and can't be downgraded to other version.

Looks like your router is locked down sad


Well you can try to tftp-flash, maybe it'll still work:

Download the recovery version: beinder.at/pub/ArcherC2V1_tp_recovery.bin
EDIT: Do not rename ordinary firmware files and flash them this way, you will brick your router!
Change your Ethernet adapter to IP 192.168.0.66 static IP, subnet 255.255.255.0, gateway 192.168.0.1
Download Tftpd32 and start it
Select the directory that hold ArcherC2V1_tp_recovery.bin file.
Choose 192.168.0.66 for your "server interface" in the Tftp server tab

connect the ArcherC2 directly to your pc, hold the WPS button and start it. hold the button for at least 10 seconds
wait for the transfer to finish and wait for it to reboot

(Last edited by yoq on 23 Dec 2016, 22:05)

yoq wrote:
TP Link Website wrote:

The EU firmware was specialized for CE certification and can't be downgraded to other version.

Looks like your router is locked down sad


Well you can try to tftp-flash, maybe it'll still work:

Download the recovery version: beinder.at/pub/ArcherC2V1_tp_recovery.bin
Change your Ethernet adapter to IP 192.168.0.66 static IP, subnet 255.255.255.0, gateway 192.168.0.1
Download Tftpd32 and start it
Select the directory that hold ArcherC2V1_tp_recovery.bin file.
Choose 192.168.0.66 for your "server interface" in the Tftp server tab

connect the ArcherC2 directly to your pc, hold the WPS button and start it. hold the button for at least 10 seconds
wait for the transfer to finish and wait for it to reboot

Hi, sorry. Could you walk me through? I've connected my pc to the router with via ethernet, changed my ethernet adapter settings to 192.168.1.66, 255.255.255.0 with gateway 192.168.1.1. I start tfpd software
In Current Directory, I set it to where the recovery file is. Server inerface is 192.168.1.66. Then I hold the WPS button for 10 sec and wait. I've done that but I haven't seen any change in the ftpd software. Am I supposed to do anything in the 'Tfpt Client' tab? Thanks

(Last edited by uchihi6 on 10 Oct 2016, 20:53)

stay on the tftp server tab. make sure the ip is 192.168.0.66 though.
once the router starts loading the file you should see a progress bar tftpd32.jounin.net/images/working_tftpd32.jpg

(Last edited by yoq on 10 Oct 2016, 21:25)

yoq wrote:

stay on the tftp server tab. make sure the ip is 192.168.0.66 though.
once the router starts loading the file you should see a progress bar tftpd32.jounin.net/images/working_tftpd32.jpg

Hi, yeah it was a typo. My router is 192.168.0.1 and my ethernet adapter is 192.168.0.66/24, with the router as gateway. I don't see any progressbar. The screen just stays unchanged, after pressing the wps button.

turn the ArcherC2 off, then press and hold the wps button, turn the Archer on while holding the button and keep holding for at least 10s.

maybe im completely wrong here and it is the reset button?

if there is no reaction, you could try to capture network traffic with wireshark while doing this

(Last edited by yoq on 10 Oct 2016, 21:51)

yoq wrote:

turn the ArcherC2 off, then press and hold the wps button, turn the Archer on while holding the button and keep holding for at least 10s.

maybe im completely wrong here and it is the reset button?

if there is no reaction, you could try to capture network traffic with wireshark while doing this


Okay, I got the reaction. I can't access the routers web interface, though.

did you change the ip back to dynamic? LuCi is at 192.168.1.1
what do the leds look like during booting, and after?

(Last edited by yoq on 10 Oct 2016, 22:01)

yoq wrote:

did you change the ip back to dynamic? LuCi is at 192.168.1.1
what do the leds look like during booting, and after?


Worked now, thank you for the help

yoq wrote:

5G WiFi is not managable by openwrt, (and never will be since it is a WEXT driver)]

What is a WEXT driver?

see here here and here
basically the 5G wifi wont show up in LuCi - you will need to configure your 5G access point from the console

Has anyone tried this firmware with a C20i?

If the 5G wifi doesn't show up in LuCI and all I use is 5G then will anything in LuCI work?