Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Hm, this is interesting.

Are you building from source or?

Yes, building from source. Nothing special, no patches, clean tree, just a config to include a some packages. Ubuntu 18 LTS host - in case it matters.

Diffconfig is:

CONFIG_TARGET_ipq807x=y
CONFIG_TARGET_ipq807x_generic=y
CONFIG_TARGET_ipq807x_generic_DEVICE_xiaomi_ax3600=y
CONFIG_ATH10K_LEDS=y
CONFIG_ATH10K_THERMAL=y
CONFIG_PACKAGE_ath10k-firmware-qca9887=y
# CONFIG_PACKAGE_ath10k-firmware-qca9887-ct is not set
CONFIG_PACKAGE_cgi-io=y
CONFIG_PACKAGE_cifsmount=y
CONFIG_PACKAGE_collectd=y
CONFIG_PACKAGE_collectd-mod-cpu=y
CONFIG_PACKAGE_collectd-mod-dhcpleases=y
CONFIG_PACKAGE_collectd-mod-interface=y
CONFIG_PACKAGE_collectd-mod-iwinfo=y
CONFIG_PACKAGE_collectd-mod-load=y
CONFIG_PACKAGE_collectd-mod-memory=y
CONFIG_PACKAGE_collectd-mod-network=y
CONFIG_PACKAGE_collectd-mod-ping=y
CONFIG_PACKAGE_collectd-mod-rrdtool=y
CONFIG_PACKAGE_collectd-mod-thermal=y
CONFIG_PACKAGE_collectd-mod-uptime=y
CONFIG_PACKAGE_collectd-mod-wireless=y
CONFIG_PACKAGE_etherwake=y
CONFIG_PACKAGE_gre=y
CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_iptables=y
CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
CONFIG_PACKAGE_iptables-mod-extra=y
CONFIG_PACKAGE_iptables-mod-ipopt=y
CONFIG_PACKAGE_iptables-mod-physdev=y
CONFIG_PACKAGE_iptables-nft=y
CONFIG_PACKAGE_kmod-asn1-decoder=y
CONFIG_PACKAGE_kmod-ath10k=y
# CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers is not set
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-crypto-arc4=y
CONFIG_PACKAGE_kmod-crypto-des=y
CONFIG_PACKAGE_kmod-crypto-ecb=y
CONFIG_PACKAGE_kmod-crypto-lib-blake2s=y
CONFIG_PACKAGE_kmod-crypto-lib-blake2s-generic=y
CONFIG_PACKAGE_kmod-crypto-lib-chacha20=y
CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=y
CONFIG_PACKAGE_kmod-crypto-lib-curve25519=y
CONFIG_PACKAGE_kmod-crypto-lib-poly1305=y
CONFIG_PACKAGE_kmod-crypto-md4=y
CONFIG_PACKAGE_kmod-crypto-md5=y
CONFIG_PACKAGE_kmod-crypto-sha512=y
CONFIG_PACKAGE_kmod-dnsresolver=y
CONFIG_PACKAGE_kmod-fs-cifs=y
CONFIG_PACKAGE_kmod-gre=y
CONFIG_PACKAGE_kmod-gre6=y
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-ip6-tunnel=y
CONFIG_PACKAGE_kmod-ipt-conntrack=y
CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y
CONFIG_PACKAGE_kmod-ipt-core=y
CONFIG_PACKAGE_kmod-ipt-extra=y
CONFIG_PACKAGE_kmod-ipt-ipopt=y
CONFIG_PACKAGE_kmod-ipt-physdev=y
CONFIG_PACKAGE_kmod-ipt-raw=y
CONFIG_PACKAGE_kmod-iptunnel=y
CONFIG_PACKAGE_kmod-iptunnel6=y
CONFIG_PACKAGE_kmod-nf-ipt=y
CONFIG_PACKAGE_kmod-nft-compat=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-oid-registry=y
CONFIG_PACKAGE_kmod-qca-nss-dp=y
CONFIG_PACKAGE_kmod-qca-ssdk-nohnat=y
CONFIG_PACKAGE_kmod-sched-cake=y
CONFIG_PACKAGE_kmod-sched-core=y
CONFIG_PACKAGE_kmod-udptunnel4=y
CONFIG_PACKAGE_kmod-udptunnel6=y
CONFIG_PACKAGE_kmod-wireguard=y
CONFIG_PACKAGE_libgd=y
CONFIG_PACKAGE_libip4tc=y
CONFIG_PACKAGE_libip6tc=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_libjpeg-turbo=y
CONFIG_PACKAGE_libltdl=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_liboping=y
CONFIG_PACKAGE_libpng=y
CONFIG_PACKAGE_libqrencode=y
CONFIG_PACKAGE_librrd1=y
CONFIG_PACKAGE_libsqlite3=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libuci-lua=y
CONFIG_PACKAGE_libwebp=y
CONFIG_PACKAGE_libxtables=y
CONFIG_PACKAGE_libxtables-nft=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-app-sqm=y
CONFIG_PACKAGE_luci-app-statistics=y
CONFIG_PACKAGE_luci-app-vnstat2=y
CONFIG_PACKAGE_luci-app-wireguard=y
CONFIG_PACKAGE_luci-app-wol=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-lib-base=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-mod-network=y
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-gre=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-proto-wireguard=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_nss-firmware-ipq8074=y
CONFIG_PACKAGE_open-plc-utils=y
CONFIG_PACKAGE_open-plc-utils-plcstat=y
# CONFIG_PACKAGE_procd-ujail is not set
CONFIG_PACKAGE_qrencode=y
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-luci=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_rrdtool1=y
CONFIG_PACKAGE_sqm-scripts=y
CONFIG_PACKAGE_tc-mod-iptables=y
CONFIG_PACKAGE_tc-tiny=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_vnstat2=y
CONFIG_PACKAGE_vnstati2=y
CONFIG_PACKAGE_wireguard-tools=y
CONFIG_PACKAGE_zlib=y
CONFIG_SQLITE3_DYNAMIC_EXTENSIONS=y
CONFIG_SQLITE3_FTS3=y
CONFIG_SQLITE3_FTS4=y
CONFIG_SQLITE3_FTS5=y
CONFIG_SQLITE3_JSON1=y
CONFIG_SQLITE3_RTREE=y
# CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE is not set
CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD=y
# CONFIG_PACKAGE_kmod-crypto-kpp is not set

I was just asking, cause I would suggest dropping the 410 debug patch from hostapd so that all messages are actually printed cause that patch is just stupid.

Ok, I set up AX3600 to broadcast the same BSS color and enabled debugging in ath11k, it detects the collision without an issue and I can see that one of them switched to 0x10 instead of 0x14 while the second one remained using it, AX3600 was left on the same one as its running an older version without collision detection.

Hostapd also printed the BSS collision event just fine and I can see CCA going on.

So, I would say it actually works, I will try to capture the actual CCA beacon.
Yep, CCA countdown and the new BSS color info is there so I would say it works fine.

Let me just say that wireshark is such an awesome tool, you can filter on everything and it can decode everything that is standardised

6 Likes

I think it is obvious where I switched from 5.10-restart to ipq807x-latest :slight_smile:
Nice memory gain.

Happy to report no daily use dumb AP / DNS / DHCP functionality loss seen yet. All fine.

Prebuilt images with SSDK shell and some more ath11k fixes for 160MHz DFS etc are done

12 Likes

latest release is very good, power and range similar to factory but I can't set wifi to 160hz (intel ax210 doesn't detect wifi) and speeds from home server are lower 80mb/s from factory software 102-107mb/s, free memory stays at 180mb

edit: I set the channel 64 and it works, the speed reaches 112mb/s, this is probably the final work, thank you for your work

1 Like

Good to hear that, 160MHz is a bit tricky due to small number of channels and long DFS time.
I was just about to see what was broken

Will test it next week, now I am in Graz :slight_smile:

1 Like

Nice, enjoy it.

1 Like

Testing latest version and all works like a charm, will test the speed and memory usage with some apps and report back.

Have updated my AX3600 and all seems well.
The main reason for this post was to share that running:

/etc/init.d/wpad stop

via ssh before running the upgrade (via Luci) resulted in a successful flash on 1st attempt.

2 Likes

So I picked up a new AX6 and flashed @robimarko's latest 5.15 branch to it. Everything seems to work fine, except for one thing: my Pixel 6 is refusing to work over 11ax. It connects to the network, gets an IP address, but then says there's no internet connectivity, and I can't connect to anything. Switching the router to 11ac makes everything work, somehow. The logs don't have anything interesting on either side. Any ideas?

That is what I initially thought too, but 1) the workaround did not help and 2) the device isn't actually roaming anywhere, and even a full reboot of both sides does not clear it up.

Just as a data point, I am running my own build of the latest commit (https://github.com/robimarko/openwrt/commit/f0843405871e7cf6555c0fdd09cfe550e3ff346d) since yesterday, and everything seems to be running smooth. My configuration includes a 160MHz 5GHz AX network (channel 100), a 20MHz 2.4GHz AX network (channel 11), and a 80MHz 5GHz AC network (channel 132) and all three are running fine with no issues. I have at least 3 client devices that support AX on the 5GHz AX network and they all seem to be working, even with me deleting the fixed BSS color setting now. Ever since the NAPI threading changes, I've also been able to hit like 720+ Mbps downloads even with SQM (cake) enabled.

I haven't been able to test the automatic BSS color collision detection though. If there's anything you'd like me to test though I'm happy to do so.

2 Likes


Not the latest build with bss coloring fix, but I think we can say RAM leak is fixed for good. It was around 90 MB free a few hours ago, but I saw it freeing some RAM in multiple occasions...

Router is wireguard VPN client and also running Adguard Home :slight_smile:
Also, for info:

root@AX3600_OpenWrt:~# cat /proc/softirqs
                    CPU0       CPU1       CPU2       CPU3
          HI:          0          0          0          0
       TIMER:    1133519    1245711    1425608    1263269
      NET_TX:         14         12        170         91
      NET_RX:  110524595   14172173   13752961   18671938
       BLOCK:          0          0          0          0
    IRQ_POLL:          0          0          0          0
     TASKLET:   42687435       1541        641        434
       SCHED:    2300517    2247797    2294101    1912994
     HRTIMER:          3         18          6         13
         RCU:    1414862    1247781    1131872     973052
1 Like

Is Adguard Home running on the router? Is it available in the packages?

I saw luci-app-adguard when building, but it's v0.107 so I installed from their github the edge version, with some changes:
First thing was following one of the oldest guides to install OpenWrt to have one "partition" using all the free space (Adguard binary alone is 35+ MB) - I would love to have a way to distribute the free space for both booting filesystems...

  1. Downloaded https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh to router with curl
  2. Edit the script and change cmd_sudo to '' (empty string)
  3. run "./install.sh -c edge" (it will install in /opt/AdGuardHome)
  4. To minimize writings caused by logs I moved the "data" folder to RAM:
rm -rf /opt/AdGuardHome/data
ln -vs /tmp/AdGuardHome/data /opt/AdGuardHome/data
  1. Edit /etc/init.d/AdguardHome and add in the "start_service()" section:
[ -e /opt/AdGuardHome/agh-backup ] && rm -rf /opt/AdGuardHome/agh-backup
mkdir -p /tmp/AdGuardHome/data
  1. Check in Luci -> Startup that AdGuard service is enabled (also restart it) and set it up browsing to
    ROUTER-IP:3000

Also had to config dnsmasq to disable it's DNS service, I got that reading this thread

It's all working great, I only have one little inconvenience: because I don't have the enough free space in one filesystem, always have to sysupgrade two times - meanwhile AdGuard gets broken but it's easy to restore with a settings backup (it automatically includes /opt/AdGuardHome).

2 Likes

Thank you very much for the detailed guide or else I would have to get it working through trial and error.

Can someone paste the opkg settings?

I only upgraded with sysupgrade and keep settings and it seems opkg feeds changes are not updatedf.

For example: /etc/opkg/distfeeds.conf
https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/packages

This package link isnt alive anymore..

1 Like