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.

Amazing speeds on 5ghz band but the 2.4ghz one seems quite laggy... I've tried SQM, resetting Openwrt, etc. I don't really know how to fix it sad

kexecuser wrote:
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:
    <Omitted>

   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.

I already flashed it and it works. (I don't have serial cable for it or spi clip so I'm playing russian roulette tongue) and they works on my C2 (V1,KR version).
and I can't fix 5G wifi driver because this uses binary driver so we can't touch it. (well not they I know C well enought to patch a driver even if it's a open source driver)

P.S I port @zaccaria 's commits to newest lede 17.01 build repo(not trunk) with git cherry-picking.
github.com/orangepizza/openwrt-archer-c2-lede17.01 (use lede 17.01 branch)
<back up your setting before flashing this>
builded image: github.com/orangepizza/openwrt-archer-c2-lede17.01/releases/tag/archer-c2
+ it has newer kernel 4.4.14 -> 4.4.120
+ it now can be compiled on a 64bit linux
- somewhy it won't keep your setting on flash, but importing backuped setting will work.
I already finished to compile a image and flashed it on my C2, and it boots and I'm using it right now
about: flash mismatch.. I think it doesn't matter. mine has same warning but it works normally.
actually I should've patched it on lede 17.01.4 release so okpg won't throw error about kernel depandency when I install something.

(Last edited by abnoeh on 18 Mar 2018, 13:31)

abnoeh wrote:

I already flashed it and it works. (I don't have serial cable for it or spi clip so I'm playing russian roulette tongue) and they works on my C2 (V1,KR version).
and I can't fix 5G wifi driver because this uses binary driver so we can't touch it. (well not they I know C well enought to patch a driver even if it's a open source driver)

P.S I port @zaccaria 's commits to newest lede 17.01 build repo(not trunk) with git cherry-picking.
github.com/orangepizza/openwrt-archer-c2-lede17.01 (use lede 17.01 branch)
<back up your setting before flashing this>
builded image: github.com/orangepizza/openwrt-archer-c2-lede17.01/releases/tag/archer-c2
+ it has newer kernel 4.4.14 -> 4.4.120
+ it now can be compiled on a 64bit linux
- somewhy it won't keep your setting on flash, but importing backuped setting will work.
I already finished to compile a image and flashed it on my C2, and it boots and I'm using it right now
about: flash mismatch.. I think it doesn't matter. mine has same warning but it works normally.
actually I should've patched it on lede 17.01.4 release so okpg won't throw error about kernel depandency when I install something.

Hi abnoeh,

I prefer to use the INITRAMFS instead of FLASHING... almost until an stable relase exists (and yes! I have a serial cable and opened the case of C2). So, please request to @zaccaria to generate also the INITRAMFS version.

Regarding the flash mismatch I suggest to update the code. I feel the official merge will requires that this be fixed. My suggestion is to support both types already indentified.

Please, remember to add my suggestions about the ".config". Without it will be more difficult to help you for testing. The main idea is: if we boot using the initramfs version, then we can flash anything in the MTD; even recover to the stock version. So, we really need one version with full MTD write support and INITRAMFS enabled.

And finally, about the 5GHz driver. At ime it only exists a binary version?

Regards.

I forked myself and add .config

github.com/orangepizza/openwrt-archer-c2-lede17.01
it's now based on latest lede 17.01 snapshot, it has .config that builds INITRAMFS image too, and newer kernel.

about driver for 5ghz...It wasn't binary (just assumed it because it wiki said there is no driver for openwrt) but It isn't
but .......

by the way, 5ghz wifi works fine for me

 ***************************************************************************
 * Ralink Tech Inc.
 * 4F, No. 2 Technology 5th Rd.
 * Science-based Industrial Park
 * Hsin-chu, Taiwan, R.O.C.
 *
 * (c) Copyright 2002-2004, Ralink Technology, Inc.
 *
 * All rights reserved. Ralink's source code is an unpublished work and the
 * use of a copyright notice does not imply otherwise. This source code
 * contains confidential trade secret material of Ralink Tech. Any attemp
 * or participation in deciphering, decoding, reverse engineering or in any
 * way altering the source code is stricitly prohibited, unless the prior
 * written consent of Ralink Technology, Inc. is obtained.
 ***************************************************************************

and about m25p80 flash mismatch : do you know what controls it?

(Last edited by abnoeh on 19 Mar 2018, 23:45)

Just following up on a few other peoples posts about the 5Ghz can anyone give us a clue on how to get it working.

Using /zaccareal/openwrt-archer-c2/releases latest image, it shows the 5ghz config options and I've set what I assume would be all the relevant settings.

I have read through all the old posts but there wasn't anything obvious that I had missed, as it looks like these later images should have everything in to just enable the 5Ghz to work from inside the gui config pages.

The main obvious thing in the logs is 'DHCP packet received on rai0 which has no address' but it is bridged by default to the lan which is assigning DHCP fine, the network interface on my PC isn't showing any return packets either just sent one.

Regards
Dave

P.S. Great work on getting this image up and running looks good so far.

webstaff wrote:

Just following up on a few other peoples posts about the 5Ghz can anyone give us a clue on how to get it working.

Using /zaccareal/openwrt-archer-c2/releases latest image, it shows the 5ghz config options and I've set what I assume would be all the relevant settings.

I have read through all the old posts but there wasn't anything obvious that I had missed, as it looks like these later images should have everything in to just enable the 5Ghz to work from inside the gui config pages.

The main obvious thing in the logs is 'DHCP packet received on rai0 which has no address' but it is bridged by default to the lan which is assigning DHCP fine, the network interface on my PC isn't showing any return packets either just sent one.

Regards
Dave

P.S. Great work on getting this image up and running looks good so far.

releases on /zaccareal/openwrt-archer-c2 is 2 years old. (and commit itself is about 6 month old)

use plwm's (plwm/openwrt-archer-c2)(6 month ago)

or mine (orangepizza/openwrt-archer-c2-lede17.01) (reforked upstream last week and commited zaccareal's patch (only on lede-17.01 branch, master left unchanged.))

(Last edited by abnoeh on 19 Mar 2018, 23:47)

abnoeh wrote:

I forked myself and add .config

github.com/orangepizza/openwrt-archer-c2-lede17.01
it's now based on latest lede 17.01 snapshot, it has .config that builds INITRAMFS image too, and newer kernel.

Thank you! I'll chek it.
However, please add to the config the options for R/W MTD devices. Without it, I can't manually write to the flash for check the boot and restore the stock firmware after. See my previous message for the options.

abnoeh wrote:

about driver for 5ghz...It wasn't binary (just assumed it because it wiki said there is no driver for openwrt) but It isn't
but .......

by the way, 5ghz wifi works fine for me

I'll check too...

abnoeh wrote:

and about m25p80 flash mismatch : do you know what controls it?

No. But, I'll search for it.

kexecuser wrote:

Thank you! I'll chek it.
However, please add to the config the options for R/W MTD devices. Without it, I can't manually write to the flash for check the boot and restore the stock firmware after. See my previous message for the options.

abnoeh.eu.org/filestore/lede-c2-debug-march-20-03.tar.xz
precomiled one, and I think config.seed

but why don't you cloen repo yourself and use make menuconfig to config it as you want to? wouldn't it be faster then wait me for days to comfile it for you?

kexecuser wrote:
abnoeh wrote:

about driver for 5ghz...It wasn't binary (just assumed it because it wiki said there is no driver for openwrt) but It isn't
but .......

by the way, 5ghz wifi works fine for me

I'll check too...

while we can't change it, I wonder the driver files in repo is the latest one they provided. maybe they published newer one.

kexecuser wrote:
abnoeh wrote:

and about m25p80 flash mismatch : do you know what controls it?

No. But, I'll search for it.

Thanks.

abnoeh wrote:
builded image: github.com/orangepizza/openwrt-archer-c2-lede17.01/releases/tag/archer-c2

Hi, I can't found kmod-usb-net-cdc-ether and usb-modeswitch package. Please give me update package link. thank you support me.

(Last edited by ecnam on 20 Mar 2018, 14:25)

abnoeh wrote:

builded image: github.com/orangepizza/openwrt-archer-c2-lede17.01/releases/tag/archer-c2

Hi, I can't found kmod-usb-net-cdc-ether and usb-modeswitch package. Please give me update package link. thank you support me.

ecnam wrote:
abnoeh wrote:

builded image: github.com/orangepizza/openwrt-archer-c2-lede17.01/releases/tag/archer-c2

Hi, I can't found kmod-usb-net-cdc-ether and usb-modeswitch package. Please give me update package link. thank you support me.

You can find the options here,

Base system -> mtd (Y) default?
Kernel modules -> USB Support -> kmod-usb-net (M) -> kmod-usb-net-cdc-ether (M)
Utilities -> usb-modeswitch (M)

I didn't try the final squashfs & raminitfs .bin files (8mb each), since I don't want to risk bricking my router.  The compilation went smooth so far.

Thanks for the contributors for their work on the Archer C2.

K

Kaito wrote:

You can find the options here,

Base system -> mtd (Y) default?
Kernel modules -> USB Support -> kmod-usb-net (M) -> kmod-usb-net-cdc-ether (M)
Utilities -> usb-modeswitch (M)


thank you support.
now my problem as below;
Base system has mtd but can't install kmod-usb-net and kmod-usb-net-cdc-ether.
any tips handle my problem.

error message:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-net:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-net-cdc-ether:

(Last edited by ecnam on 21 Mar 2018, 16:42)

ecnam wrote:
Kaito wrote:

You can find the options here,

Base system -> mtd (Y) default?
Kernel modules -> USB Support -> kmod-usb-net (M) -> kmod-usb-net-cdc-ether (M)
Utilities -> usb-modeswitch (M)


thank you support.
now my problem as below;
Base system has mtd but can't install kmod-usb-net and kmod-usb-net-cdc-ether.
any tips handle my problem.

error message:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-net:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-net-cdc-ether:

According to the Help in menuconfig:

kmod-usb-net depends on kmod-usb-core & kmod-mii to be loaded first located,

  • ./bin/targets/ramips/mt7620/packages/kmod-usb-core_4.4.120-1_mipsel_24kc.ipk

  • ./bin/targets/ramips/mt7620/packages/kmod-mii_4.4.120-1_mipsel_24kc.ipk

and kmod-usb-net-cdc-ether requires the previous module kmod-usb-net to load successfully.

K.

Kaito wrote:

According to the Help in menuconfig:

kmod-usb-net depends on kmod-usb-core & kmod-mii to be loaded first located,

  • ./bin/targets/ramips/mt7620/packages/kmod-usb-core_4.4.120-1_mipsel_24kc.ipk

  • ./bin/targets/ramips/mt7620/packages/kmod-mii_4.4.120-1_mipsel_24kc.ipk

and kmod-usb-net-cdc-ether requires the previous module kmod-usb-net to load successfully.

K.

thank you support.
again can't install kmod-mii.
any tips handle my problem.

error message:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-mii:

ecnam wrote:
Kaito wrote:

According to the Help in menuconfig:

kmod-usb-net depends on kmod-usb-core & kmod-mii to be loaded first located,

  • ./bin/targets/ramips/mt7620/packages/kmod-usb-core_4.4.120-1_mipsel_24kc.ipk

  • ./bin/targets/ramips/mt7620/packages/kmod-mii_4.4.120-1_mipsel_24kc.ipk

and kmod-usb-net-cdc-ether requires the previous module kmod-usb-net to load successfully.

K.

thank you support.
again can't install kmod-mii.
any tips handle my problem.

error message:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-mii:

According to the menuconfig help, kmod-mii does not have any dependencies.  Although the kmod-mii is set (M) when kmod-usb-net is selected.

kmod-mii is located,

  • ./bin/targets/ramips/mt7620/packages/kmod-mii_4.4.120-1_mipsel_24kc.ipk

K.

Kaito wrote:

According to the menuconfig help, kmod-mii does not have any dependencies.  Although the kmod-mii is set (M) when kmod-usb-net is selected.

kmod-mii is located,

  • ./bin/targets/ramips/mt7620/packages/kmod-mii_4.4.120-1_mipsel_24kc.ipk

K.

thank you support.
i used this link:
downloads.lede-project.org/releases/17.01-SNAPSHOT/targets/ramips/mt7620/packages/kmod-mii_4.4.120-1_mipsel_24kc.ipk
failure again.

(Last edited by ecnam on 25 Mar 2018, 04:13)

ecnam wrote:

thank you support.
i used this link:
downloads.lede-project.org/releases/17.01-SNAPSHOT/targets/ramips/mt7620/packages/kmod-mii_4.4.120-1_mipsel_24kc.ipk
failure again.

Hmm, I don't know how to fix your situation.  I thought you were using the orangepizza branch, which may have changes to the code and be more compatible with the Archer C2.


K.

Kaito wrote:

Hmm, I don't know how to fix your situation.  I thought you were using the orangepizza branch, which may have changes to the code and be more compatible with the Archer C2.


K.

thank you.

Does anyone know how to get back to Stock Firmware ? Using LEDE for streaming really is not doing the job for me

Kaito wrote:
Dbzafgt wrote:

Does anyone know how to get back to Stock Firmware ? Using LEDE for streaming really is not doing the job for me

Try this,

wiki.openwrt.org/doc/howto/generic.uninstall

K.

From what to what byte i need to cut from the firmware ? Do you have any clue ?

[EDIT]
Checked others TP-Link bootloader stripping firmware tutorials for U-Boot and it worked flawlessly.
Command to strip the firmware:
dd if=orig.bin of=tplink.bin skip=257 bs=512

Then flash it through the GUI

(Last edited by Dbzafgt on 28 Mar 2018, 06:15)

abnoeh wrote:
kexecuser wrote:

Thank you! I'll chek it.
However, please add to the config the options for R/W MTD devices. Without it, I can't manually write to the flash for check the boot and restore the stock firmware after. See my previous message for the options.

abnoeh.eu.org/filestore/lede-c2-debug-march-20-03.tar.xz
precomiled one, and I think config.seed

but why don't you cloen repo yourself and use make menuconfig to config it as you want to? wouldn't it be faster then wait me for days to comfile it for you?

Hi,

Thank you! But your compilation is missing! Not found: h*t*t*p*:*/*/*abnoeh.eu.org/filestore/lede-c2-debug-march-20-03.tar.xz

Let me to explain why and what...

- Until we can merge the port with the official repository we're doing testing and developement.
- During this phase is required that we can start/check/flash/reflash/etc the firmware without bricking devices.
- Futhermore, is mandatory to have a failsave firmware for recovery in case of necessity.
- Then the most simple solution is: 1) Enable access to the Bootloader through the device's physical serial port. 2) Use bootable kernels from the Bootlader without flashing the firmware. 3) Enable the option for flashing any kernel in the flash using a running firmware. 4) Have the option for restoring a backup of the stock image to the flash using a firmware that can boot from the bootloader.
- All of these four points are required for a safe development.

So, at time, we need to compile all firmwares in INITRAMFS and SQUASHFS forms. The first for booting from the Bootloader; the second for testing the boot from the flash. However, is still mandatory that all images have full MTD access enabled (r/w). That is for flashing squash images or restore the stock firmware.

The problem is that now you only provide tools for flashing using the U-Boot restore method. And this can brick your device... Why? Because if you overwrite the bootloader, or overwrite the radio partition, then you can lose important data. The best method during the develpment is flash only using mtd tools. So, you can safe flash what you really like.

So, please complete all your compilations with MTD TOOLS and INITRAMFS. And provide all images in the release section of the Github. This will speedup the development.

Regards.

Dbzafgt wrote:

Does anyone know how to get back to Stock Firmware ? Using LEDE for streaming really is not doing the job for me

Hi,

You have a backup of MTD partitions as described in my guide?

kexecuser wrote:

- 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.

Hi,

If you really need to flash using the TFTP Bootloader recovery method,
or you like to use a simple TFTP server tool for booting INITRAMFS firmwares...

and you don't like to do a much effort in setup a TFTP server.
Then you can use this tool written in NodeJS:

h*t*t*p*://github.com/sudomesh/tp-flasher

Regards!

Hi ! help please ) how to enable 5ghz on latest lede-ramips-mt7620-ArcherC2-initramfs-kernel.bin ?

The discussion might have continued from here.