Add OpenWrt support for Xiaomi "Redmi AX6000"

It's just the physical properties of air transparency for radio waves and other typical materials for the houses

This happens once in a while. Firmware Version OpenWrt SNAPSHOT r22528-0c53801968 but it has happened on other builds as well:

Mon Apr 17 16:06:19 2023 kern.warn kernel: [193481.810173] ------------[ cut here ]------------
Mon Apr 17 16:06:19 2023 kern.info kernel: [193481.815141] NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 7 timed out
Mon Apr 17 16:06:19 2023 kern.warn kernel: [193481.822460] WARNING: CPU: 1 PID: 0 at dev_watchdog+0x330/0x33c
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.828629] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_counter nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mt7915e mt76_connac_lib mt76 mac80211 cfg80211 slhc nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c hwmon crc_ccitt compat crypto_safexcel sha1_generic seqiv md5 des_generic libdes authencesn authenc leds_ws2812b leds_gpio gpio_button_hotplug
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.889832] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.15.105 #0
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.896257] Hardware name: Xiaomi Redmi Router AX6000 (OpenWrt U-Boot layout) (DT)
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.904149] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.911437] pc : dev_watchdog+0x330/0x33c
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.915778] lr : dev_watchdog+0x330/0x33c
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.920118] sp : ffffffc00800bdb0
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.923762] x29: ffffffc00800bdb0 x28: 0000000000000140 x27: 00000000ffffffff
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.931227] x26: 0000000000000000 x25: 0000000000000001 x24: ffffff8000de94c0
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.938690] x23: 0000000000000000 x22: 0000000000000001 x21: ffffffc008ad6000
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.946151] x20: ffffff8000de9000 x19: 0000000000000007 x18: ffffffc008aea2e0
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.953614] x17: ffffffc0173e2000 x16: ffffffc00800c000 x15: 00000000000002e5
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.961076] x14: 00000000000000f7 x13: ffffffc00800bad8 x12: ffffffc008b422e0
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.968540] x11: 712074696d736e61 x10: ffffffc008b422e0 x9 : 0000000000000000
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.976002] x8 : ffffffc008aea290 x7 : ffffffc008aea2e0 x6 : 0000000000000001
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.983464] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.990926] x2 : ffffff801fea0080 x1 : ffffffc0173e2000 x0 : 000000000000003f
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193481.998388] Call trace:
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.001167]  dev_watchdog+0x330/0x33c
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.005161]  call_timer_fn.constprop.0+0x20/0x80
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.010110]  __run_timers.part.0+0x208/0x284
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.014710]  run_timer_softirq+0x38/0x70
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.018963]  _stext+0x10c/0x28c
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.022436]  __irq_exit_rcu+0xdc/0xfc
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.026432]  irq_exit+0xc/0x1c
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.029819]  handle_domain_irq+0x60/0x8c
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.034075]  gic_handle_irq+0x50/0x120
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.038157]  call_on_irq_stack+0x28/0x44
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.042412]  do_interrupt_handler+0x4c/0x54
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.046925]  el1_interrupt+0x2c/0x4c
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.050836]  el1h_64_irq_handler+0x14/0x20
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.055264]  el1h_64_irq+0x74/0x78
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.058996]  arch_cpu_idle+0x14/0x20
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.062902]  do_idle+0xc0/0x150
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.066378]  cpu_startup_entry+0x20/0x60
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.070632]  secondary_start_kernel+0x130/0x140
Mon Apr 17 16:06:20 2023 kern.debug kernel: [193482.075494]  __secondary_switched+0x50/0x54
Mon Apr 17 16:06:20 2023 kern.warn kernel: [193482.080010] ---[ end trace 88c68cb8216759e2 ]---
Mon Apr 17 16:06:20 2023 kern.err kernel: [193482.084977] mtk_soc_eth 15100000.ethernet eth0: transmit timed out
Mon Apr 17 16:06:20 2023 kern.info kernel: [193482.223637] mtk_soc_eth 15100000.ethernet eth0: Link is Down
Mon Apr 17 16:06:20 2023 kern.err kernel: [193482.750375] mtk_soc_eth 15100000.ethernet: warm reset failed
Mon Apr 17 16:06:20 2023 kern.info kernel: [193482.769551] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
Mon Apr 17 16:06:20 2023 kern.info kernel: [193482.778298] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx

Tried out channels above 100 as suggested earlier and they dont work at all, the wireless cards wont activate. Only channel 36 seems to work for 160Mhz for me, the rest wont apply

That may be due to either the country you're based in, that may not allow the use of those frequencies, or some radar in the vecinity that's disabling their use. You can check the latter in the log file.

Yup logs mention radar as the reason for not being able to apply

Hi, could someone please advise what can I do. I have flashed openwrt but the luci was not there. I was not able to configure the PPPoE trough terminal. Is there a way how to download luci package manually and scp it to the router?

P.S. these are my ISP settings (I have fiber): https://www.o2.cz/podpora/internet/pevny-internet-modemy-nezakoupene-u-o2#c-manualni-nastaveni-a124225

snapshots don't come with luci, you can add it downloading the proper ipk and installing it. ( opkg update && opkg install luci)

For your needs, something like this in /etc/config/network should work:

config device
        option name 'wan'

config interface 'wan'
        option proto 'pppoe'
        option device 'wan.848'
        option username 'O2'
        option password 'O2'
        option keepalive '5 1'

config device
        option type '8021q'
        option ifname 'wan'
        option vid '848'
        option name 'wan.848'

Some further fine-tuning (i.e. mtu or ipv6) can be done, but at least it should get you started.

You can use the online OpenWrt firmware selector to build your own package which includes Luci. For the stock layout, go to:
https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mediatek%2Ffilogic&id=xiaomi_redmi-router-ax6000-stock

For the U-Boot layout, go to:
https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mediatek%2Ffilogic&id=xiaomi_redmi-router-ax6000-ubootmod

Under the " About this build" heading, click on "Customize installed packages and/or first boot script" and just add luci to the installed packages. It will build a new firmware snapshot with luci included by default.

2 Likes

Thank you I will try this. Could you please tell me what packages are needed for luci. Is it ok when I just add luci there?

base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-crypto-hw-safexcel kmod-gpio-button-hotplug kmod-leds-gpio kmod-leds-ws2812b kmod-mt7915e kmod-mt7986-firmware kmod-nft-offload libc libgcc libustream-mbedtls logd mt7986-wo-firmware mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls luci

Thank you, I had there the interface section, I was missing the device section. Could you briefly describe what is this section for?

You need to enable VLANs (802.1Q) and create a device for the specific Internet VLAN, in which you'll be running PPPoE. That's what this section does.

For instance, if you want to add a new interface for TV (as per the link you shared), you'll have to add

config device
        option type '8021q'
        option ifname 'wan'
        option vid '835'
        option name 'wan.835'

config interface 'iptv'
        option device 'wan.835'

and then configure iptv interface with the appropiate protocol and parameters.

Yes, just luci is alright.

Noticed that in a recent commit the MT76 maintainer has removed the MT753x driver, see here

Correct me if i'm wrong but isn't this the driver used to support the MT7531AE switch chip in this router?

If so maybe we need to steer clear of snapshots released after this commit?

1 Like

I commented on the commit in the github UI.
@nbd

1 Like

Same here https://github.com/openwrt/openwrt/issues/12491

1 Like

So it appears the newer DSA drivers (from upstream) are used instead. I might hold off on flashing to newer snapshots though for the time being. :slight_smile:

1 Like

Yes but in my case they are not working like the previous one.

1 Like

i have problem with wifi 2.4. the maximum speed I achieve is around 30-50 mbit/s. I changed channels and frequency between 20 and 40 mhz, no difference. what is the reason and how to fix it?

I'm using the latest snap.

wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/18000000.wmac'
        option channel 'auto'
        option band '2g'
        option htmode 'HE40'
        option country 'US'
        option cell_density '1'
        option txpower '22'
config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'Nova'
        option encryption 'psk2'
        option key 'xxxx'

What is your device? It looks like your device only have 20MHz 1x1 support...

actually the problem was on my phone. I tested it on another device, no problem