OpenWrt support for Linksys MX4200

I wanted to install a few packages that require kmods so I built the firmware starting with @lytr's build. But since it's the my first time building openwrt I want to be safe and make sure I can recover if anything goes wrong so I want to ask a few questions before trying to update:

  1. I assume the initial installation wrote openwrt into the "second" partition (i.e. not the partition OEM firmware was running from). Is this correct? Is this also true for openwrt updates or does openwrt writes update into the same partition it runs on?
  2. If I have a working openwrt, can I switch to OEM firmware, will it boot without choking on inconsistent nvram data? Or would I need to do a reset before switching?
  3. Assuming I have OEM firmware on one partition and functional openwrt on the other - is it safer to do an upgrade from inside openwrt or to switch to OEM firmware and do a new factory install?
  4. Btw, is the @lytr's mx4300 build from August 4 the latest non-homewrk build?
    Thanks

I think this is the key, at least on the devices not running the HomeWRK firmware, installing the HomeWRK image via the LinkSys FW update page seems to be "safe" in that it's recoverable by swapping over to the alternate FW image. I had the same issue and was able to recover -- no need for serial access either.

Do yo mean that flashing the factory image (FW_MX4300_1.0.4.215382_prod.img) from Linksys on a working partition will update the other partition as well?

Whenever we update using the Linksys webif, does it update both the partitions? I would think it will flash the other partition ONLY and boot to it as that's how the phones with dual partitions work. This way, if there is any issue, it can fall back to the working partition. But, you are saying that it will flash to both the partitions?

Yes, that's the stock firmware image I used to recover my broken partition. However, I don't believe it updates both partitions. Instead, it updates the other partition only. After the update is done, it resets and boots into that partition.

Well, I setup 802.11s on two devices and the throughput is disappointing! I am getting ONLY 90 Mbps on a 500 Mbps link. The same device on a wireless mesh using the stock Linksys firmware is giving me 450+ Mbps. Bummer!

I picked radio2 as the mesh point and used AX/149 channel and picked Country code as US. Any ideas how to improve it?

If the node is sitting in the same room as the parent and it's wireless, I get almost the full 500 Mbps. I am setting up a wireless mesh only.

Steps to configure VLANs on NSS build.

Why did you delete it @arix? Not supported anymore?

I didn't try to flash back to the factory; instead I did the reboot-3-times trick, ended up back at factory FW and then re-flashed the correct OpenWRT flavor (MX4300 vs. HomeWRK). After that, everything went as smoothly as if I'd installed it correctly the first time.

If you want your nodes to connect to each other out of the box, take a look at nss-setup/example/03-uci-defaults

In the root of where you cloned the repo, create folder files/uci-defaults. Copy over nss-setup/example/03-uci-defaults here and make your custom changes to the following.

# You should start customizing from here
# Must be the same SSID for both 2G and 5G for 802.11 k/v/r
ap_2g_ssid="OpenWrt"
ap_5g_ssid="${ap_2g_ssid}"

mesh_id="OpenWrt-Mesh"
wds_ssid="OpenWrt-WDS"

ap_key="SOME_KEY"
mesh_gate_key="SOME_LONG_RANDOM_KEY"

country="US"
timezone="EST5EDT,M3.2.0,M11.1.0"
zonename="America/New York"

router="192.168.1.1"
netmask=24
lan_proto="static"
prefix="mx4300"

Scroll down and find this section:

# For Linksys MX4200/4300/5300 etc, only need to match the first 5 bytes
# of the MAC address to determine it's the same device.
# Replace 'xx:xx' with the one found on the bottom of your device.
# Add a new `elif` block for each device if needed.
if [[ "${mac}" =~ "80:69:1a:xx:xx" ]]; then
  suffix=2
  # If the node is in bridge mode and connected to a router via ethernet, or itself is a router.
  # set the following for gate announcements, rootmode and forwarding.
  mesh_gate_announcements=1
  mesh_hwmp_rootmode=2
  mesh_fwding=1
  # Only ONE of the nodes should be in ap mode if setting up WDS.
  wds_mode=ap
elif [[ "${mac}" =~ "80:69:1a:xx:xx" ]]; then
  suffix=3
  wds_mode=sta
  # it's a good idea to spread out the channels on the AP
  # to ensure they don't interfere with each other.
  # This is especially important if you have multiple APs in close proximity.
  # For 80mhz channel 48 will use channels 36-48
  ap_5g_channel=48
  ap_2g_channel=1
else
  lan_proto="dhcp"
fi

Change the first instance of 80:69:1a:xx:xx with your primary mx4300 and second instance of your "satellite". You can install the same image on both devices, and it should automatically setup your WiFi and meshing. If you ever were to add another node, simply add another elif block with the mac of the new device after the previous elif.

elif [[ "${mac}" =~ "xx:xx:xx:xx:xx" ]]; then
  # Example: if you want to use DHCP for the satellite node
  # lan_proto=dhcp
2 Likes

hey Qosmio,

my main pc connected to a main switch and most are branch off from there.
my pc is having issue with accessing the unit webui, ssh or iperf test. i tried changing to lan 1,2,3 and wan port but all the same.

if i am connected directy to the LN1301(MX4300), i can access webui, ssh and iperf3 to and from it. but not to other LN1301. this also happens to the stock firmware. is this normal or my 3 unit are defected somehow.

bottom label show model: homewrk mx4300 (ln1301)

thanks.

Is this a managed switch or dumb switch? Sounds to me like it's managed and has some form of port isolation going on, different subnets. especially if you have the issue on stock and openwrt for all 3 devices.

Thanks a ton and much appreciate it. I wasn't sure how this script will execute during the firmware installation and I guess it runs files/uci-defaults as a post script operation?

Btw, I started building on my system and it took forever and had to kill it. Since you are releasing the source, would it be possible to release the binaries too?

it is a managed switch in default settings. but the 2x e8450 openwrt and 2x asus aimesh had no issues.

That's correct, after the first boot it will run through and execute every script in /etc/uci-defaults/* in alphanumeric order, and delete each script that successfully exits. I'll add it's best to set the number higher so it runs it at the end like 99-mesh-setup. You can take a look under /rom/etc/uci-defaults/ as to what some of those scripts look like.

Based on your ouput here, you're running only defconfig in parallel with logging. Your last command should be

make V=s -j4

or to autoset based on number of CPU cores.

make V=s -j$(nproc)

My binaries actually contain a lot of custom configs that are compiled in, otherwise I would. I also tend to stay away from creating .bin public images in general as it turns into folks needing an image for device xxx, yyy, zzz and to include additional kernel modules... Gets to be a lot :sweat_smile:

1 Like

No problem. Btw, I am running lytr's build now and customized everything as I have a parent + 2 child nodes and setup 802.11s using wpad-mesh-openssl. If I were to flash your build on top of it, would I be able to retain the settings or have to start from scratch?

Also, I see that you mentioned in the script about WDS and stations but we don't need that right? I am using 802.11s and it needs Mesh ID and WPA3-SAE security along with the same channel and country code. I am confused with your WDS statements in the script?

All I need is radio0 and radio1 to be AP and radio2 to run in 802.11s mode.

Afraid I can't help much there as I'm not familiar with your exact setup.

FWIW, I have

+-------------------+      +----------------+      +--------+
| Dynalink DL-WR36X | <--> | UniFi US-150W  | <--> | MX4300 |
+-------------------+      +----------------+      +--------+

With 4 additional MX4300 nodes connected VIA mesh to the primary MX4300 with no issue.

Thanks for the pointer. Btw, I downloaded it couple of days ago and is there a command to just update the downloaded repo and start the build or do I have to clone it again?

Correct, those settings are left there in case users customize it for WDS.

It's set to disabled already on the very top

# Set to '0' to enable WDS and disable mesh
wds_disable=1

That is what the script will do by default. You really only need to worry about changing the SSID, and the encryption keys for your AP (ap_key) and mesh (mesh_gate_key).

I am attempting to compile @lytr builds from source to add the Switch Configuration Utility to setup VLANs. However, unsure what Target system to use, should I be using "Qualcomm Atheros 802.11ax WiSoC-s" as the target?

# Pull latest changes to base OpenWRT repo.
git pull

# Pull latest package updates
./scripts/feeds update

# Build kernel, package, and image after that
make V=s -j$(nproc) package/cleanup target/linux/compile package/{compile,install} target/install
1 Like