OpenWrt support for Linksys MX4200

If you're already on openwrt, then it's sysupgrade.

Otoh, if you're on stock then it's the factory image.

1 Like

I got another LN1301 . By default the OEM firmware 2GHZ bandwidth is 40MHz as seen after the first power on. I cant manage to get that on Lytr's build on my other two LN1301, it stays at 20MHz (I am using AX only)

After reading through all the posts, hopefully this will help clear up some confusion.

There are two variants of the LN1301 router: Homewrk and MX4300. They have different bootlog, u-boot environments, and mtd maps and requires different OpenWRT builds. DO NOT rely on the labels on your device or shipping box to determine which one you have.

If your original firmware looks like this: OpenWrt support for Linksys MX4200 - #1332 by wmd, then your router is a MX4300.

If your original firmware looks like this: OpenWrt support for Linksys MX4200 - #1190 by Tour, then your router is a Homewrk.

lytr has built OpenWRT images for both variants here: https://github.com/testuser7/openwrt/releases. The file names contain the variant that they support ("homewrk", "mx4300", "mx4200v1", and "mx4200v2"). We are hopeful lytr's changes will be accepted into the main OpenWRT repository.

qosmio has developed a version with NSS, which offloads the network processing from the CPUs onto qualcomm proprietary cores. The NSS code currently only supports the MX4300 variant. arix has set up a repository with releases from both qosmio's NSS code and lytr's MX4300 code: https://github.com/arix00/openwrt-mx4300/releases. Due to the proprietary nature of the NSS code, we don't expect the changes to be accepted in the main OpenWRT repository.

Finally, installation instructions are:

  1. Open Linksys Web UI - http://192.168.1.1/ or http://10.65.1.1/ depending on your setup.
  2. Login with your admin password. The default password can be found on a sticker under the device.
  3. To enter into the support mode, click on the “CA” link and the bottom of the page.
  4. Open the “Connectivity” menu and upload the squash-factory image with the “Choose file” button.
  5. Click start. Ignore all the prompts and warnings by click “yes” in all the popups.
  6. The Wifi radios are turned off by default. To configure the router, you will need to connect your computer to the LAN port of the device.

If you don't have a graphical interface,

  1. Connect the router to the internet.
  2. SSH into the router: ssh 192.168.1.1
  3. Run opkg update && okpg install luci

The router has 2 firmware partitions. The above instructions will upload the OpenWRT firmware to your current partition and you can use that without modifying the second partition. If you want to load the OpenWRT onto the second partition, the instructions are:

  1. SSH into the router: ssh 192.168.1.1
  2. Check booted partition, by running: fw_printenv -n boot_part
  3. SCP the squashfs-factory.bin onto the router.
  4. If that command returns a "1", then you can install OpenWRT onto the alternate partition by running:
    mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin alt_kernel
  5. If that command returns a "2", then you can install OpenWRT onto the primary partition by running:
    mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin kernel

If you mess up a partition, you can switch to the other one by power cycling the devices 3 times with less than 5 seconds between each power cycle.

If you want to go back to the original firmware at any point, you can download it here: https://linksys.happyfox.com/kb/article/1003-en/

Hopefully this helps someone and let me know if I got something wrong and I'll change it.

12 Likes

Arix already has GitHub for it.

1 Like

[ 5.357947] adpt_hppe_uniphy_mode_set[1398]:INFO:ssdk doesn't support mode:0 in uniphy:0 on platform!

Hm, this is rather weird

Well, I believe(untested) current all flashes go to other partition instead of current one. This including stock rom and openwrt. So if you want to keep stock rom for whatever reason, better always do upgrade from linksys side, this can be done from openwrt by setting "boot_part" and reboot.

PR for in place upgrade by lytr:

And, is there better way to switch to openwrt from stock rom, other than 3 power-cycle?

2 Likes

I having an issue where my vlan's are not getting internet on @qosmio build

Here is the relevant network config

config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
option ipv6 '0'

config device
option name 'br-lan.1'
option type '8021q'
option ifname 'br-lan'
option vid '1'
option ipv6 '0'

config bridge-vlan 'vlan_lan'
option device 'br-lan'
option vlan '1'
list ports 'lan1:u*'
list ports 'lan2:u*

config interface 'lan'
option device 'br-lan.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option delegate '0'

The ip assignment etc works just fine and the router itself can reach internet

Note : have not put in all the bland here and also the same works on @lytr build.

Does anyone have any idea ? Without vlan internet works.

Any help is appreciated!

For me main benefit of using @qosmio's build at this point is new drivers and hopefully other fixes which have not made it upstream. E.g. I see fewer nl80211: kernel reports: key addition failed on it (so far)

But ultimately I'm hoping for the fix for https://github.com/openwrt/openwrt/issues/13726.

BTW, in my testing it is a bit slower than @lytr's build - I could do 800Mbps there, and only 700 on the 9/11 snapshot from NSS branch.

1 Like

Thank you - let me try it tonight

Thanks let me try. I had no clue nss does not work with standard bridge vlan

The same is reported for all devices from this thread:

  • MX4200v1:
[    0.000000] Linux version 6.6.32 (srvadmin@vmbookworm) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 r26617-f4d6c1f5a5) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 SMP PREEMPT Sat Jun  8 19:40:00 2024
[    0.000000] Machine model: Linksys MX4200v1
...
[    4.314324] ssdk_dt_parse_interrupt[934]:INFO:intr-gpio does not exist
[    4.539921] adpt_hppe_uniphy_mode_set[1398]:INFO:ssdk doesn't support mode:0 in uniphy:0 on platform!
[    4.540079] regi_init[2525]:INFO:Initializing HPPE Done!!
[    4.548206] regi_init[2574]:INFO:qca-ssdk module init succeeded!
[    4.555696] EDMA ver 1 hw init
[    4.559836] EDMA HW Reset completed succesfully
[    4.562489] Num rings - TxDesc:1 (23-23) TxCmpl:1 (7-7)
[    4.566884] RxDesc:1 (15-15) RxFill:1 (7-7)
[    4.572478] dp2: ppe offload disabled: 0 for macid 2
[    4.576256] dp2: Switch attached to macid 2 status: 0
[    4.736711] Qualcomm QCA8075 90000.mdio-1:01: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:01, irq=POLL)
[    4.737560] dp3: ppe offload disabled: 0 for macid 3
[    4.745612] dp3: Switch attached to macid 3 status: 0
[    4.803337] Qualcomm QCA8075 90000.mdio-1:02: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:02, irq=POLL)
[    4.804178] dp4: ppe offload disabled: 0 for macid 4
[    4.812239] dp4: Switch attached to macid 4 status: 0
[    4.870310] Qualcomm QCA8075 90000.mdio-1:03: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:03, irq=POLL)
[    4.871134] dp5: ppe offload disabled: 0 for macid 5
[    4.879206] dp5: Switch attached to macid 5 status: 0
[    4.937313] Qualcomm QCA8075 90000.mdio-1:04: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:04, irq=POLL)
  • MX4200v2
[    0.000000] Linux version 6.1.71 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r24775-04ed95d1f9) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Mon Jan  8 07:30:09 2024
[    0.000000] Machine model: Linksys MX4200v2
...
[    4.091992] ssdk_dt_parse_interrupt[916]:INFO:intr-gpio does not exist
[    4.159551] malibu_phy_api_ops_init[1934]:INFO:qca probe malibu phy driver succeeded!
[    4.472668] adpt_hppe_uniphy_mode_set[1346]:INFO:ssdk doesn't support mode:0 in uniphy:0 on platform!
[    4.472817] regi_init[3603]:INFO:Initializing HPPE Done!!
[    4.480968] regi_init[3662]:INFO:qca-ssdk module init succeeded!
[    4.488756] EDMA ver 1 hw init
[    4.492546] EDMA HW Reset completed succesfully
[    4.495224] Num rings - TxDesc:1 (23-23) TxCmpl:1 (7-7)
[    4.499645] RxDesc:1 (15-15) RxFill:1 (7-7)
  • MX4300
[    0.000000] Linux version 6.6.41 (ohusain@ubuntu2004podman.lattice-lm) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 r27001-bdc3d4e4b6) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 SMP Sun Jul 28 19:49:28 2024
[    0.000000] Machine model: Linksys MX4300
...
[    3.159463] ssdk_dt_parse_interrupt[941]:INFO:intr-gpio does not exist
[    3.458175] adpt_hppe_uniphy_mode_set[1398]:INFO:ssdk doesn't support mode:0 in uniphy:0 on platform!
[    3.458332] regi_init[2525]:INFO:Initializing HPPE Done!!
[    3.466473] regi_init[2574]:INFO:qca-ssdk module init succeeded!
[    3.474324] EDMA ver 1 hw init
[    3.478063] EDMA HW Reset completed succesfully
[    3.480736] Num rings - TxDesc:1 (23-23) TxCmpl:1 (7-7)
[    3.485143] RxDesc:1 (15-15) RxFill:1 (7-7)
[    3.490719] dp2: ppe offload disabled: 0 for macid 2
[    3.494532] dp2: Switch attached to macid 2 status: 0
[    3.694880] Qualcomm QCA8075 90000.mdio-1:01: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:01, irq=POLL)
[    3.695856] dp3: ppe offload disabled: 0 for macid 3
[    3.703772] dp3: Switch attached to macid 3 status: 0
[    3.784458] Qualcomm QCA8075 90000.mdio-1:02: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:02, irq=POLL)
[    3.785444] GMAC4(ffffff8003b4b900) Invalid MAC@ - using 16:65:6a:0d:4d:d9
[    3.793351] dp4: ppe offload disabled: 0 for macid 4
[    3.800227] dp4: Switch attached to macid 4 status: 0
[    3.884448] Qualcomm QCA8075 90000.mdio-1:03: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:03, irq=POLL)
[    3.885397] GMAC5(ffffff800393d900) Invalid MAC@ - using 06:9a:51:49:92:c2
[    3.893355] dp5: ppe offload disabled: 0 for macid 5
[    3.900215] dp5: Switch attached to macid 5 status: 0
[    3.984460] Qualcomm QCA8075 90000.mdio-1:04: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:04, irq=POLL)

I'm pulling my hair out trying to get DHCP working over an 802.11s mesh with a fresh build of @qosmio's MX4300 branch. Are there any extra steps or tricks here? I'm using a fresh install on two MX4300s with the 03-uci-defaults script to set everything up. Everything works great except clients don't respond to DHCPOFFER only when they are connected to the mesh node. DHCP works fine if connected to the primary router node or if I connect the mesh node via ethernet instead of wireless/802.11s.

Also, clients connected to the mesh node work fine if a static IP is set. I've run a tcpdump on the client and I can see only the discover and offer packets. I've also compared both the discover and offer packets when connected to the mesh node and when connected to the main router node, and they are identical other than timestamp and ID.

There are no other DHCP servers on the network, verified by tcpdump. In fact the network right now consists of the main router node, the mesh node with DHCP disabled, and a client. Not even a wan connection while I troubleshoot this. OpenWRT logs don't show any errors, just an endless cycle of DHCPDISCOVER / DHCPOFFER.

I have no idea what else to explore or try. Everything looks to be setup correct, but clients just ignore the DHCP offers and resend the discover request.

Reminder that this is a developer thread in the "For Developers" forum.

Do not ask for support here unless you are an experienced tester.

This is for the ongoing work related to getting these devices up and working, not for entry-level first-timer noob issues. If you need configuration help, go make a new thread.

First timers should NOT be posting here asking for basic configuration help.

1 Like

In the world of software, ‘newer’ doesn’t always mean ‘better.’ :slight_smile:

Some people experience Wi-Fi issues with the ath11k firmware/driver version in the vanilla OpenWrt, while others face problems with the newer ath11k firmware/driver versions in qosmio’s NSS-enabled builds. Wi-Fi clients definitely contribute to these issues, so it’s different for everyone. Use the build that works best for your environment. With my quick tests, MX4300 (running non-NSS image) can reach up to 850 Mbps with software offloading enabled.

1 Like

@arix thanks for your work! After two days of testing I think the wireless part is very good. However, is it possible to set up a GitHub Action that uses the official stable release of OpenWrt with the latest mx4300 and NSS patches? I was trying to install Docker CE but it says the kernel version is not compatible.

MX4300 is only supported in OpenWrt master (kernel 6.6). It's not supported in the official stable release OpenWrt 23.05.x.

You have to build your own image with Docker CE package using qosmio's repo.

Then we can only resort to dumping the QCA807x registers.

I would start by dumping registers 0x0-0x16, then 0x1a to 0x1f

OK, didn't expect to get called names for trying to report an issue I observed testing the NSS fork for this hardware and see if others observed/fixed the same. I was trying to contribute to "getting these devices up and working" as you said. A new forum account doesn't mean that I'm not experienced developing for, building, testing, and deploying OpenWRT.

At least on the MX4300 units I have, with @qosmio's NSS fork, DHCP over 802.11s (and WDS) is broken in a weird way and system logs + tcpdump don't yield any clues. The same very simple config works on builds I have made from @lytr's branch (and on other devices running 23.05). I'm not looking for "basic configuration help".

1 Like

@flyingdida Can you run this command (with connected ethernet cable):

echo "      0x01   0x02   0x03   0x04"; for i in $(seq 0 31); do printf '0x%x ' $i; for j in $(seq 1 4); do echo -n "$(mdio 9* phy $j $i) "; done && echo ""; done

?

You can use this new build: https://github.com/testuser7/openwrt/releases/tag/qualcommax-d440c8c

Can someone else run the same command on MX4300? This build include mdio-tools package.