Support for Comfast CF-EW72 V2 MT7621

@123serge123 not shure if the orginal network config helps?

root@COMFAST:~# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd8f:fb87:9f6f::/48'

config interface 'lan'
        option ifname 'eth1.1'
        option macaddr 'e0:e1:a9:6f:64:2d'
        option type 'bridge'
        option force_link '1'
        option proto 'static'
        option ipaddr '192.168.10.1'
        option netmask '255.255.255.0'
        option mtu '1500'
        option ip6assign '60'

config eth1.1 'def_lan'

config router 'workmode'

config interface 'wan'
        option ifname 'eth1.2'
        option macaddr 'e0:e1:a9:6f:64:2e'
        option proto 'dhcp'
        option type 'bridge'

config eth1.2 'def_wan'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 5t'

config e0:e1:a9:6f:64:2d 'def_lan_macaddr'

config e0:e1:a9:6f:64:2e 'def_wan_macaddr'

config e0:e1:a9:6f:64:2f 'def_wlan0_macaddr'

config e0:e1:a9:6f:64:38 'def_sta_macaddr'

and the ifconfig /all from org firmware:

root@COMFAST:~# ifconfig -a
apcli0    Link encap:Ethernet  HWaddr E2:E1:A9:0F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

apclii0   Link encap:Ethernet  HWaddr E6:E1:A9:6F:64:30
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-lan    Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          inet addr:192.168.10.1  Bcast:192.168.10.255  Mask:255.255.255.0
          inet6 addr: fd8f:fb87:9f6f::1/60 Scope:Global
          inet6 addr: fe80::e2e1:a9ff:fe6f:642d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9437 errors:0 dropped:124 overruns:0 frame:0
          TX packets:730 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2145258 (2.0 MiB)  TX bytes:114920 (112.2 KiB)

br-wan    Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2E
          inet6 addr: fe80::e2e1:a9ff:fe6f:642e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:56824 (55.4 KiB)

eth0      Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:10

eth1      Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          inet6 addr: fe80::e2e1:a9ff:fe6f:642d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9557 errors:0 dropped:0 overruns:0 frame:0
          TX packets:936 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2351490 (2.2 MiB)  TX bytes:194410 (189.8 KiB)
          Interrupt:10

eth1.1    Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9557 errors:0 dropped:20 overruns:0 frame:0
          TX packets:730 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2179464 (2.0 MiB)  TX bytes:125140 (122.2 KiB)

eth1.2    Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:59330 (57.9 KiB)

gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-40-B6-00-00-00-00-00-00-00-00
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

gretap0   Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1462  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ifb0      Link encap:Ethernet  HWaddr 2A:2B:33:F2:B4:3D
          BROADCAST NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ifb1      Link encap:Ethernet  HWaddr F6:E8:C9:B9:63:4F
          BROADCAST NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1303 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1303 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:93420 (91.2 KiB)  TX bytes:93420 (91.2 KiB)

ra0       Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2F
          inet6 addr: fe80::e2e1:a9ff:fe6f:642f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:11

ra1       Link encap:Ethernet  HWaddr E2:E1:A9:1F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra2       Link encap:Ethernet  HWaddr E2:E1:A9:2F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra3       Link encap:Ethernet  HWaddr E2:E1:A9:3F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra4       Link encap:Ethernet  HWaddr E2:E1:A9:4F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra5       Link encap:Ethernet  HWaddr E2:E1:A9:5F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra6       Link encap:Ethernet  HWaddr E2:E1:A9:6F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra7       Link encap:Ethernet  HWaddr E2:E1:A9:7F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rai0      Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:30
          inet6 addr: fe80::e2e1:a9ff:fe6f:6430/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:31

rai1      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rai2      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rai3      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rai4      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rai5      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rai6      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

rai7      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

teql0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Simply compare MACs in output of the same openwrt command ifconfig -a.
And check switch ports marks (lan1-lan4 wan) on your box correspond to openwrt web interface names.

ifconfig -a from openwrt

root@OpenWrt:~# ifconfig -a
br-lan    Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::e2e1:a9ff:fe6f:642d/64 Scope:Link
          inet6 addr: fd83:189c:157e::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17834 errors:0 dropped:68 overruns:0 frame:0
          TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6082998 (5.8 MiB)  TX bytes:17907 (17.4 KiB)

eth0      Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          inet6 addr: fe80::e2e1:a9ff:fe6f:642d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:17907 errors:0 dropped:0 overruns:0 frame:0
          TX packets:203 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6418464 (6.1 MiB)  TX bytes:21816 (21.3 KiB)
          Interrupt:21

lan       Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17906 errors:0 dropped:10 overruns:0 frame:0
          TX packets:187 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6095700 (5.8 MiB)  TX bytes:18173 (17.7 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:256 errors:0 dropped:0 overruns:0 frame:0
          TX packets:256 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19968 (19.5 KiB)  TX bytes:19968 (19.5 KiB)

wan       Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2D
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:2F
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1     Link encap:Ethernet  HWaddr E0:E1:A9:6F:64:30
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Correct wan MAC (increment by 1)

	wan: port@4 {
	    status = "okay";
	    label = "wan";
	    nvmem-cells = <&macaddr_factory_e000>;
	   nvmem-cell-names = "mac-address";
	   mac-address-increment = <1>;
	   };
1 Like

what is the eth0?? Is for this also something missing in dts ore 02_network config?

with this DTS file, the 2 lan ports are working. But I get an 3th. one eth0 with an mtu 1504. For what is this interface. The device has only 2 ports in real.

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "mt7621.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
    compatible = "comfast,cf-ew72-v2", "mediatek,mt7621-soc";
    model = "Comfast CF-EW72 v2";

    aliases {
	label-mac-device = &wan;
	led-boot = &led_power;
	led-failsafe = &led_power;
	led-running = &led_power;
	led-upgrade = &led_power;
    };

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

    leds {
	compatible = "gpio-leds";

	led_power: wlan {
	    label = "blue:wlan";
	    gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
	};

    };

    keys {
	compatible = "gpio-keys";

	reset {
	    label = "reset";
	    gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
	    linux,code = <KEY_RESTART>;
	    debounce-interval = <60>;
	};
    };
};

&spi0 {
    status = "okay";

    flash@0 {
	compatible = "jedec,spi-nor";
	reg = <0>;
	spi-max-frequency = <50000000>;
	m25p,fast-read;

	partitions {
	    compatible = "fixed-partitions";
	    #address-cells = <1>;
	    #size-cells = <1>;

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

	    partition@30000 {
		label = "config";
		reg = <0x30000 0x10000>;
		read-only;
	    };

	    factory: partition@40000 {
		label = "factory";
		reg = <0x40000 0x10000>;
		read-only;
	    };

	    partition@50000 {
		compatible = "denx,uimage";
		label = "firmware";
		reg = <0x50000 0xfb0000>;
	    };
	};
    };
};

&pcie {
    status = "okay";
};

&pcie0 {
    wifi@0,0 {
	compatible = "mediatek,mt76";
	reg = <0x0000 0 0 0 0>;
	mediatek,mtd-eeprom = <&factory 0x0000>;
	ieee80211-freq-limit = <2400000 2500000>;
    };
};

&pcie1 {
    wifi@0,0 {
	compatible = "mediatek,mt76";
	reg = <0x0000 0 0 0 0>;
	mediatek,mtd-eeprom = <&factory 0x8000>;
	ieee80211-freq-limit = <5000000 6000000>;
    };
};

&gmac0 {
    nvmem-cells = <&macaddr_factory_e000>;
    nvmem-cell-names = "mac-address";
};

&switch0 {
    ports {
	port@1 {
	    status = "okay";
	    label = "lan";
	};

	wan: port@0 {
	    status = "okay";
	    label = "wan";
	    nvmem-cells = <&macaddr_factory_e000>;
	    nvmem-cell-names = "mac-address";
	    mac-address-increment = <1>;
	};
    };
};

&state_default {
    gpio {
	groups = "i2c", "uart2", "uart3", "sdhci", "jtag";
	function = "gpio";
    };
};

&factory {
    compatible = "nvmem-cells";
    #address-cells = <1>;
    #size-cells = <1>;

    macaddr_factory_4: macaddr@4 {
	reg = <0x4 0x6>;
    };

    macaddr_factory_8004: macaddr@8004 {
	reg = <0x8004 0x6>;
    };

    macaddr_factory_e000: macaddr@e000 {
	reg = <0xe000 0x6>;
    };
};

@slh mmh sounds not good for me. Is there something what we can try to get dfs channels to work?
The org firmware based on lede 17.x snapshot are able to use dfs channels. Is it possible to figure out how this was done?

@Nmebowen do you want to test the firmware?
https://drive.google.com/drive/folders/1IJhb37YfClamnL8LkLmFUuJlH8XfXN_X?usp=sharing

I do not the current status of the firmware, but I will test them today and post my results here.

1 Like

after seaching for a cheap device or maybe, but not really,i like this mt7621 outdoor device. how is the progress here, also i cannot find a working download link for the comfast firmware, not because i really need it but just for recovery the device.

See this topic

1 Like

thanks,for me the link is dead. can you download it? i cannot
also is the dts in this tread complete?

I've just checked the link. It's Ok.
Try this file

1 Like

sorry it was my firewall

how hell you guys flash this device? i cannot find a way to open the case, and initram will not boot.

@frollic i know you have version 1, but do you know how open this device?
I removed the two screws on the antenna attachment, but it doesn't come out

There are screws under the label, if I remember correctly.

1 Like

yes maybe, I ll try that, this way the label will be removed for good.
also let's hope I haven't damaged the antenna attachment, since I forced it a bit

@123serge123 is this part correct? it looks like not, i compiled 22.03.2 and the device is not accessible.

well i edited the dts and now 22.03.2 is running, but what kind proprietary wireless drivers the 5ghz radio mt7613be use? i cannot find any info. i try mt7615 but that does not work

edit
ok this mt7613 radio under mt76 is really a joke, i cannot find the source code of mediatek drivers
i got it now comfast and mediatek did a good pack, this is a 2.4 device
do not buy this device is a joke