Adding OpenWrt support for Xiaomi AX3600 (Part 1)

an alternative is use openssl directly

Yes, that will work as only the first match will be used

Just opened an issue some minutes ago https://github.com/openwrt/packages/issues/20347 :yum:

2 Likes

Nice, just opened an issue on https://github.com/openwrt/asu/issues/438 while trying to AUC my image.
There were similar issues on the belkin rt3200/Linksys E8450 which resulted in renaming libwolfssl-cpu-crypto to libwolfsslcpu-crypto which resolved the issues for them (more or less).
For now i changed everything from wolfssl to mbedtls and removed libwolfsslcpu-crypto at all.

Its not an ASU issue but OpenWrt OPKG one

Upgrade to official OpenWrt from my builds.
Due name incompatibiltity of mtd11 "ubi_kernel" don't upgrade via LUCI!

0. Create backup.
1. Upload openwrt-ipq807x-generic-redmi_ax6-initramfs-factory.ubi to /tmp.
2. Flash initramfs:
ubiformat /dev/mtd11 -f /tmp/openwrt-ipq807x-generic-redmi_ax6-initramfs-factory.ubi

Then in case of no errors:

reboot

3. Download default or create your own firmware-selector.openwrt.org and upload openwrt-ipq807x-generic-redmi_ax6-squashfs-sysupgrade.bin to /tmp.
4. Flash via sysupgrade

sysupgrade -n /tmp/openwrt-ipq807x-generic-redmi_ax6-squashfs-sysupgrade.bin

Restore backup.
In file backup-*.tgz replace everywhere eth0 => wan & eth1-3 => lan1-3:

find etc/config -type f -exec sh -c "cp -a {} {}.orig && cat {}.orig | sed -r 's/\beth0\b/wan/' | sed -r 's/\beth([1-3])\b/lan\1/'>{}" \;

opgk update fails: I ust the AX 3600 as dump AP (Lan is set to static and i don`t usw the wan port)

root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/packages/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/kmods/5.15.88-1-693dfdfd34dada48430c38089716b35c/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/kmods/5.15.88-1-693dfdfd34dada48430c38089716b35c/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony/Packages.gz

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/kmods/5.15.88-1-693dfdfd34dada48430c38089716b35c/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

Successfully updated from and ancient build to the official snapshots. Massive thanks for the great work.
I am able to saturate my 1000/200 line using SW offload + packet steering. With irqbalance I can get 750mbps with SQM which I'd say is great.

Hope the new builds will be just as stable :slight_smile:

What are some other tweaks for optimizing performance? Does setting he_su_beamformer & co. do anything for wireless?

I couldn't upgrade from robimarko's 2023-01-02 build to the official one. sysupgrade / fw_setenv didn't work, both of them changed nothing and writing initramfs to mtd13 was possible, but never booted despite updating the flag_boot_rootfs to 1. My solution to upgrade was:

  • TFTPD64 Recovery to MI Stock Firmware
  • Enable SSH (see TOH AX3600 page, javascript F12 method)
  • Followed the wiki guide on openwrt.org to flash initramfs, boot it, and sysupgrade to the official snapshot release.

Everything works fine now :slight_smile:

1 Like

seems you have an network problem. Did you enter the gateway? What happens if you ping openwrt.org from router?

from the lan Zone and the wifi belonging to lan I have connection to the internet. but it seems that the update via ssh needs to have connection to the internet via wan. But then wan interface would have same IP net than Lan. Can I configure the router, that it tries to go to interent via lan interface ?

Strangely enough trying to do a sysupgrade from latest pr-final to official snapshot using Attended Sys Upgrade (ASU) also resulted in me having to tftp recover.

Only thing is that I already use OpenSSL, but noticed the cpucrypto and removed it, as part of the ASU.

I can’t take another stab over the next couple of days but I flashed back to my last working pr-final build as I didn’t have the right setup to get latest official loaded.

Strange. Might try doing an official build without removing the cpucrypto next time to make sure that removal didn’t cause issues.

Again, all other items in my builds are -openssl variants.

2 Likes

I'm actually getting the same error on both of my AX3600s after updating to a build from the latest official repo.
One is connected to the internet via the WAN port, the other is a mesh node connected over the 5GHz radio. Devices connected to each are accessible through their respective cloud services so the devices have internet connectivity.
Unfortunately, I just performed this update and did not try a opkg update before on the old version so I'm not sure if this problem is new to this build, but I can say that it has worked in the past.

Update: It's working now with no action taken on my part.

can you show your /etc/config/network config?
What happens when you do a ‚ping openwrt.org‘ on the ax3600?

Did you follow https://openwrt.org/docs/guide-user/network/wifi/dumbap for configuration?

Thanks for the hint!

Moving away from mesh-wolfssl on AX3600 helped: the instability, the packetloss went away even if I switched to wpad-mesh-openssl or the new wpad-mesh-mbedtls. :ok_hand:

The mt76/ac node uses the openssl variant, the mt76/ax node is with wolfssl. All good!

1 Like

@dimfish

What about resetting the compat_version?

Am I right in assuming that the migration path for the ax3600 is the same as for the ax6 (using the ax3600 files instead of ax6 files)?

Yes you're right you can cleanup compat_version for future updates:

uci set system.@system[0].compat_version=
uci commit
1 Like

Exactly just replace with your device name

I also had issues upgrading from a about a week ago pr build. Was already migrated to new interface names and single partition. Changed config version to 1.0 and took backup. Then attempted sysupgrade to official snapshot, which bricked the device. Had to tfpt to chinese v1.017, ssh, then write intramfs and sysupgrade latest official snapshot, then restored backup. Now build is functional, but not sure why it did not work in the first place...

There were some bricks (I had one) and robi modified the code to be sure it starts with the correct partition. Since then it seems there are not more bricks. So if you are now at the official one, the problem, in theory, is fixed. Search the thread about platform.sh and you will see the changes made.

1 Like