Adding OpenWrt support for Xiaomi AX3600 (Part 1)

From the sysupgrade i had errors so yes the image was too big (or the kernel part was too big)

Now with a 26 mb it does work correctly. So my fault but also... 256mb of nand and you have ath79 limitation? wow

Yeah, this is one of the main problems with the ax3600 and ax9000. Thats why xiaomi is using a dedicated rootfs_data partition.

so the entire mtd12/13 is kernel partition ?

No, it's an ubi-device that contains kernel, rootfs and rootfs_data (in openwrt)
In the stock firmware xiaomi is using "ubi_rootfs" as rootfs_data partiton (if I'm not wrong)

I don't have any special tricks, if you have UART then you can unify all of the rootfsX+overlay partitions.
Xiaomi uses rootfs partitions to store kernel and squashfs RO rootfs and then overlay partition gets used to mount the RW ubifs-based overlay.

@MaxwellZX No ETA, none whatsoever, I am currently upstreaming all of the upstreamable stuff and once that is completed PR will be made.

Cleaning up for upstreaming and some of the comments really got rid of some hacks, some stuff has been basically reworked etc.
So, I will make a new OpenWrt branch utilizing those as patches are completely reordered to make actual sense

4 Likes
root@No-Lag-Router:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                22.0M     22.0M         0 100% /rom
tmpfs                   204.0M      7.1M    196.9M   3% /tmp
/dev/ubi0_2               1.0M     92.0K    852.0K  10% /overlay
overlayfs:/overlay        1.0M     92.0K    852.0K  10% /
tmpfs                   512.0K         0    512.0K   0% /dev

we should really fix this... it's not doable... i didn't even put that much packages just unbound, a vpn service and adblock

2 Likes

Hello, there is still no patch to fix the memory in the work of the ath11k driver ?, the problem in working with 80 and 160 MHz has not been resolved.

1 Like

Can this only be achieved by uart? Or could it be included by default once the built is released to upstream openwrt?

Ax3600 is at 74.20 eur sold by amazon.de:
https://www.amazon.de/dp/B08MV83J94

Prices fluctuate, so I use a price tracker (camelcamelcamel) to hunt bargains or check what was the lowest price ever in amazon.
I got one from amazon.es last year around 66 eur, the lowest price I ever saw.

1 Like

I get lots of those messages:

[  153.850863] ath11k c000000.wifi: Failed to add peer: da:35:xx:xx:xx:ac for VDEV: 1
[  153.850921] ath11k c000000.wifi: Failed to add station: da:35:xx:xx:xx:ac for VDEV: 1
[  190.735953] ath11k c000000.wifi: Failed to add peer: da:35:xx:xx:xx:ac for VDEV: 1
[  190.736007] ath11k c000000.wifi: Failed to add station: da:35:xx:xx:xx:ac for VDEV: 1

Is that anything meaningful? I have the feeling that my Sonos wifi sound system behaves a bit dodgy and has that MAC.

I did some more speed/cpuload tests and can't understand one of the many test scenarios results.
Using todays or the previous build bin from Robi repo.

Test (1): Laptop AX210 wifi sending to wired desktop.
Result: Speed is not normal, always limited to 600 - 700Mbits.
Expected: Speed should be ~940Mbits, limited by wired LAN.
laptop(wifi) -> (wifi)AX3600(wiredLAN) -> desktopPC

Router is using AX 5Ghz chan100@160Mhz, during tests:
2401.9 Mbit/s, 160 MHz, HE-MCS 11, HE-NSS 2
2401.9 Mbit/s, 160 MHz, HE-MCS 11, HE-NSS 2
QCA9887 802.11nac is disable, as I don't use it.

Speed limit is not from:
Laptop wifi sending to router wifi, speed is normal (iperf3: 1,5 - 1,6 Gbit).
Wired laptop sending to wired desktop, speed is normal (iperf3: ~940Mbits).
So no problem in LAN, laptop, desktop, cables or wifi.
During test (1), I can't see any cpu bottleneck in router, laptop, desktop.
Tried both computers with linux, tried different distros, both windows, always same result.
As expected, doesn't matter what computer is iperf3 server or client, when Laptop wifi is sending to router wired lan, always gets the same limited speed.

Test (2): Laptop wifi receiving from wired desktop, speed is normal (iperf3: 940Mbits, limited by wired lan 1Gbit).

-> Test (1) details:
Server in desktop: [ 5] 0.00-30.00 sec 2.36 GBytes 676 Mbits/sec receiver (client shows 206 Retries)
Client in laptop: iperf3 -c 192.168.0.xxx -t 30 or -P 2 or -P 4

root@X2:~# htop

    0[|||||||||          25.0% 1017MHz] Tasks: 22, 8 thr, 81 kthr; 1 running
    1[|||||||||||||      37.6% 1017MHz] Load average: 0.30 0.12 0.04
    2[||                  4.9% 1017MHz] Uptime: 00:08:39
    3[|||||              12.0% 1017MHz] Mem[|||||||||||||||||       157M/408M]
  Avg[||||||||           20.3% 1017MHz] Swp[                            0K/0K]

  PID USER       PRI  NI  VIRT   RES   SHR S CPU% -MEM%   TIME+  Command
 1196 root        20   0     0     0     0 S  46.5  0.0  0:07.37 napi/-16
 1186 root        20   0     0     0     0 S   6.5  0.0  0:01.37 napi/-7
 1190 root        20   0     0     0     0 S   3.2  0.0  0:01.68 napi/-11
 3517 root        20   0  1904  1568  1084 R   2.2  0.4  0:01.77 htop
  974 root        20   0     0     0     0 I   1.1  0.0  0:00.06 kworker/u8:4-ev
    1 root        20   0  1648  1104   860 S   0.0  0.3  0:01.38 /sbin/procd
    2 root        20   0     0     0     0 S   0.0  0.0  0:00.00 kthreadd
    3 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 rcu_gp
    4 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 rcu_par_gp
    5 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 netns
    7 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 kworker/0:0H-kb
    8 root        20   0     0     0     0 I   0.0  0.0  0:01.07 kworker/u8:0-ev
    9 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 mm_percpu_wq
   10 root        20   0     0     0     0 S   0.0  0.0  0:00.00 rcu_tasks_trace
   11 root        20   0     0     0     0 S   0.0  0.0  0:00.18 ksoftirqd/0

Looks like problem is in router, when Laptop wifi is sending to wired desktop, speed is limited. I don't know why.

1 Like

What makes you think that you should have 1Gbps over WLAN?

Because when I run iperf3 inside the router I have 1,6Gbits in WirelessLAN.

What's the CPU usage then?

Cause, I have not seen anything close to 1+Gbps over WLAN, especially if you are also running iperf on the device itself

It's the last link in this post:
https://forum.openwrt.org/t/adding-openwrt-support-for-xiaomi-ax3600/55049/7036

I redid it yesterday and it was 1,5 -1,6Gbit, but will test speed just now again to discard interference.


EDIT: Laptop wifi sending to router wifi, running iperf3 -s in router, -P 2 in laptop, keeping previous wifi connection, zero retries.
[SUM] 0.00-30.01 sec 5.51 GBytes 1.58 Gbits/sec receiver

In test(1), I can't see cpu bottleneck in htop, but I have 1s refresh, let me try 100ms refresh.
Also want to change governor to performance just in case.


EDIT: laptop wifi sending to wired desktop.
In laptop disabled AX210 power save.
In router changed to performance governor.
Speed increased to ~850 Mbits:
[ 5] 0.00-30.00 sec 2.95 GBytes 843 Mbits/sec receiver
278 Retries in client

Changed htop refresh to 100ms, but can't capture/see bottleneck:

root@X2:~# htop

    0[||||                6.6% 1382MHz] Tasks: 22, 8 thr, 79 kthr; 1 running
    1[|                   1.0% 1382MHz] Load average: 0.31 0.21 0.13
    2[|                   3.0% 1382MHz] Uptime: 02:46:42
    3[|||||||||||||||||||66.7% 1382MHz] Mem[||||||||||||||||        148M/408M]
  Avg[|||||||||          20.8% 1382MHz] Swp[                            0K/0K]

  PID USER       PRI  NI  VIRT   RES   SHR S CPU% -MEM%   TIME+  Command
 1179 root        20   0     0     0     0 R  69.5  0.0  1:47.36 napi/-17
 1169 root        20   0     0     0     0 S   3.2  0.0  0:23.91 napi/-7
 1173 root        20   0     0     0     0 S   3.2  0.0  0:24.01 napi/-11
16381 root        20   0  1912  1568  1064 R   3.2  0.4  0:55.58 htop
18140 root        20   0     0     0     0 I   1.1  0.0  0:00.10 kworker/1:2-eve
    1 root        20   0  1664  1120   864 S   0.0  0.3  0:01.48 /sbin/procd
    2 root        20   0     0     0     0 S   0.0  0.0  0:00.01 kthreadd
    3 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 rcu_gp
    4 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 rcu_par_gp
    5 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 netns
    7 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 kworker/0:0H-kb
    9 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 mm_percpu_wq
   10 root        20   0     0     0     0 S   0.0  0.0  0:00.00 rcu_tasks_trace
   11 root        20   0     0     0     0 S   0.0  0.0  0:08.11 ksoftirqd/0
   12 root        20   0     0     0     0 I   0.0  0.0  0:01.77 rcu_sched

One difference I notice, is wifi to wifi has zero retries, wifi to LAN has some retries, don't know if it has any meaning. I tried several runs, some without -P, others with -P 2, -P 3, same result for wifi sending to wiredLAN.

1 Like

Is it me or there are some problem with upload speed?

@sqrwv i suggest using -------------- to split edit as it will result in


1 Like

Anyone have some internal image of the pcb? I'm thinking of replacing the custom power plug with a more standard one so i can trash that shitty uk power supply with custom smol plug....

https://www.acwifi.net/9478.html

it really seems to be just a standard plug... in theory i should be able to replace it without any problem with https://www.amazon.it/HYY-YY-Femmina-Socket-Connettore-Shipping/dp/B09HZK1R8F/ref=sr_1_10?__mk_it_IT=ÅMÅŽÕÑ&crid=1GEHJGAZX28A2&keywords=power+plug+5x2%2C1+pcb&qid=1652808215&sprefix=power+plug+5x2%2C1+pcb%2Caps%2C80&sr=8-10
(aka the standard connector for this kind of devices... too triggered by the idea of wasting 10€ to get a connector adapter and have 4 cm of extra cable)

Yes, I think so, but you can recheck after you have the new connector.
Trouble will be to suck all that solder, especially from the ground plane.
You'll need a good iron, solder wick and flux.