Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Did you run ubiformat on both mtd12 and mtd13?

1 Like

Nah. That's probably it, thanks. (Right… I thought it would basically do the same thing as ubiformat, but actually we have the user overlay FS on the same ubi, so it only modifies the read-only system image!)

Hi,

Can someone just compile a quick TLDR status for AX3600? It is hard to understand troughout the thread.
Basically, it works but there are memory leak issues associated with ath11k? But those issues might/might not have been redeemed by latest patches?

5 Likes

As I just received mine today, I would also appreciate a short summary very much!

From my testing, it's basically exactly how you described. For my purposes, the build I'm creating from robimarko's repo works fine, and I don't apply any patches either. All the radios work and I can get gigabit download speeds with SQM enabled. Sysupgrade through the web GUI works fine as well.

The memory leak doesn't even seem to affect me. Like right now I have uptime of 6d 2h 43m 31s and the memory used seems to be about the same it has been on other days. From what I've read elsewhere in the thread, the memory leak is primarily manifesting when you have no wireless clients connected. That's not the case for me, however, as I have 15+ wireless clients connected at any given time.

Only difficult part from my perspective was just getting the initial flash of OpenWRT onto the device. Ever since that though it's been pretty smooth sailing.

4 Likes

Hello,

I would like to try the same build you have, I have pulled robimarko's fork but I am a bit lost in the menu config settings, any way to share your settings?

Thanks!!

Just ask for his .config and replace that in your buildroot... Done you will compile the same exact image (unless you have different commit)

I went and uploaded my build & configs here

4 Likes

That's great! Can you please share How you installed it initially? I am a bit lost there.

Hey man, thanks for sharing. Is there any step by step tutorial for dumb? I really need the OpenWRT for AP mode. Thanks.

According to @dchard Adding OpenWrt support for Xiaomi AX3600 (Part 1) - #1843 by dchard
you just need to ubiformat the .ubi image on both rootfs:

ubiformat /dev/mtd12 -y -f openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-nand-factory.ubi
ubiformat /dev/mtd13 -y -f openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-nand-factory.ubi

Then reboot to OpenWRT.

Maybe, we need another step (do we?): do sysupgrade:

sysupgrade openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-nand-sysupgrade.bin

Reboot again, and done.

Be warned, I haven't tried it myself

P.S. Also repeating the warning here:

I would highly recommend to save the mtd partitions, who knows you might need them. Especially the ART is important, as that contains calibration data specific to your device, if its gone then you are f*cked.

4 Likes

Thanks! Worked for me.

1 Like

If it helps,I have detailed instructions for recovery further up, and these can also be used to install the initial OpenWRT image:
AX3600 OpenWRT Detailed Recovery Instructions
Or you can use my detailed Install Instruction from a year ago (not sure if they are still valid, but should be):
AX3600 OpenWRT Detailed Install Instructions
Hope they help...

PS In my testing about a month ago, I found it worked okay too, although it didn't play nice with my iPad Pro 2018 when I had other AC (ie not Wifi5) Access Points on the network. Although my partners iPad Pro 2016 and Android phone worked fine, but I have not had chance to test the latest commits since then.

5 Likes

What's up with the supposed dual-band QCA9889 "for IoT" radio being recognized as a 5ghz-only QCA9887 btw?

UPD: it is possible to reconfigure as 2GHz by manually setting wireless.radio0.band='2g' which is what you want for various embedded junk. So it doesn't really matter, it's just that LuCI doesn't understand dual-band radios the band selector in LuCI did not appear until I manually switched to 2GHz?? Anyway, is it correct that this kind of radio only supports one band at a time?

3 Likes

They share the same PCI ID and ath10k treats them the same.
Its dual band but not concurrent, so you can only have 2g or 5g AP at once on it

2 Likes

Nice and very useful writeups. I think you should add that the voltage level of the serial connection is the unusual 1.8V before mentioning how to connect the pins. Might save a router or two... :slight_smile:

Yikes, you are right. Don't know how I missed that. Unfortunately it seems there is a time limit to edit posts here, and I can't edit it. Unless someone else knows how to?

Folks, I'm porting robimarko 5.10-restart to Xiaomi ax6000/ipq5018. I would be using 5.4 kernel from QSDK as they have ipq5018 support. I'm struggling with one thing. Where I can extract equivalent of: https://github.com/robimarko/openwrt/blob/AX3600-5.10-restart/package/firmware/ipq-wifi/board-xiaomi_ax3600.ipq8074

Is it going to be Atheros firmware from Xiaomi rom?

1 Like

You need to extract it from the stock FW and then use ath11k-bdencoder to package it.

4 Likes

Hello,

I tried your build

  • flashed your binaries to my ax3600 on one of the 2 rootfs to keep the other one as backup
  • swapped the system to boot to that rootfs
  • Got a huge smile seeing openWRT in my browser
  • Set-up radio 1 and 2 and left the router alone with no ethernet plugged to see if mem would leak
  • few hours later : no leak detected, me happy

more testing :

  • connected and disconnected phones to radio 1 and 2
  • memory goes a bit down when connection is made (which seems natural)
  • sadly memory does not go back up when connection is broken off....
    I looked at the logs and saw this, for what it's worth:
***** CONNECT PHONE1 ON RADIO1

Thu Aug 19 12:22:16 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: authenticated
Thu Aug 19 12:22:16 2021 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED a0:41:47:xx:xx:xx 2
Thu Aug 19 12:22:16 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: associated (aid 1)
Thu Aug 19 12:22:16 2021 daemon.notice hostapd: wlan1: AP-STA-CONNECTED a0:41:47:xx:xx:xx
Thu Aug 19 12:22:16 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Thu Aug 19 12:22:16 2021 daemon.notice hostapd: wlan1: EAPOL-4WAY-HS-COMPLETED a0:41:47:xx:xx:xx
Thu Aug 19 12:22:16 2021 daemon.info dnsmasq-dhcp[30555]: DHCPDISCOVER(br-lan) a0:41:47:xx:xx:xx
Thu Aug 19 12:22:16 2021 daemon.info dnsmasq-dhcp[30555]: DHCPOFFER(br-lan) 192.168.11.197 a0:41:47:xx:xx:xx
Thu Aug 19 12:22:16 2021 daemon.info dnsmasq-dhcp[30555]: DHCPREQUEST(br-lan) 192.168.11.197 a0:41:47:xx:xx:xx
Thu Aug 19 12:22:16 2021 daemon.info dnsmasq-dhcp[30555]: DHCPACK(br-lan) 192.168.11.197 a0:41:47:xx:xx:xx HUAWEI_P30_Pro-27af28a5dc

***** DISCONNECT PHONE1 FROM RADIO1

Thu Aug 19 12:23:26 2021 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED a0:41:47:xx:xx:xx
Thu Aug 19 12:23:26 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: disassociated
Thu Aug 19 12:23:27 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)


***** CONNECT PHONE2 ON RADIO2

Thu Aug 19 12:24:16 2021 daemon.info hostapd: wlan2: STA d4:38:9c:xx:xx:xx IEEE 802.11: authenticated
Thu Aug 19 12:24:16 2021 daemon.info hostapd: wlan2: STA d4:38:9c:xx:xx:xx IEEE 802.11: associated (aid 1)
Thu Aug 19 12:24:16 2021 daemon.notice hostapd: wlan2: AP-STA-CONNECTED d4:38:9c:xx:xx:xx
Thu Aug 19 12:24:16 2021 daemon.info hostapd: wlan2: STA d4:38:9c:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Thu Aug 19 12:24:16 2021 daemon.notice hostapd: wlan2: EAPOL-4WAY-HS-COMPLETED d4:38:9c:xx:xx:xx
Thu Aug 19 12:24:16 2021 daemon.info dnsmasq-dhcp[30555]: DHCPDISCOVER(br-lan) d4:38:9c:xx:xx:xx
Thu Aug 19 12:24:16 2021 daemon.info dnsmasq-dhcp[30555]: DHCPOFFER(br-lan) 192.168.11.130 d4:38:9c:xx:xx:xx
Thu Aug 19 12:24:16 2021 daemon.info dnsmasq-dhcp[30555]: DHCPREQUEST(br-lan) 192.168.11.130 d4:38:9c:xx:xx:xx
Thu Aug 19 12:24:16 2021 daemon.info dnsmasq-dhcp[30555]: DHCPACK(br-lan) 192.168.11.130 d4:38:9c:xx:xx:xx

***** DISCONNECT PHONE2 FROM RADIO2

Thu Aug 19 12:24:47 2021 daemon.notice hostapd: wlan2: AP-STA-DISCONNECTED d4:38:9c:xx:xx:xx


***** CONNECT PHONE1 ON RADIO1

Thu Aug 19 12:26:53 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: authenticated
Thu Aug 19 12:26:53 2021 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED a0:41:47:xx:xx:xx 2
Thu Aug 19 12:26:53 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: associated (aid 1)
Thu Aug 19 12:26:53 2021 daemon.notice hostapd: wlan1: AP-STA-CONNECTED a0:41:47:xx:xx:xx
Thu Aug 19 12:26:53 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Thu Aug 19 12:26:53 2021 daemon.notice hostapd: wlan1: EAPOL-4WAY-HS-COMPLETED a0:41:47:xx:xx:xx
Thu Aug 19 12:26:53 2021 daemon.info dnsmasq-dhcp[30555]: DHCPDISCOVER(br-lan) a0:41:47:xx:xx:xx
Thu Aug 19 12:26:53 2021 daemon.info dnsmasq-dhcp[30555]: DHCPOFFER(br-lan) 192.168.11.197 a0:41:47:xx:xx:xx
Thu Aug 19 12:26:53 2021 daemon.info dnsmasq-dhcp[30555]: DHCPREQUEST(br-lan) 192.168.11.197 a0:41:47:xx:xx:xx
Thu Aug 19 12:26:53 2021 daemon.info dnsmasq-dhcp[30555]: DHCPACK(br-lan) 192.168.11.197 a0:41:47:xx:xx:xx HUAWEI_P30_Pro-27af28a5dc


***** CONNECT PHONE2 ON RADIO2

Thu Aug 19 12:27:58 2021 daemon.info hostapd: wlan2: STA d4:38:9c:xx:xx:xx IEEE 802.11: authenticated
Thu Aug 19 12:27:58 2021 daemon.info hostapd: wlan2: STA d4:38:9c:xx:xx:xx IEEE 802.11: associated (aid 1)
Thu Aug 19 12:27:58 2021 daemon.notice hostapd: wlan2: AP-STA-CONNECTED d4:38:9c:xx:xx:xx
Thu Aug 19 12:27:58 2021 daemon.info hostapd: wlan2: STA d4:38:9c:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Thu Aug 19 12:27:58 2021 daemon.notice hostapd: wlan2: EAPOL-4WAY-HS-COMPLETED d4:38:9c:xx:xx:xx
Thu Aug 19 12:27:58 2021 daemon.info dnsmasq-dhcp[30555]: DHCPDISCOVER(br-lan) d4:38:9c:xx:xx:xx
Thu Aug 19 12:27:58 2021 daemon.info dnsmasq-dhcp[30555]: DHCPOFFER(br-lan) 192.168.11.130 d4:38:9c:xx:xx:xx
Thu Aug 19 12:27:58 2021 daemon.info dnsmasq-dhcp[30555]: DHCPREQUEST(br-lan) 192.168.11.130 d4:38:9c:xx:xx:xx
Thu Aug 19 12:27:58 2021 daemon.info dnsmasq-dhcp[30555]: DHCPACK(br-lan) 192.168.11.130 d4:38:9c:xx:xx:xx


***** DISCONNECT PHONE1 FROM RADIO1

Thu Aug 19 12:28:32 2021 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED a0:41:47:xx:xx:xx
Thu Aug 19 12:28:32 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: disassociated
Thu Aug 19 12:28:33 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)

***** DISCONNECT PHONE2 FROM RADIO2

Thu Aug 19 12:29:35 2021 daemon.notice hostapd: wlan2: AP-STA-DISCONNECTED d4:38:9c:xx:xx:xx

we can see that the connects to radio 1 (AX) have this extra line of log :

Thu Aug 19 12:26:53 2021 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED a0:41:47:xx:xx:xx 2

while the disconnects from radio 1 have these extra lines of log :

Thu Aug 19 12:28:32 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: disassociated
Thu Aug 19 12:28:33 2021 daemon.info hostapd: wlan1: STA a0:41:47:xx:xx:xx IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)

could this help?

anyways, after having had leaks, when the state of radio 1 goes from no client connected to 1 client connected, the free memory level goes up a couple of megabytes

This unfortunately means that for now, with this build, this is not a stable enough solution for me.

I am willing to test any new build (as long as I have a bit of time on my hands) to help the openwrt dev on this.