Adding OpenWrt support for Xiaomi AX3600 (Part 1)

you are right... propose the support of the qca package on openwrt will be very hard IMHO
at least the kernel doesn't need to be patched like it's needed for something like ecm

I have hope as without it there will be no support for IPQ807x, IPQ60xx and probably for IPQ50xx as well.
And not having those means not supporting a large portion of 802.11ax boards, and since a rather small amount of kernel patching is required I see no point in refusing these.

we just need to present them in a good way :wink:

Yeah, with a pretty much complete target support and some finely applied community pressure.

anyway a quick fix about pci... they did the same mistake they did with ipq806x... (don't know if this cause any problem and i didn't check if it's the same for arm64)
on arm there is a IO_SPACE_LIMIT or 1m and on ipq806x every pci line declared a IO space of 1m...
they did the same for arm64 and should be reduced to 64k as it's a more sane value instead of enlarging the IO_SPACE_LIMIT for the whole arch.
(the change is in the last value of the pci ranges binding from 0x00100000 to 0x00010000)

1 Like

Hi guys,
i have here a Linksys MX5300 (IPQ8072, QCN5024 +QCN5054 + QCA9984 other pci) and i was able to build a working image based on robimarkos repo.

Wifi is working quite well (but I'm also seeing that "bss channel survey timed out" message)

@robimarko: i can also can see the speed issue but not always and not with any device. From my mobile phone it's always pretty good (600 - 800 mbit/s up / down)
But from my Laptop with an ax200 i have this speed issue but only sometimes and only in upload direction.

iw dev wlp3s0 link
Connected to c4:41:1e:67:6a:c4 (on wlp3s0)
   SSID: OpenWrt
   freq: 5180
   RX: 309935 bytes (952 packets)
   TX: 334950 bytes (1093 packets)
   signal: -28 dBm
   rx bitrate: 1200.9 MBit/s 80MHz HE-MCS 11 HE-NSS 2 HE-GI 0 HE-DCM 0
   tx bitrate: 1200.9 MBit/s 80MHz HE-MCS 11 HE-NSS 2 HE-GI 0 HE-DCM 0

   bss flags:	short-slot-time
   dtim period:	2
   beacon int:	100

upload:

iperf3 -c 192.168.8.1
Connecting to host 192.168.8.1, port 5201
[  5] local 192.168.8.157 port 60490 connected to 192.168.8.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  25.8 MBytes   216 Mbits/sec    0   1.04 MBytes       
[  5]   1.00-2.00   sec  70.0 MBytes   587 Mbits/sec    0   1.72 MBytes       
[  5]   2.00-3.00   sec  73.8 MBytes   619 Mbits/sec    0   2.07 MBytes       
[  5]   3.00-4.00   sec  71.2 MBytes   598 Mbits/sec    0   2.46 MBytes       
[  5]   4.00-5.00   sec  76.2 MBytes   640 Mbits/sec    0   2.75 MBytes       
[  5]   5.00-6.00   sec  72.5 MBytes   608 Mbits/sec    0   2.92 MBytes       
[  5]   6.00-7.00   sec  72.5 MBytes   608 Mbits/sec    0   3.08 MBytes       
[  5]   7.00-8.00   sec  70.0 MBytes   587 Mbits/sec    0   3.08 MBytes       
[  5]   8.00-9.00   sec  33.8 MBytes   283 Mbits/sec    0   3.08 MBytes       
[  5]   9.00-10.00  sec  12.5 MBytes   105 Mbits/sec    0   3.08 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   578 MBytes   485 Mbits/sec    0             sender
[  5]   0.00-10.07  sec   575 MBytes   479 Mbits/sec                  receiver


download:

iperf3 -c 192.168.8.1 -R
Connecting to host 192.168.8.1, port 5201
Reverse mode, remote host 192.168.8.1 is sending
[  5] local 192.168.8.157 port 60494 connected to 192.168.8.1 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  84.7 MBytes   711 Mbits/sec                  
[  5]   1.00-2.00   sec  86.0 MBytes   722 Mbits/sec                  
[  5]   2.00-3.00   sec  84.9 MBytes   712 Mbits/sec                  
[  5]   3.00-4.00   sec  88.0 MBytes   738 Mbits/sec                  
[  5]   4.00-5.00   sec  87.8 MBytes   736 Mbits/sec                  
[  5]   5.00-6.00   sec  89.9 MBytes   754 Mbits/sec                  
[  5]   6.00-7.00   sec  91.0 MBytes   764 Mbits/sec                  
[  5]   7.00-8.00   sec  87.0 MBytes   730 Mbits/sec                  
[  5]   8.00-9.00   sec  89.6 MBytes   752 Mbits/sec                  
[  5]   9.00-10.00  sec  72.7 MBytes   610 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.07  sec   865 MBytes   721 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   862 MBytes   723 Mbits/sec                  receiver

I did the same as you (i assume), took the stock bdf file and used ath11k bdencoder to add board-id and ath11k-calibration-variant.

Additionally the pci has the same problem as on the AX3600, sometimes it is recognized, but ath10k is not really working.
And sometime it crashes the entire board.

I don't know if this makes any difference or not, but the latest Chinese ROM is not 1.0.67, the latest version is 1.1.15:
http://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/r3600/miwifi_r3600_firmware_02d97_1.1.15.bin

@kirdes Thanks for testing, yeah I took the stock BDF and used bdencoder to package it.
So, this would indicate an ath11k issue rather than BDF or AX3600 specific one possibly.
Yeah, PCI is known to work like 50% of the time max.

@McGiverGim I know, I am running 1.1.15 and BDF pulled is from it.

@Ansuel ARM64 looks to have 16M limit:

#define PCI_IO_SIZE		SZ_16M

Also, I dug out the tsens sensor mapping to the HW blocks so now we know which one is for the CPU cores, CPU package, UBI core etc and can implement generic cooling after tsens is patched in.

Hi!

is there any stable release out there?

I've just bought this device

Nothing yet, this is a relatively new Chipset

1 Like

Thank you!

This post started in 2020... so I imagine it's a very long way to go...

Or maybe it's quite advance?

Compared to 2020 its way ahead, but PCI is not working for the third radio and main radio perfomance is bad.

Hm, I am using my custom hostapd config now and there is no BSS warnings, performance is still bad however.
This is my config from IPQ6018 that I had from before:

logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd

interface=wlan0
bridge=br-lan
driver=nl80211
ssid=AXTest
country_code=US
ieee80211d=1
ieee80211h=1
hw_mode=a
channel=149
wmm_enabled=1
ieee80211n=1
ieee80211ac=1
ieee80211ax=1
ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40]
vht_capab=[MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][MAX-A-MPDU-LEN-EXP3][SOUNDING-DIMENSION-2][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]
vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=155
he_oper_chwidth=1
he_oper_centr_freq_seg0_idx=155
he_su_beamformer=1
he_su_beamformee=1
he_mu_beamformer=1
2 Likes

The not working PCI for the third ( IoT) Radio would be bearable. But the poor performance on the other two radios is disappointing. Robimarko and Ansual (and others) make very good jobs. I bought the device in the end of 2020 (65€ per DHGATE) because I hoped, that openwrt will come soon.

Well... at least you can use the normal firmware while everything is moving forward

Is the factory firm very bad?

Is the performance of your AX3600 around the same as the IPQ8072 Linksys device posted above ?

I'll try with some of the other bd files from other firmware versions later today. But if all ath11k performance is around the same maybe it's down to some offloading needed ?

I think that he posted his speeds at that he was having low speeds randomly.
Now, this is interesting:

Accepted connection from 192.168.2.97, port 45530
[  5] local 192.168.2.32 port 5201 connected to 192.168.2.97 port 45532
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  19.5 MBytes   164 Mbits/sec                  
[  5]   1.00-2.00   sec  21.9 MBytes   184 Mbits/sec                  
[  5]   2.00-3.00   sec  20.5 MBytes   172 Mbits/sec                  
[  5]   3.00-4.00   sec  19.6 MBytes   165 Mbits/sec                  
[  5]   4.00-5.00   sec  19.5 MBytes   164 Mbits/sec                  
[  5]   5.00-6.00   sec  20.0 MBytes   168 Mbits/sec                  
[  5]   6.00-7.00   sec  21.5 MBytes   180 Mbits/sec                  
[  5]   7.00-8.00   sec  21.4 MBytes   179 Mbits/sec                  
[  5]   8.00-9.00   sec  20.3 MBytes   171 Mbits/sec                  
[  5]   9.00-10.00  sec  21.4 MBytes   179 Mbits/sec                  
[  5]  10.00-10.04  sec   881 KBytes   187 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.04  sec   206 MBytes   173 Mbits/sec                  receiver

With the following config:

driver=nl80211
interface=wlan0
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
channel=auto
ht_capab=[LDPC][SMPS-DYNAMIC][TX-STBC][RX-STBC-1][MAX-AMSDU-7935][DSSS_CCK-40]
vht_capab=[MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC1][SU-BEAMFORMER][SOUNDING-DIMENSION-4][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][MU-BEAMFORMER][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]
hw_mode=a
wmm_enabled=1
dtim_period=1
ignore_broadcast_ssid=0
ctrl_interface=/var/run/hostapd-wifi0
send_probe_response=0
bridge=br-lan
ssid=OpenWrt
ieee80211w=0
wmm_enabled=1
ieee80211n=1
ieee80211ac=1
ieee80211ax=1

So this is just 20Mhz channel, tried getting 80MHz but the performance is terrible.
I gotta test with another client except for my phone.

2 Likes

I use the stock firmware, in the function as AP many functions are not available, e.g. Guest Net. Radio Power is poor, too, with Openwrt you have more possibilities. Still I doen`t know if the Firmware sends data to china......

There is a possability, to modify the stock firmware, but it seems not to be very trivial and my linux knowledges are very manageable

1 Like

This is what im seeing with the "as booted" wifi config / VT80 (just enabled the 5GHZ wifi)

root@OpenWrt:/# iperf3 -c 192.168.1.191
Connecting to host 192.168.1.191, port 5201
[  5] local 192.168.1.1 port 33690 connected to 192.168.1.191 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  59.1 MBytes   496 Mbits/sec    0   1.58 MBytes       
[  5]   1.00-2.00   sec  72.7 MBytes   610 Mbits/sec    0   1.58 MBytes       
[  5]   2.00-3.00   sec  75.1 MBytes   630 Mbits/sec    0   1.58 MBytes       
[  5]   3.00-4.00   sec  70.1 MBytes   588 Mbits/sec    0   2.07 MBytes       
[  5]   4.00-5.00   sec  59.9 MBytes   502 Mbits/sec    0   2.07 MBytes       
[  5]   5.00-6.00   sec  79.4 MBytes   666 Mbits/sec    0   2.07 MBytes       
[  5]   6.00-7.00   sec  80.7 MBytes   677 Mbits/sec    0   2.07 MBytes       
[  5]   7.00-8.00   sec  80.3 MBytes   673 Mbits/sec    0   2.07 MBytes       
[  5]   8.00-9.00   sec  79.7 MBytes   669 Mbits/sec    0   2.07 MBytes       
[  5]   9.00-10.00  sec  80.3 MBytes   674 Mbits/sec    0   2.07 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   737 MBytes   619 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   736 MBytes   617 Mbits/sec                  receiver

iperf Done.
root@OpenWrt:/# iperf3 -c 192.168.1.191 -R
Connecting to host 192.168.1.191, port 5201
Reverse mode, remote host 192.168.1.191 is sending
[  5] local 192.168.1.1 port 33694 connected to 192.168.1.191 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  42.1 MBytes   353 Mbits/sec                  
[  5]   1.00-2.00   sec  43.2 MBytes   362 Mbits/sec                  
[  5]   2.00-3.00   sec  43.8 MBytes   367 Mbits/sec                  
[  5]   3.00-4.00   sec  44.7 MBytes   375 Mbits/sec                  
[  5]   4.00-5.00   sec  46.9 MBytes   393 Mbits/sec                  
[  5]   5.00-6.00   sec  50.3 MBytes   422 Mbits/sec                  
[  5]   6.00-7.00   sec  47.3 MBytes   397 Mbits/sec                  
[  5]   7.00-8.00   sec  48.3 MBytes   406 Mbits/sec                  
[  5]   8.00-9.00   sec  51.0 MBytes   428 Mbits/sec                  
[  5]   9.00-10.00  sec  47.7 MBytes   400 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec   469 MBytes   393 Mbits/sec                  sender
[  5]   0.00-10.00  sec   465 MBytes   390 Mbits/sec                  receiver

iperf Done.
root@OpenWrt:/# iwinfo 
wlan0     ESSID: "OpenWrt"
          Access Point: 8C:53:C3:D6:DB:3B
          Mode: Master  Channel: 36 (5.180 GHz)
          Center Channel 1: 42 2: unknown
          Tx-Power: 30 dBm  Link Quality: 0/70
          Signal: unknown  Noise: -105 dBm
          Bit Rate: 866.7 MBit/s
          Encryption: none
          Type: nl80211  HW Mode(s): 802.11nacax
          Hardware: unknown [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: yes  PHY name: phy0

Thats with a OnePlus 6T

Those speeds are great, so it could just be my phone.

On a Pixel 4 as well

root@OpenWrt:/# iperf3 -c 192.168.1.119
Connecting to host 192.168.1.119, port 5201
[  5] local 192.168.1.1 port 37488 connected to 192.168.1.119 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  47.1 MBytes   395 Mbits/sec    0   1.99 MBytes       
[  5]   1.00-2.00   sec  56.2 MBytes   472 Mbits/sec    0   2.36 MBytes       
[  5]   2.00-3.00   sec  68.3 MBytes   573 Mbits/sec    0   2.48 MBytes       
[  5]   3.00-4.00   sec  58.3 MBytes   489 Mbits/sec    0   2.63 MBytes       
[  5]   4.00-5.00   sec  54.2 MBytes   454 Mbits/sec    0   2.63 MBytes       
[  5]   5.00-6.00   sec  60.1 MBytes   504 Mbits/sec    0   2.77 MBytes       
[  5]   6.00-7.00   sec  56.2 MBytes   471 Mbits/sec    0   2.77 MBytes       
[  5]   7.00-8.00   sec  58.5 MBytes   491 Mbits/sec    0   2.77 MBytes       
[  5]   8.00-9.00   sec  57.1 MBytes   479 Mbits/sec    0   2.77 MBytes       
[  5]   9.00-10.00  sec  58.6 MBytes   491 Mbits/sec    0   2.77 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   575 MBytes   482 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   573 MBytes   481 Mbits/sec                  receiver

iperf Done.