Add OpenWrt support for Xiaomi "Redmi AX6000"

I'm running r22331-e314f7be7e for more than a day now in 4 AX6000's without any issue so far. WED & HW flow offload look fine.

Trying to request last snapshot build - r22362-68883278ab
Got this error
Unsupported package(s): procd-seccomp, wpad-basic-mbedtls, procd-ujail, procd

I've checked the latest snapshot that integrates some patches from @nbd (r22376-aa2777145f). I have 4 devices with multiple configurations (dump APs, routers, ...) and 2 of them have VLANs configured. Those are crashing every few hours. I've rolled back those patches (back to r22372-f7c1631155) to check if the crashes are due to them.

Observation: wan6 interface is missing the "Use DNS servers advertised by peer" option in LuCI. Had to set peerdns='0' manually for the Custom DNS Servers to be used.

Version: OpenWrt SNAPSHOT r22344-ca330cac92 / LuCI Master git-23.074.82619-6ad6a24

Hi, I have installed a snapshot (r22400-1558bbd116), the router connects on wan and the Internet (on DHCP on a main router – 192.168.31.1), but no connection is passed through to lan. I can SSH, SCP to AX6000, it even updated the package lists and downloaded LuCi, but there is no connection through the router, no Internet nor connection to the higher level from AX6000 lan.

Is there a config mistake (I didn't really changed much), or is it device/OpenWrt dev related?
(see the config below)

network file:

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

config globals 'globals'
	option ula_prefix 'fdaf:b5cd:4cc7::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option gateway '192.168.31.1'

config device
	option name 'wan'
	option macaddr 'XX:XX:XX:XX:XX:XX'

config interface 'wan'
	option device 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'

dhcp file:

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'
	option sequential_ip '1'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

firewall file:

config defaults
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option synflood_protect '1'
	option flow_offloading '1'
	option flow_offloading_hw '1'

config zone
	option name 'lan'
	list network 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'

config zone
	option name 'wan'
	list network 'wan'
	list network 'wan6'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'

config forwarding
	option src 'lan'
	option dest 'wan'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

config include 'miniupnpd'
	option type 'script'
	option path '/usr/share/miniupnpd/firewall.include'

Thanks

You'll need to add the wan port to the lan bridge if you're using it.

I don't mean to. I was setting it up as a normal router... which didn't work in the initial settings. A few restarts, disconnections etc. seem to have solved the issue.

Hi, do these issues have anything to do with the implementation of OpenWrt on AX6000? Anyone experiencing the same?

Wifi dropping on device connected to Redmi AX6000 – phy1-ap0: AP-STA-DISCONNECTED - Installing and Using OpenWrt - OpenWrt Forum

Yes, I have the same problem with OpenWrt SNAPSHOT r22385-4dedcbdc80 Kernel Version 5.15.102

I accidentally replied in the thread you link. Short answer is one of my devices gets the disconnect 6-8 times per hour.

Yes, WiFi drops several (1-10) times a day. r22084 (kernel 5.15.93). WiFi card Intel AC3165

It seems that is has some problem with Intel cards. I have not noticed anything weird with any other device.

I don't think so. I have the same problem with all my devices and not all have intel cards.

1 Like

I'm pretty sure that's just due to powersaving on the client.

no it s not. it s about mat

Agreed, I have just noticed this when I was on Facetime on my iPhone, and also when I connected my other OpenWrt router on client mode to the AX6000. It seems to be on the router side.

1 Like

Hi guys, how's it going?

After a few days of doing some investigations, I think I solved this problem and others by adding the following lines in the wireless config (/etc/config/wireless):

config wifi-device 'radio0'
        option he_bss_color '8'
config wifi-iface 'default_radio0'
        option bss_transition '1'
        option wnm_sleep_mode '1'
        option time_advertisement '2'
        option ieee80211k '1'
        option disassoc_low_ack '0'
        option max_inactivity '900'
config wifi-device 'radio1'
        option he_bss_color '16'
config wifi-iface 'default_radio1'
        option bss_transition '1'
        option wnm_sleep_mode '1'
        option time_advertisement '2'
        option ieee80211k '1'
        option disassoc_low_ack '0'
        option max_inactivity '900'

I hope this config can help you too.

Greetings!

I don't think you want multiple radios with the same bss color.

You are right, I copied my config for the radio1 badly.

I edited and changed my message.

Thank you so much for your advice.

Regards.

The skip_inactivity_poll 1 will negate the disassoc_low_ack 0 option. I was getting many "deauthenticated due to inactivity" log msgs before realizing I'd made that mistake.

1 Like