OpenWrt Forum Archive

Topic: Flash tp-link archer C20i from stock firmware ?

The content of this topic has been archived on 12 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hye,

I would like to know how to use the file openwrt-ramips-mt7620-ArcherC20i-squashfs-sysupgrade.bin to flash my brand new archer c20i.
Can I flash the router with this file directly from router interface or is there another method to flash it ?

(Last edited by fred3398 on 10 Apr 2015, 15:25)

The only information I know about the Archer C20i is in this topic about the Archer C2:
https://forum.openwrt.org/viewtopic.php?id=52625
The C20i and the C2 seem to be very much the same router.

If you try anything, don't hesitate to explain what worked or what went wrong.

zo0ok wrote:

The only information I know about the Archer C20i is in this topic about the Archer C2:
https://forum.openwrt.org/viewtopic.php?id=52625
The C20i and the C2 seem to be very much the same router.

The C20i only has a 100MBit switch, while the C2 has a GbE switch. Other than that they should be identical.

Also as zo0ok noted, first check out the linked thread as there seem to be some issues with this router, just to make sure you don't end up with a bricked device.

Thanks for reply. I saw the post about c2 and c20i but I didn't find anything to help me.
I don't know how to flash the router. Can i do it with the web interface ?
The firmware is not a factory.bin, is it safe to do that ?

(Last edited by fred3398 on 11 Apr 2015, 00:10)

fred3398, to be clear... it is not safe.

I don't think anyone has successfully ever flashed (OpenWRT to) the router from the web interface. If they had, I think they would have posted so in the topic I linked to. Or they would comment here.

The router was added months ago to the "unknown" list of hardware:
http://wiki.openwrt.org/toh/unknown
No one has moved it from unknown to "possible", "work in progress" or "supported".

That said... there is an image for it... I don't know for sure that it will fail. I just say I don't think it is safe.

Worst scenarios if you try to flash it:
1) You brick the router beyond repair.
2) You brick the router and needs a serial console to recover factory firmware
3) OpenWRT does not start, but the router can be restored using some recovery mode

Ok, I will wait for a better support for this router. Thanks

Archer C20i: I successfully flashed the CC RC1 sysupgrade image using stock firmware:
https://downloads.openwrt.org/chaos_cal … pgrade.bin
I dont know if this was by design, or pure luck. Or if it was stupid for some reason. And I dont know how to go back to OEM (and I dont intend to).

I put some basic information on the device page:
http://wiki.openwrt.org/toh/tp-link/archer-c20i

I moved it from "Unknown" to "Supported" in ToH.

It seems, at first glance, that 2.4GHz works and 5GHz does not work. As expected. Although, I have not tested, just seen that OpenWrt discovers it.

I have CC RC1 on this device now. It has been stable for 51 minutes now (doing no real work).
If you have any questions about it, I will try to provide answers.

Good news !

I have tried and it works with web interface and same original firmware.
Openwrt seems to work but only power and wan leds are working.
Wps/Reset and Wireles On/Off buttons are not working.

Can't get failsafe mode, so be careful.

(Last edited by fred3398 on 18 Jun 2015, 12:22)

Lan led turns on with :
echo 1 > /sys/class/gpio/export
echo out > /sys/class/gpio1/direction

Usb led turns on with :
echo 11 > /sys/class/gpio/export
echo out > /sys/class/gpio11/direction

(Last edited by fred3398 on 29 Jun 2015, 18:48)

Nice (with the Leds)

Is USB working for you? I am on CC RC2. I load the usb drivers (modules) but no device is found (as far as I can see).

uchi/ohci/ehci/xhci?

Usb does not work for me too.
Two usb 2.0 keys and one keyboard, nothing in log or dmesg.

Usb is working now !

Modify the file ArcherC20i.dts in Image builder chaos chalmer rc2 :

Add before the line which starts with "ethernet@10100000 {" :

        ehci@101c0000 {
                status = "okay";
        };

        ohci@101c1000 {
                status = "okay";
        };

Rebuild firmware with these packages : kmod-usb-storage block-mount kmod-fs-ext4 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1

Flash with new firmware and it's done !

(Last edited by fred3398 on 22 Jun 2015, 18:12)

Great! Did you submit those patches somehow/somewhere so they will make it into RC3?

No, I don't know how to do that. I'm still looking for having leds and buttons working too.

(Last edited by fred3398 on 22 Jun 2015, 20:49)

Here is how to submit patches:
https://dev.openwrt.org/wiki/SubmittingPatches
...never did it myself, and I don't want to take credit for your patch wink

Well, I will not do it today anyway...
If you choose to try let me know so we don't do double work.
I will let you know if I try.

With some luck @jow, @mazilo or @alphasparc or someone will see the importance (well well) of this patch/topic and just fix it wink

I tried to submit a patch. Lets see how that turns out wink

This is my final dts file with usb support, leds (wlan, lan, usb) and buttons (reset/wps, wifi on/off)

/dts-v1/;

/include/ "mt7620a.dtsi"

/ {
    compatible = "ralink,mt7620a-soc";
    model = "TP-Link Archer C20i";

    chosen {
        bootargs = "console=ttyS0,115200";
    };

    palmbus@10000000 {
        gpio2: gpio@660 {
            status = "okay";
        };

                gpio3: gpio@688 {
                        status = "okay";
                };

        spi@b00 {
            status = "okay";

            m25p80@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "en25q64";
                reg = <0 0>;
                linux,modalias = "m25p80", "mx25l6405d";
                spi-max-frequency = <10000000>;

                partition@0 {
                    label = "u-boot";
                    reg = <0x0 0x20000>;
                    read-only;
                };

                partition@20000 {
                    label = "firmware";
                    reg = <0x20000 0x7a0000>;
                };

                partition@7c0000 {
                    label = "config";
                    reg = <0x7c0000 0x10000>;
                };

                rom: partition@7d0000 {
                    label = "rom";
                    reg = <0x7d0000 0x10000>;
                };

                partition@7e0000 {
                    label = "romfile";
                    reg = <0x7e0000 0x10000>;
                };

                radio: partition@7f0000 {
                    label = "radio";
                    reg = <0x7f0000 0x10000>;
                };
            };
        };
    };

    pinctrl {
        state_default: pinctrl0 {
            gpio {
                ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
                ralink,function = "gpio";
            };
        };
    };

    ethernet@10100000 {
        pinctrl-names = "default";
        pinctrl-0 = <&ephy_pins>;

        mtd-mac-address = <&rom 0xf100>;
        ralink,port-map = "wllll";
    };

    ehci@101c0000 {
        status = "okay";
    };

    ohci@101c1000 {
        status = "okay";
    };

    wmac@10180000 {
        ralink,mtd-eeprom = <&radio 0>;
    };

    pcie@10140000 {
        status = "okay";

        pcie-bridge {
            mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
                device_type = "pci";
                mediatek,mtd-eeprom = <&radio 32768>;
                mediatek,2ghz = <0>;
            };
        };
    };

    gpio-leds {
        compatible = "gpio-leds";
                lan {
                        label = "tp-link:blue:lan";
                        gpios = <&gpio0 1 1>;
                };
        usb {
            label = "tp-link:blue:usb";
            gpios = <&gpio0 11 1>;
        };
                wlan {
                        label = "tp-link:blue:wlan";
                        gpios = <&gpio3 0 1>;
                };
    };

    gpio-keys-polled {
        compatible = "gpio-keys-polled";
        #address-cells = <1>;
        #size-cells = <0>;
        poll-interval = <20>;
        reset_wps {
            label = "reset_wps";
            gpios = <&gpio0 13 1>;
            linux,code = <0x198>;
        };
        rfkill {
            label = "rfkill";
            gpios = <&gpio0 2 1>;
            linux,code = <0xf7>;
        };
    };
};

To have failsafe mode working, add MT7620 in /lib/preinit/07_set_preinit_iface_ramips like this post: https://forum.openwrt.org/viewtopic.php … 03#p262503
If you want to submit patch to openwrt devs, you can do it.

(Last edited by fred3398 on 29 Jun 2015, 20:46)

I tried to submit a/the new patch. Lets see what happens.

Hi,

I'm new here, I try to put OpenWRT into an Archer C2 via TP-Link web GUI, it only says that :

"Error code: 4503
The uploaded file was not accepted by the device."

At least, it doesn't brick it...

Maybe I do something wrong, but I can't get this to work. I didn't try TFTP on it at the moment.



I also try to put a 3G USB modem on an Archer C20i (almost the same hardware) using fred's method.

(Last edited by polioman on 17 Jul 2015, 16:53)

Hi :

Router Name : Archer C2 AC750

I tried to upgrade default firmware to OpenWRT firmware which is based on the RC1,RC2 and RC3. but, all failed so far. this is the same error message '4503' from web frimware upgrade interface.

here are the download link what i used.

https://downloads.openwrt.org/chaos_cal … pgrade.bin

Any comment would be nice and appreciates. thanks in advance.

P.S : is there any quick guide to using tftp download method? i mean how to get in the u-boot menus.

Hello,
after flashing a image my Archer C2 no longer starts.
Only the left LED goes on. No serial connection.

I have a programmer. I will burn the flash memory.
Can anyone make a "Generic Backup" of flash memory?
Description see http://wiki.openwrt.org/doc/howto/generic.backup

flash memory: W25Q64BV
0x000000000000-0x000000020000 : "boot"
0x000000020000-0x000000160000 : "kernel"
0x000000160000-0x0000007c0000 : "rootfs"
0x0000007c0000-0x0000007d0000 : "config"
0x0000007d0000-0x0000007e0000 : "romfile"
0x0000007e0000-0x0000007f0000 : "rom"
0x0000007f0000-0x000000800000 : "radio"

Did anyone got Archer C20i to boot and work with OpenWrt? Is it even booting? How is the wifi performance? Is 802.11ac working?

valentt wrote:

Did anyone got Archer C20i to boot and work with OpenWrt? Is it even booting? How is the wifi performance? Is 802.11ac working?

It works quite fine, the wiki is updated: https://wiki.openwrt.org/toh/tp-link/archer-c20i

I bricked mine yesterday when I used sysupgrade to install stock firmware.
(I did some tftp-recovery-attempts, and either I dont know how to use tftp properly, or I managed to make things worse)

(Last edited by zo0ok on 7 Jan 2016, 19:27)

Hey,

so I bricked mine today too. Can anyone of you provide me the correct PINs for the UART connection?

What I tried: Actually, I bricked 2 C20i (which is even worse). The first one I tried to upload the image via TFTP (Recovery mode) which worked pretty fine. Only afterward, the router is not doing anything. The system light is on and when I plug the cable into the "Internet" port, the corresponding light goes on in the front.

The second one I tried the upload via the Web-interface. Which also worked without a problem. After the reboot the switch is now in the same state as the first one.

Did anybody manage to connect to a C20i over the serial connection, or unbrick one?

Image used: https://downloads.openwrt.org/chaos_cal … pgrade.bin

(Last edited by NoiZe91 on 9 Jan 2016, 17:25)

NoiZe91 wrote:

What I tried: Actually, I bricked 2 C20i (which is even worse). The first one I tried to upload the image via TFTP (Recovery mode) which worked pretty fine. Only afterward, the router is not doing anything. The system light is on and when I plug the cable into the "Internet" port, the corresponding light goes on in the front.

Interesting! I am also under the impression that I successfully uploaded an image via TFTP, but now it is dead (I think I have exactly the same light/cable-situation as you have).

I broke in to mine yesterday, to access the serial connections. It was not a pretty job. If anyone wants to get in I can provide pictures. There are two screws under the sticker at the bottom of the router - I guess it is best to remove those first wink

There are four connections inside that are supposed to be serial:
Square-round-round-round.
They are supposed to be
VCC-Ground-TX/RX (dont know the order of TX/RX).

I tried to connect it to a raspberry pi (which also uses 3.3V serial). I was not successful. I tried both 9600 and 115200. I am not very good at serial connections, but the few times I have tried I usually get what I want in the end. Not with my C20i. I might try with a USB-Serial-adapter some day.

If I learn anything I will definitely post it here. I appreciate any help to recover my C20i.

The discussion might have continued from here.