Adding OpenWrt support for Xiaomi AX3600 (Part 1)

I am using it as a full router. Checked your configs and there is no difference in them, at least compared to the required drivers and modules.

The memory leak happens when there is little wireless activity or no devices connected to the AP. In fact, with 30 connected devices you are far less likely to experience the full severity of these issues even without patches. Therefore, to validate the memory leak patches you should disconnect all devices and letting the AP idle for a while (e.g., do a few iperf runs then disconnect all devices from the wireless).

1 Like

looks promising, but my opkg cannot find the package qca-ssdk-shell?

I've built it from https://github.com/robimarko/nss-packages.git . Maybe you just have to enable the package to be built. Take a look at your .config:

grep qca-ssdk-shell .config
CONFIG_PACKAGE_qca-ssdk-shell=y

1 Like

SSDK shell is an app, you can simply select it via menuconfig.

Also, @avalentin this would confirm my hunch that FDB is not being updated and you have duplicate entries and then the switch stops forwarding.
This is either a bug in SSDK or its meant to be handled via NSS bridge client etc.

2 Likes

Thanks a lot!

The script is now doing miracles here :smile:

My .config did not have such an entry. I had to clone the repo and put it in my local package feed. Then it appeared in menuconfig and the package compiled and installed just fine.

Your script needed just a very minor tweak: get rid of the b of bash.

Roaming is not an issue anymore. Of course, it is just a workaround, but hey...

Not "formaly" tested the roaming with my logging roamer ESP32 or by sending raw ethernet frames between the hosts to compare to earlier results, but normal roaming feel with a phone or notebook is just fine now for a few hours.

I did not change anything in the firmware, settings or usage pattern. Just added the script to /etc/rc.local and rebooted both APs
Since then I notice the free memory is about 10-20% higher on average and the usage curve is much more flat.

Well I guess the conclusion here is that with the same code we have completely different results:

  • the ax3600 branch I have been using for more than a week, no signs of leaks in ath11k compared to before, with > 20 stations connected on 5Ghz and 2,4Ghz max mem usage is around 60%
  • the packet corruption issues might or might not be related to you using PPoE and the rest of us not, this I think is the only difference between our setups

you need to consider that the leak is triggered with low wifi usage...
And here i see exactly this:

  • having 2 poor device wifi leaks
  • having 20 device doing nothing wifi is on load since they need to coordinate for band/freq usage and ath11k doesn't leak

About pppoe could be that there is some problem with the offload patch (if used) or nss is doing some magic with some special packet

AX3600: How to switch between booting from rootfs and roofs_1 after installing OpenWrt' branch AX3600-5.10-restart ?
Installed the .ubi OpenWrt image from a cleaned-up 3.0.22-INT version of original firmware, using the 'ubiformat' command followed by 'nvram set flag_ota_reboot=1' 'nvram commit' and 'reboot'.
That homebrew OpenWrt boots fine and appears stable but lacks the 'nvram' command to set that flag and make the next boot be done from the alternative rootfs. Modified the Makefile of the nvram package such that it got compiled for a ipq807x but it complaints: 'Could not open nvram!'
Somebody on this forum thread that can shine some light on whether having an alternative rootfs available is supposed to remain supported?
If it is supposed to be possible to switch, how to control this from userspace?

You just need to set the right index in both variables:

fw_setenv flag_last_success 0
fw_setenv flag_boot_rootfs 0
1 Like

Thank you Vitor!

AX3600; Question about antenna connector and radio circuit layout:
what is the antenna connector nearest to the reset button connected to? (CN11)

Command 'iw phy phyN info' gives details about the three radio circuits:
phy0 (2.4GHz and 5 GHz)
Available Antennas: TX 0x1 RX 0x1
Configured Antennas: TX 0x1 RX 0x1
phy1 (5 GHz only)
Available Antennas: TX 0xf0 RX 0xf0
Configured Antennas: TX 0xf0 RX 0xf0
phy2 (2.4 GHz only)
Available Antennas: TX 0x3 RX 0x3
Configured Antennas: TX 0x3 RX 0x3
In these numbers the bit position is an antenna connection present or not.
phy0 and phy2 suggest 1 + 2 antennas = 3
phy1 with its 0xf0 seems a bit odd as it suggests 4 antennas but not starting from position 0, rather from position 4.
In any case 3 + 4 = 7. What is the connector #8 doing, nearest to the reset button (CN11)?
The PCB screen printing shows '5G_ANT1 .. 4' so those must be phy1. (CN5-8)
It also shows '2G_ANT1..2', so that must be phy2. (CN1-2).
Then there is 'AOT_ANT' (CN10). So that is likely phy0.
Which leaves CN11.
Could it be that between CN10 and CN11 one is for the case that 2.4 GHz is used, and the other for 5 GHz? If so, which is which? Strange that the connector is present but no screen printing to indicate its function. The antenne in the center of the encasing has, unlike the others, two coaxial cables, a white and a grey one. So it would appear that CN10 is for 2.4 GHz and CN11 for 5 GHz because the other 2.4 GHz of phy2 are also grey cables. Has anybody been through checking this. I intend to use this unit in a completely different encasing and application.

AFAIK - just from my memory of teardown photos:
The centre antenna with the LED is the single one for radio0 and the second coax connector running into it is for the LED itself, rather than for RF. They re-used the signal connector type for the sake of commonality with everything else?

phy0 (ath10k 2.4/5GHz) = 1 antenna, centre, with LED
phy1 (ath11k 5GHz) = 4 antenna: 2x left/right ends, 2x adjacent to the centre one with the LED
phy2 (ath11k 2.4GHz) = 2 antenna: the first and last ones along the back edge

I guess the idea is to generally maximize the distance between adjacent MIMO channels on the ath11k radios.

I can't comment about the antenna hex coding, but from what you show things don't seem consistent to me.

Thanks for comments and it explains the CN11 connector! Had missed the presence of that LED in the centre antenna because I opened the casing right after purchase. A gold plated coaxial connector for a LED I have not seen before :slight_smile:

Is there any news on NSS 11.4 and related patches? Maybe we can try that with wifi offload to see if it leaks or not.

1 Like

Memory leaking.
OpenWrt SNAPSHOT, r17305+61-643ddc0985 on basis of branch 'AX3600-5.10-restart' Aug. 8 2021 , with three radio circuits actvated but idling, no ethernet traffic, and no Luci used, starts with MemFree 228932 kB and after appr. 10 hours has 61348 kB remaining, out of 375740 MemTotal. So can confirm the observations of others that memory is leaking.

Update:
also compiled and tried github.com/coolsnowwolf/lede.
It is also leaking memory at significant rate. After 1.5 hour idling 25 MB gone.
Update2:
However, at around 200MB FreeMem, starting from 249 MB, the situation stabilizes and fluctuates around that value.
So there is a marked difference between the two versions.

Please notice that the DSD Tech SH-U09A1 converter does not work! It seems an FTDI chip is a must.

Hello everyone,

I am doing my best to catch up on this thread, but I'm still confused as to which repository we should be focusing our efforts on. Is it coolsnowwolf or robimarko or someone else's repo? What branch? Can someone put a sticky at the top of this thread?

robimarko's AX3600-5.10-restart branch

1 Like