Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Hi im trying the first time to build against this branch.
AX3600-5.10-restart branch

Can someone explain me if my steps are correct.
Installed Ubuntu VM (WSDL2)
Setup everything (required dependencies)

Than i did the following accoriding the QuickStart :

  1. ./scripts/feeds update -a

  2. ./scripts/feeds install -a

  3. make menuconfig
    Here i have choosen the following:
    Target System: Qualcom Atheros ipq807x
    Target Profile: (Default Profile (minimum package set))
    Target Images: ramdisk & squashfs
    Global Build Settings:
    "Select all tatget specific packages by default"
    "Select all kernel module packages by default"
    "Select all userspace packages by default"
    "Cryptographically signed package lists"
    "Enabele signature checking in opkg"
    "Show packages that require graphics support (local or remote)"
    "Enable IPv6 support in packages"
    "Enable gcc format security"

All others i let default!
Than i Saved the "Config" .config

  1. I startet the compile process via "make -j1"
    Its running right now for around over 1 Hour.. .. no "errors yet".

My main concerns are if i have used the "make menuconfig correct" and if im using the correct branch?
I want to use this build branch. "AX3600-5.10-restart", i used the following command to clone:

git clone git@github.com:robimarko/openwrt.git.

Best regards,
Hitch

Read this [OpenWrt Wiki] Build system usage

1 Like

Thank YOU!

@robimarko your ethtool: add optional netlink support has conflict with the OpenWrt upstream commit ethtool: introduce ethtool-full build variant

Yep, I know as they do the same thing.
You can just drop my commit or wait until I rebase

1 Like

Any stable release yet?

Hi all,

i have builded and tested now 2 versions.

a) from robimarko AX3600-5.10-restart branch
b) hgblob fork/branch with the patches

Here a my findings:

a)
On robimarko branch:
I can only activate radio 0 + 1 when radio0 and radio1 uses 80Mhz.
If i set radio1 (ax) to 160Mhz it will not show up anymore.
Performance was good on this build.
I can confirm the Memory leak exists.

So right now for robimarkos branch :

  • No 160Mhz on AX (radio1)
  • Memory leak on ath11k is triggered with low wifi usage
    --

b)
On hgblob branch/fork with the patches.

  • 160Mhz on AX (radio1) is working fine.
  • Memory leaks on ath11k is also triggered with low wifi usage
  • Performance is terrible there seems to be something wrong/missing?
    If there is load (Download/Speedtest) "CPU Core 0": is at 100% all time) Router gets unresponsive.

There is still some other patch that is needed for 160MHz to work.

Cannot confirm that. USB2UART converter on basis of CH340C works fine here.
Appr. 7 EUR from China. The USB to UART converter chip is followed by some simple level shifting electronics to be able to switch between 1.8V 3.3 V and 5 V. There is also a version that adds a 2.5V option.
Before that tried a 3.3V converter with CP2102 chip and that indeed does not work and even, when the AX3600 RX gets connected, prevents the router booting. It appears to be really a matter of the proper levels being applied on RX and TX. In case of the AX3600: 1.8V
USB2Serial

1 Like

This one works, as Ansuel already wrote: DSD TECH SH-U09C5 USB
It arrived today and the router boots fine with it attached.

I also have some CP2102 chips here, they always make trouble with some socs.

Yeah, I can also confirm the @Ansuel suggested one works, and is a great buy if in the UK, as next day delivery.

there are many fake one... that's the real problem

Same findings with hgblob's release. Went back to robi's for now.

I can confirm this too, if I kick all the wlan devices to the ath10k radio the memory usage instantly goes up to 70% something.

However I doubt this is a leak, a leak would mean that the memory is forever lost, but in my experiments when I move back all the devices from ath10k radio to ath11k overall memory usage instantly goes down. There is no need to reboot, the driver frees the memory normally.

1 Like

We can call it however we like, but we can all agree that this is not normal. In my case, there are a total of 4 wireless clients, barely transmitting anything, and OOM happens after 2 days. This is ridiculous on a 512MB router.

1 Like

Absolutely, I'm not denying that, it's just a very weird problem. I'm used to crappy code from Qualcomm but a driver that uses more memory when doing nothing and freeing it when doing work is something new :grinning:

3 Likes

Whilst hardly a viable solution for the memory-gobbling, checking "Hide ESSID" on the ath11 interface seems to have stopped it. Tried that 4 hours ago and since then the free RAM has been jumping between 125M & 132M, most of the time stable at 127M.

It's still possible to connect to the hidden SSID and it works as expected. Maybe this helps to point the finger at something though?

1 Like

I finally got some time to work on IPQ807x.
Rebased the branch, solved the ethtool conflict and fixed SSDK and NSS-DP as the generic MAC address function was updated.

There were a lot of things being discussed here regarding the memory leak, I was unable to really keep up.

Can somebody summerize it?

6 Likes

Memory leaking/reducing.
On basis of 'AX3600-5.10-restart' experimented with adding patches to its package/kernel/mac80211/patches/ath11k
First # 4-33 and # 143-983 that are present in this 'lede' version.
This seemed to reduce the rate of memory reduction.
Then added the # 998 'Enable-512MB-profile-in-ath11k' patch and associated changes in the ath.mk file.
That appears to have had a marked positive effect.
'MemFree' is ~262 MB after boot and after about 2 hours of idling operation the MemFree has stabilized at a 237 MB level.
(very basic OpenWrt configuration without luci and all three radios activated but without traffic).
Patch #998 changes the .dts for the ax3600 in terms of memory reservations.
Will let it run for more time but the constant memory reduction I saw before is not there now.
Sorry that all this is not very scientific but I lack the know-how on what these memory reservations are for.
Update: indeed after some 10 hours of idling operation FreeMem is still at the same 237 MB level.

I know you like to talk about the lede version. But I tried robimarko and hgblob branch unable to get devices to work in ethernet. The wifi no problem but the rest of it is impossible to watch tv for example. As you can see I have been logged in for 10 days on this version of lede. I have two AX3600 1 master and a mesh connection. I really want to switch to your version but for the moment it is not functional for me. At the moment unfortunately my children and my wife are at home so if I touch the connection I'm knocked out. Looking forward to testing your rebase.

Currently I use radio 0 for a device.
Radio 1 (5ghz) ssid hidden for telephones and tv box 6 devices and radio2 (2.4ghz) around 19 ssid hidden devices for IoT. The rest connected to 1 24-port switch. About 31 devices.