Add OpenWrt support for Xiaomi "Redmi AX6000"

Does this happen when using the latest snapshot build?

I am currently using: OpenWrt 23.05.3 r23809-234f1a2efa / LuCI openwrt-23.05 branch git-24.073.29889-cd7e519

Have you tried wpa3 encryption only? Anything in the logs?

To all you guys experiencing this, can you post your dmesg and of your logread output? Is there anything do go on based on these logs?

Unfortunately, I don't have logs of when the problem occurs.

my System Log is spammed with messages from hostapd about "BEACON-REQ-TX-STATUS" and "BEACON-RESP-RX"

and the Kernel Log is spammed with banIP blocking warnings

I even know how to configure banIP to stop spamming messages in the log, but I have no idea how to configure hostapd to suppress these log records.

If you know what to do about hostapd, I'll configure it here and as soon as the problem occurs on the 5ghz network, I'll post the logs of what happened.

Suggest that you temporarily disable banIP to keep the logs from getting spammed and wait for the wifi crash to occur again, then post what I asked above. Without some details, diagnosing this is going to be impossible.

As I said, I know how to suppress the banIP log, the problem is the spam of hostapd logs on 802.11kvr packages.

There must be some way to suppress the hostapd log about "BEACON-REQ-TX-STATUS" and "BEACON-RESP-RX", otherwise it will be impossible to share.
I've already configured it to use 1MB of RAM and ROM to keep the System Log recorded, but this hostapd spam consumes this space in a matter of 5 hours of the device being turned on.

I do not know/not using 208.11kvr AFAIK. Perhaps someone else experiencing the crashes can post the logs.

I managed to make a filter to cover these 802.11kvr packets.

I basically followed these steps: Suppress logging of beacons - #4 by grrr2

Now I have disabled my "fix", which restarts the wifi every 12 hours, and just wait for the problem to occur and see if it registers in the log.

For all with Radio breaking issues. Running 6 days now without issues. Below my radio settings. OpenWrt 23.05.3 (r23809-234f1a2efa) UBOOT version
I do use South Afrika and Taiwan to be flexible with with TX power and avoid DFS. (but it works on other countries fine to, tried US)

Also don't use 30 dBm transmit power, no phone can send back at that power level, its useless in almost all cases. 21 dBm is more then enough for almost all situations (besides making a wireless bridge between 2 AX6000 devices long distance, better antenna make more sense then). (14 dBm on 2.4 Ghz)

config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/soc/18000000.wifi'
option channel '6'
option band '2g'
option htmode 'HE40'
option txpower '14'
option country 'TW'
option cell_density '0'
option he_bss_color '10'
option he_su_beamformee '1'
option log_level '0'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'AccessPoint'
option encryption 'psk2'
option key 'secret'
option ieee80211r '1'
option mobility_domain '4f60'
option ft_over_ds '0'
option ft_psk_generate_local '1'

config wifi-device 'radio1'
option type 'mac80211'
option path 'platform/soc/18000000.wifi+1'
option channel '100'
option band '5g'
option htmode 'HE80'
option country 'ZA'
option cell_density '0'
option txpower '21'
option he_bss_color '20'
option he_su_beamformee '1'
option log_level '0'

config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'AccessPoint'
option encryption 'psk2'
option key 'secret'
option ieee80211r '1'
option mobility_domain '4f60'
option ft_over_ds '0'
option ft_psk_generate_local '1'

1 Like

I put this configuration to test 5 days ago, and the 5ghz wifi really didn't cause any more problems:

 config wifi-device 'radio1'
 31         option type 'mac80211'
 32         option path 'platform/soc/18000000.wifi+1'
 33         option channel '36'
 34         option band '5g'
 35         option htmode 'HE80'
 36         option cell_density '0'
 37         option noscan '1'
 38         option country 'BR'
 39         option txpower '27'
 40
 41 config wifi-iface 'default_radio1'
 42         option device 'radio1'
 43         option network 'lan'
 44         option mode 'ap'
 45         option ssid 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
 46         option encryption 'sae-mixed'
 47         option key 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
 48         option ieee80211r '1'
 49         option ft_over_ds '0'
 50         option ifname 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
 51         option doth '1'
 52         option ieee80211k '1'
 53         option time_advertisement '2'
 54         option time_zone '<-03>3'
 55         option wnm_sleep_mode '1'
 56         option wnm_sleep_mode_no_keys '1'
 57         option bss_transition '1'
 58         option proxy_arp '1'

I put it back on channel 149 and power 30 dBm, to see if the problem will occur.

Can I activate Beamforming and BSS Coloring on this router?

I believe it is enable by default

2 Likes

@darksky, the problem just occurred, follow the log.

It seems like it has something to do with using channel 149, because using channel 36 with the rest of the settings the same, there simply aren't any problems with 5ghz wifi
detail, even with power at 27dBm the problem occurred.

config /etc/config/wireless

30 config wifi-device 'radio1'
 31         option type 'mac80211'
 32         option path 'platform/soc/18000000.wifi+1'
 33         option channel '149'
 34         option band '5g'
 35         option htmode 'HE80'
 36         option cell_density '0'
 37         option noscan '1'
 38         option country 'BR'
 39         option txpower '27'
 40
 41 config wifi-iface 'default_radio1'
 42         option device 'radio1'
 43         option network 'lan'
 44         option mode 'ap'
 45         option ssid 'xxxxxxxxxxxxxxxxx'
 46         option encryption 'sae-mixed'
 47         option key 'xxxxxxxxxxxxxxxxx'
 48         option ieee80211r '1'
 49         option ft_over_ds '0'
 50         option ifname 'xxxxxxxxxxxxxxxxx'
 51         option doth '1'
 52         option ieee80211k '1'
 53         option time_advertisement '2'
 54         option time_zone '<-03>3'
 55         option wnm_sleep_mode '1'
 56         option wnm_sleep_mode_no_keys '1'
 57         option bss_transition '1'
 58         option proxy_arp '1'

syslog

syslog:

I now understand why my channel was changing from time to time to somewthing from 6Ghz range. Because driver is detecting DFS RADAR according to logs:

Wed Jul 17 22:05:00 2024 cron.err crond[14363]: USER root pid 19054 cmd /etc/scripts/wlan5g_monitor.sh
Wed Jul 17 22:06:00 2024 cron.err crond[14363]: USER root pid 19066 cmd /etc/scripts/wlan5g_monitor.sh
Wed Jul 17 22:06:03 2024 daemon.notice hostapd: phy1-ap0: DFS-RADAR-DETECTED freq=5660 ht_enabled=0 chan_offset=0 cha
n_width=3 cf1=5690 cf2=0
Wed Jul 17 22:06:03 2024 daemon.notice hostapd: dfs_downgrade_bandwidth: no DFS channels left, waiting for NOP to fin
ish
Wed Jul 17 22:06:03 2024 daemon.notice hostapd: phy1-ap0: AP-DISABLED
Wed Jul 17 22:06:03 2024 daemon.notice hostapd: phy1-ap0: AP-STA-DISCONNECTED a4:45:19:1a:a4:03
Wed Jul 17 22:06:03 2024 daemon.notice hostapd: nl80211: deinit ifname=phy1-ap0 disabled_11b_rates=0
Wed Jul 17 22:06:03 2024 kern.info kernel: [1310443.442723] device phy1-ap0 left promiscuous mode
Wed Jul 17 22:06:03 2024 kern.info kernel: [1310443.447670] br-lan: port 5(phy1-ap0) entered disabled state
Wed Jul 17 22:06:03 2024 daemon.notice netifd: Network device 'phy1-ap0' link is down
Wed Jul 17 22:06:03 2024 daemon.notice hostapd: phy1-ap0: interface state ENABLED->DISABLED
Wed Jul 17 22:06:04 2024 kern.info kernel: [1310443.948083] br-lan: port 5(phy1-ap0) entered blocking state
Wed Jul 17 22:06:04 2024 kern.info kernel: [1310443.953845] br-lan: port 5(phy1-ap0) entered disabled state
Wed Jul 17 22:06:04 2024 kern.info kernel: [1310443.959713] device phy1-ap0 entered promiscuous mode
Wed Jul 17 22:06:04 2024 daemon.notice hostapd: phy1-ap0: interface state DISABLED->COUNTRY_UPDATE
Wed Jul 17 22:06:04 2024 daemon.notice hostapd: phy1-ap0: interface state COUNTRY_UPDATE->HT_SCAN
Wed Jul 17 22:06:04 2024 daemon.err hostapd: could not get valid channel
Wed Jul 17 22:06:04 2024 daemon.notice hostapd: phy1-ap0: interface state HT_SCAN->DFS
Wed Jul 17 22:07:00 2024 cron.err crond[14363]: USER root pid 19073 cmd /etc/scripts/wlan5g_monitor.sh

But I doubt that there is radar somewhere nearby me. For years I was using these channels on different vendors: Mikrotik, other openwrt devices and never my ssids were disabled due to DFS RADAR detection.

In my opinion this is a bug... or something. For addidtional testing I'll swap the channels with my other access point and I'll check if problem will move to the other AP or not.

BUG: When the device leaves the AP's coverage area, the AP cannot kick out the device.

  • Device: Xiaomi Redmi Router AX6000 (stock layout)
  • Firmware version: OpenWrt 23.05.3 r23809-234f1a2efa / LuCI openwrt-23.05 branch git-24.073.29889-cd7e519

When my device leaves the WiFi coverage area, such as when leaving home, it still shows as connected in the router's backend (Web UI), as shown in the picture:

This results in increased latency between other devices connected to the AP and the gateway. I suspect that this is because the AP keeps sending handshake signals to the non-existent device, causing the channel throughput to decrease.

The following is the log when the device disconnects. I believe some bugs occurred.

Thu Jul 25 08:02:08 2024 daemon.notice hostapd: phy1-ap0: AP-STA-DISCONNECTED b6:b8:80:8d:2f:e8
Thu Jul 25 08:02:08 2024 daemon.err hostapd: nl80211: kernel reports: key addition failed
Thu Jul 25 08:02:08 2024 daemon.err hostapd: nl80211: kernel reports: key addition failed
Thu Jul 25 08:02:08 2024 daemon.notice hostapd: handle_assoc_cb: STA b6:b8:80:8d:2f:e8 not found
Thu Jul 25 08:02:08 2024 daemon.err hostapd: nl80211: kernel reports: key addition failed
Thu Jul 25 08:02:08 2024 daemon.info hostapd: phy1-ap0: STA b6:b8:80:8d:2f:e8 IEEE 802.11: associated (aid 3)
Thu Jul 25 08:02:08 2024 daemon.notice hostapd: phy1-ap0: AP-STA-CONNECTED b6:b8:80:8d:2f:e8 auth_alg=ft

My temporary solution is to use this script to periodically kick out devices with weak signals, but I feel that the underlying cause is a bug in the firmware that makes it keep trying to connect to non-existent devices.

1 Like

Same here. With options 160mhz wide and channels above 149 I see 6+GHz on radio1 despite region, so wifi wont work in that combination. When I've switched to 80mhz wide all goes normal.

Sun Aug 25 10:10:05 2024 daemon.notice wpa_supplicant[1483]: Set new config for phy phy1
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: Set new config for phy phy1: /var/run/hostapd-phy1.conf
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: Restart interface for phy phy1
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: Remove interface 'phy1'
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: phy1-ap0: interface state ENABLED->DISABLED
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: phy1-ap0: AP-STA-DISCONNECTED 04:56:e5:e2:46:81
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: phy1-ap0: AP-STA-DISCONNECTED ba:f2:ba:f7:63:69
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: phy1-ap0: AP-STA-DISCONNECTED 5e:c3:ef:3b:4e:3c
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: phy1-ap0: AP-STA-DISCONNECTED 3c:06:30:34:a0:0e
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: phy1-ap0: AP-DISABLED
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: phy1-ap0: CTRL-EVENT-TERMINATING
Sun Aug 25 10:10:05 2024 daemon.err hostapd: rmdir[ctrl_interface=/var/run/hostapd]: Permission denied
Sun Aug 25 10:10:05 2024 daemon.notice hostapd: nl80211: deinit ifname=phy1-ap0 disabled_11b_rates=0
Sun Aug 25 10:10:05 2024 kern.info kernel: [1010672.662916] device phy1-ap0 left promiscuous mode
Sun Aug 25 10:10:05 2024 kern.info kernel: [1010672.667882] br-lan: port 5(phy1-ap0) entered disabled state
Sun Aug 25 10:10:05 2024 daemon.notice netifd: Network device 'phy1-ap0' link is down
Sun Aug 25 10:10:06 2024 daemon.notice hostapd: Configuration file: data: driver=nl80211 logger_syslog=127 logger_syslog_level=2 logger_stdout=127 logger_stdout_level=2 country_code=BR ieee80211d=1 ieee80211h=1 hw_mode=a supported_rates=120 180 240 360 480 540 basic_rates=120 240 beacon_int=100 chanlist=136 tx_queue_data2_burst=2.0 #num_global_macaddr=1 ieee80211n=1 ht_coex=0 ht_capab=[HT40-][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935] ieee80211ac=1 vht_oper_chwidth=2 vht_oper_centr_freq_seg0_idx=136 vht_capab=[RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][RX-STBC-1][SOUNDING-DIMENSION-4][BF-ANTENNA-4][VHT160][MAX-MPDU-11454][MAX-A-MPDU-LEN-EXP7] ieee80211ax=1 he_oper_chwidth=2 he_oper_centr_freq_seg0_idx=136 he_su_beamformer=1 he_su_beamformee=1 he_mu_beamformer=1 he_bss_color=128 he_spr_sr_control=3 he_default_pe_duration=4 he_rts_threshold=1023 he_mu_edca_qos_info_param_count=0 he_mu_edca_qos_info_q_
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.636226] br-lan: port 5(phy1-ap0) entered blocking state
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.642006] br-lan: port 5(phy1-ap0) entered disabled state
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.647965] device phy1-ap0 entered promiscuous mode
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.653177] br-lan: port 5(phy1-ap0) entered blocking state
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.658920] br-lan: port 5(phy1-ap0) entered forwarding state
Sun Aug 25 10:10:06 2024 daemon.notice hostapd: phy1-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
Sun Aug 25 10:10:06 2024 daemon.notice hostapd: phy1-ap0: interface state COUNTRY_UPDATE->HT_SCAN
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.667415] device phy1-ap0 left promiscuous mode
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.672443] br-lan: port 5(phy1-ap0) entered disabled state
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.729377] br-lan: port 5(phy1-ap0) entered blocking state
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.735165] br-lan: port 5(phy1-ap0) entered disabled state
Sun Aug 25 10:10:06 2024 kern.info kernel: [1010673.741174] device phy1-ap0 entered promiscuous mode
Sun Aug 25 10:10:06 2024 daemon.notice netifd: Wireless device 'radio1' is now up
Sun Aug 25 10:10:06 2024 daemon.err hostapd: Interface initialization failed
Sun Aug 25 10:10:06 2024 daemon.notice hostapd: phy1-ap0: interface state HT_SCAN->DISABLED
Sun Aug 25 10:10:06 2024 daemon.notice hostapd: phy1-ap0: AP-DISABLED
Sun Aug 25 10:10:07 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
Sun Aug 25 10:10:07 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 2 names
Sun Aug 25 10:10:07 2024 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 4 names
Sun Aug 25 10:10:07 2024 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Sun Aug 25 10:10:07 2024 daemon.notice hostapd: phy1-ap0: DFS-PRE-CAC-EXPIRED freq=5260 ht_enabled=0 chan_offset=0 chan_width=0 cf1=5260 cf2=0
Sun Aug 25 10:10:07 2024 daemon.notice hostapd: phy1-ap0: DFS-PRE-CAC-EXPIRED freq=5280 ht_enabled=0 chan_offset=0 chan_width=0 cf1=5280 cf2=0
Sun Aug 25 10:10:07 2024 daemon.notice hostapd: phy1-ap0: DFS-PRE-CAC-EXPIRED freq=5300 ht_enabled=0 chan_offset=0 chan_width=0 cf1=5300 cf2=0
Sun Aug 25 10:10:07 2024 daemon.notice hostapd: phy1-ap0: DFS-PRE-CAC-EXPIRED freq=5320 ht_enabled=0 chan_offset=0 chan_width=0 cf1=5320 cf2=0

OpenWrt 23.05.3 r23809-234f1a2efa / LuCI openwrt-23.05 branch git-24.073.29889-cd7e519

@fractalshine @rosentine - I am on a snapshot and do not see this. Recommend that you try one. I build from r27205 but suspect anything newer would be fine as well.

Clean latest snapshot (SNAPSHOT r27229-ebe7c5f1a3 ) w/o any config, still 6ghz on 149+ channels

Do you have a country set?