What's new

MerVLAN v0.52.1 (dev 0.52.6) Simple and Powerful VLAN Management **BETA**

First i have some questions:
Did you get an "unsupported" popup when reloading in 0.52.5?

The new feature affecting you makes easier to track these kind of bugs from now on. The ui bug should be fixed now and this is probably a profile problem.

You can test this easily. (in 0.52.5)

Run
Code:
nano /tmp/var/wwwext/mervlan/settings/settings.json

Scroll down to the hardware section.
First check if it says:
"PRODUCTID": "Unsupported"
Then test to change MAX LAN to something else, like 8.
Press ctrl+x, y, then enter to save.

Then reload the UI and see if this changes the amount of ports.

If so, this is only that the model wasnt loaded and an easy fix.

Also, everytime you update the addon a backup is made. You can access and restore these by either running:

These two commands:
Code:
cd /jffs/addons/mervlan/functions

./update_mervlan restore
Or this command:
Code:
(sh /jffs/addons/mervlan/functions/update_mervlan.sh restore)
Make sure to include the ( ) if you use the oneliner.

Just follow the instructions and choose one of up to three saved backups.
@r80xcore

Hi!

Good guess, effectively, i attempted an update from my franken v0.52.4 from the gui and get back to v0.52.5.

As you guessed, there was someting wrong in the hardware detection:

Code:
"Hardware": {
"_description": "Detected hardware profile (auto-generated by hw_probe.sh; do not edit)",
"MODEL": "UNSUPPORTED",
"PRODUCTID": "RT-AC86U",
"MAX_SSIDS": "3",
"RADIOS": ["2.4", "5g-1"],
"GUEST_SLOTS": "3",
"ETH_PORTS": ["eth1", "eth2", "eth3"],
"LAN_PORT_LABELS": ["LAN1", "LAN2", "LAN3"],
"WAN_IF": "eth0",
"MAX_ETH_PORTS": "3"
}

This effectively makes the gui having just 3 ssids and 3 lan ports

Previously with v0.52.4, i had someting like this:

Code:
"Hardware": {
"_description": "Detected hardware profile (auto-generated by hw_probe.sh; do not edit)",
"MODEL": "AC86U",
"PRODUCTID": "RT-AC86U",
"MAX_SSIDS": "8",
"RADIOS": ["2.4", "5g-1"],
"GUEST_SLOTS": "3",
"ETH_PORTS": ["eth4", "eth3", "eth2", "eth1"],
"LAN_PORT_LABELS": ["LAN1", "LAN2", "LAN3", "LAN4"],
"WAN_IF": "eth0",
"MAX_ETH_PORTS": "4"
}

It looks like v0.52.5 cannot detect my router correctly anymore, like the previous version can...
I have just manually edited the hardware version with what was detected in previous version and after a reboot, the patched v0.52.5 now displays everything correctly.
It looks basically that it works, but v0.52.5 has some additionnal glitches i didn't get with v0.52.4 (at least maybe i need to "torture" v0.52.4 more). The timing with the save/apply vlan operations is much slowlier now than before (guessing of multiple ap support, but i am only editing in the 1st one single acces point setup). And sometimes there seems to have 2 page refresh after and operation which could be very delayed from each others. I got things like the vlan for a lan port was 222, just changed it to 333, save it. Waits a while for the refresh, apply the vlan. Did not change, and a refresh later, the gui revert to the previous vlan port by itself 222. (and brctl show previous vlan config) So i still think v0.52.4 is more stable. But i will continue testing the previous version to make sure that was not a coincidence...

FYI: i never got any unsupported popup at all (at least i did not see it if it was there)...
 
@r80xcore

Hi!

Good guess, effectively, i attempted an update from my franken v0.52.4 from the gui and get back to v0.52.5.

As you guessed, there was someting wrong in the hardware detection:

Code:
"Hardware": {
"_description": "Detected hardware profile (auto-generated by hw_probe.sh; do not edit)",
"MODEL": "UNSUPPORTED",
"PRODUCTID": "RT-AC86U",
"MAX_SSIDS": "3",
"RADIOS": ["2.4", "5g-1"],
"GUEST_SLOTS": "3",
"ETH_PORTS": ["eth1", "eth2", "eth3"],
"LAN_PORT_LABELS": ["LAN1", "LAN2", "LAN3"],
"WAN_IF": "eth0",
"MAX_ETH_PORTS": "3"
}

This effectively makes the gui having just 3 ssids and 3 lan ports

Previously with v0.52.4, i had someting like this:

Code:
"Hardware": {
"_description": "Detected hardware profile (auto-generated by hw_probe.sh; do not edit)",
"MODEL": "AC86U",
"PRODUCTID": "RT-AC86U",
"MAX_SSIDS": "8",
"RADIOS": ["2.4", "5g-1"],
"GUEST_SLOTS": "3",
"ETH_PORTS": ["eth4", "eth3", "eth2", "eth1"],
"LAN_PORT_LABELS": ["LAN1", "LAN2", "LAN3", "LAN4"],
"WAN_IF": "eth0",
"MAX_ETH_PORTS": "4"
}

It looks like v0.52.5 cannot detect my router correctly anymore, like the previous version can...
I have just manually edited the hardware version with what was detected in previous version and after a reboot, the patched v0.52.5 now displays everything correctly.
It looks basically that it works, but v0.52.5 has some additionnal glitches i didn't get with v0.52.4 (at least maybe i need to "torture" v0.52.4 more). The timing with the save/apply vlan operations is much slowlier now than before (guessing of multiple ap support, but i am only editing in the 1st one single acces point setup). And sometimes there seems to have 2 page refresh after and operation which could be very delayed from each others. I got things like the vlan for a lan port was 222, just changed it to 333, save it. Waits a while for the refresh, apply the vlan. Did not change, and a refresh later, the gui revert to the previous vlan port by itself 222. (and brctl show previous vlan config) So i still think v0.52.4 is more stable. But i will continue testing the previous version to make sure that was not a coincidence...

FYI: i never got any unsupported popup at all (at least i did not see it if it was there)...
I cant thank you enough for testing this and trying to debug it. It really helps me!

I have found one of the problem and its coming from the actual update. When i wrote this (quite long ago) the settings.json was quite barebone. Now when the addon has expanded it contains a lot more sections and keys. The update copies the json and then restores it afterwards. That wasnt a problem before but is now as it essentially removes key needed for the addon to function properly.

Im currently working on making the update function merge the keys instead.
After this i am going to take a look at why your model reports as unsupported. Though this is good in a way, as it meant that we actually detect a unsupported model, i must have missed a character or something in your model, making it miss it.

I'll keep you posted!
 
@r80xcore

"It looks basically that it works, but v0.52.5 has some additionnal glitches i didn't get with v0.52.4 (at least maybe i need to "torture" v0.52.4 more)."

After reverting with my v0.52.4 backup using your procedure (much more easier to do this way!) i tortured it a lot more. Yes it has a couple similar glitches than v0.52.5 but maybe not so easy to get them (because of the dynamic changes in the newer version to deal will mult AP)? As v0.52.4 looks more responsive to operations than v0.52.5 (illusion?)

Thanks
 
@r80xcore
Once fully uninstalled, is there any way to reinstall offline using a locally backup of a specific version (i assume there is one). I did not inspect all of your scripts, i just ask if i could simply extract a couple of scripts from the backup, and then force a full install from that backup (after completly restarting the router from zero and default configuration, after any problematic situation with the router), reinstalling offline would be usefull.

Thanks
 
@r80xcore
Hi!

By testing with v0.52.4 (i guess it could be similar with the newer one). If you create a vlan, apply it on the network manually, reboot etc, nothing looks strange. But once you start to enable the service so it automatically configures on next reboot, this will cause some side effect to the web interface (there seems not to be there when the service is not enable and you play with it manually for the current active session only): after a few minutes (i didn't get a chrono to measure exactly how many), the router web gui interface is forced to logoff of its current active session (even if i set the gui to automatically logoff only after a long period, 30mn for example)! As soon as i disable the service from mervlan, this thing never appears again (so it should be triggered with something related to the service activity)...

I don't understand yet using "Persistent: On" option: what will this change in mervlan operations (except that i understand that this will save some information in the router nvram)?

Thanks
 
@r80xcore
Hi!

By testing with v0.52.4 (i guess it could be similar with the newer one). If you create a vlan, apply it on the network manually, reboot etc, nothing looks strange. But once you start to enable the service so it automatically configures on next reboot, this will cause some side effect to the web interface (there seems not to be there when the service is not enable and you play with it manually for the current active session only): after a few minutes (i didn't get a chrono to measure exactly how many), the router web gui interface is forced to logoff of its current active session (even if i set the gui to automatically logoff only after a long period, 30mn for example)! As soon as i disable the service from mervlan, this thing never appears again (so it should be triggered with something related to the service activity)...

I don't understand yet using "Persistent: On" option: what will this change in mervlan operations (except that i understand that this will save some information in the router nvram)?

Thanks
Right now Persistent doesn't do anything. If you set it to "on" the mervlan_manager.sh will translate that off. There is code for using this for AP and some other stuff but after much testing it turned out to pose problems on some users devices. I chose to ditch it (temporarily at least) until I have the time to test it more thoroughly. At the current state, the health-service takes care of any drops anyway. I have not decided yet if i want to venture down the road on that feature or skip it.
@r80xcore
Once fully uninstalled, is there any way to reinstall offline using a locally backup of a specific version (i assume there is one). I did not inspect all of your scripts, i just ask if i could simply extract a couple of scripts from the backup, and then force a full install from that backup (after completly restarting the router from zero and default configuration, after any problematic situation with the router), reinstalling offline would be usefull.

Thanks
No, not right now. A full uninstall will and should nuke mervlan from the router.
@r80xcore

"It looks basically that it works, but v0.52.5 has some additionnal glitches i didn't get with v0.52.4 (at least maybe i need to "torture" v0.52.4 more)."

After reverting with my v0.52.4 backup using your procedure (much more easier to do this way!) i tortured it a lot more. Yes it has a couple similar glitches than v0.52.5 but maybe not so easy to get them (because of the dynamic changes in the newer version to deal will mult AP)? As v0.52.4 looks more responsive to operations than v0.52.5 (illusion?)

Thanks
I tracked down the reason for your LAN and SSIDs disappearing and it turned out that i had accidentally removed the profile for your model. This explain why you have had that "bug" (my bad). It will be back in the next update.

I have also tracked down some other bugs connected to the updater and have patched it to merge the settings.json instead of copy it. This preservers the settings while also allowing the json to gradually grow. For the next update i will provide a transition command that will update the router to 0.52.6 without trashing the json. After that the updates should work as intended. The missing json values is probably the reason for you buggy UI. The UI is heavily json driven.

The next update will focus a lot on the SSH part of the addon. It will centralize all SSH commands and also have a much sturdier build around that to make sure the addon doesn't stall if a node/AP is offline or improperly configured. What this means is that future changes to the SSH functions can be changed on one place instead of in all scripts.
The execute_nodes.sh will also use parallel execution with a local guard on the nodes/AP to tell the main when to continue.
 
@mistermoonlight1
mervlan v0.52.6
IMPORTANT: TRANSITION UPDATE FOR EXISTING INSTALLATIONS
========================================================
If you are updating from v0.52.5 or earlier, you MUST use one of the
following commands to update. This is required because the update process
now includes settings.json migration logic that older versions do not have.

DO NOT use the GUI update button for this version. Run one of these in SSH:

OPTION 1 - Download dependencies first, then update (recommended):
Code:
/usr/sbin/curl -fsL --retry 3 "https://raw.githubusercontent.com/r80xcore/mervlan/dev/settings/lib_json.sh" -o "/jffs/addons/mervlan/settings/lib_json.sh" && \
/usr/sbin/curl -fsL --retry 3 "https://raw.githubusercontent.com/r80xcore/mervlan/dev/settings/lib_ssh.sh" -o "/jffs/addons/mervlan/settings/lib_ssh.sh" && \
/usr/sbin/curl -fsL --retry 3 "https://raw.githubusercontent.com/r80xcore/mervlan/dev/settings/var_settings.sh" -o "/jffs/addons/mervlan/settings/var_settings.sh" && \
/usr/sbin/curl -fsL --retry 3 "https://raw.githubusercontent.com/r80xcore/mervlan/dev/settings/log_settings.sh" -o "/jffs/addons/mervlan/settings/log_settings.sh" && \
/usr/sbin/curl -fsL --retry 3 "https://raw.githubusercontent.com/r80xcore/mervlan/dev/functions/update_mervlan.sh" -o "/jffs/addons/mervlan/functions/update_mervlan.sh" && \
chmod 0644 /jffs/addons/mervlan/settings/lib_json.sh /jffs/addons/mervlan/settings/lib_ssh.sh /jffs/addons/mervlan/settings/var_settings.sh /jffs/addons/mervlan/settings/log_settings.sh && \
chmod 0755 /jffs/addons/mervlan/functions/update_mervlan.sh && \
/jffs/addons/mervlan/functions/update_mervlan.sh update dev
OPTION 2 - Run update twice (if OPTION 1 should fail, second run uses new updater):
Code:
/jffs/addons/mervlan/functions/update_mervlan.sh update dev && /jffs/addons/mervlan/functions/update_mervlan.sh update dev
The first run downloads the new files, the second run uses the new updater
which properly migrates your settings.json to the new format.

After this update, future updates can use the normal GUI update button.

If you used the GUI update button to update to the newest dev update, manually update via the CLI once.
Code:
/jffs/addons/mervlan/functions/update_mervlan.sh update dev
========================================================
This update focuses on stability improvements, fixing event loop issues,
adding interface detection for the VLAN client viewer, improving the
SSH wrapper for more reliable node communication, save verification
reliability, UI layout fixes, and proper hardware value detection.

This update also addresses the intermittent auto-logout issue that could
occur after saving settings. The fix ensures save actions use a sandboxed
iframe target that bypasses ASUS firmware's automatic page refresh behavior.


UPDATED FILES:

index.html
- Added interface badges in VLAN client viewer showing SSIDs, access ports, and trunks.
- Updated clients panel to expand and fill available viewport space.
- Added friendly node name display using aliases (e.g., "Living Room AP (192.168.1.100)").
- Replaced fixed 5500ms save verification timer with intelligent polling.
- New waitForSettingsToMatch() polls settings.json until managed keys match expected values.
- Added no-cache fetch headers (cache: "no-store", Cache-Control, Pragma) to prevent stale reads.
- Added helper functions: normalizeToFlatSettings, extractManagedKeys, shallowEqual, fetchSettingsObjNoStore.
- loadSettings() now calls refreshHwSettingsFromCache() to detect hardware value changes.
- If MAX_SSIDS, MAX_ETH_PORTS, or node MAX_ETH_PORTS changed, tables regenerate automatically.
- Moved trunk toggle checkbox to appear after "LAN X" label (prevents overlap with PRODUCTID badge).
- LAN row template now orders: PRODUCTID badge → LAN label → Trunk toggle.

vlan_index_style.css
- Added interface badge styles (.iface-ssid, .iface-access, .iface-trunk, etc.).
- Updated cli-shell and clients-panel to support dynamic height expansion.

vlan_form_style.css
- Trunk toggle now positioned on right side of LAN label cell (right:0 instead of left:0).
- Added padding-right to .lan-label-wrap to accommodate right-aligned trunk toggle.
- Changed .lan-trunk-inline to flex-direction:column for vertical stacking of T/U fields.
- Trunk config now expands row height instead of overflowing horizontally.

mervlan.asp
- Added loading overlay guard to prevent ASUS firmware from dismissing loading screen early.
- New window._mvmHoldLoadingFor(ms) blocks hideLoading() calls until minimum time passes.
- Fixed showLoadingSafe() to pass duration hint (seconds) to ASUS showLoading().
- MVM_exec now calls _mvmHoldLoadingFor() before showing loading overlay.
- Added save_vlanmgr, executenodes_vlanmgr, executenodesonly_vlanmgr to MVM_NO_REFRESH set.

collect_clients.sh
- Fixed background job wait logic that could fail on BusyBox non-interactive shells.
- Replaced unreliable 'jobs -p' with /proc-based PID tracking for parallel node collection.
- Added explicit wait calls to collect exit codes from background jobs.

collect_local_clients.sh
- Added interface detection for each VLAN bridge (SSIDs, access ports, trunk ports).
- New functions to classify interfaces and detect trunk port configurations.
- Filters out internal switch fabric interfaces (eth0) from display.
- Added cleanup trap for temporary files.

execute_nodes.sh
- Migrated all SSH calls to use the new merv_ssh_exec wrapper with retries and timeouts.
- Added parallel execution of VLAN manager on all nodes and main router.
- Added completion marker verification to confirm node execution succeeded.
- Separated collection phase to run after all nodes complete.

heal_event.sh
- Removed httpd from healable events to prevent GUI logoff loops.
- Added self-restart marker check with expiry timestamp to prevent event loops.
- Changed mismatch detection to require persistence across 3 checks (10s window).

hw_probe.sh
- Fixed model naming to use full product IDs (RT-AX86U instead of AX86U).
- Added RT-AC86U support entry.

mervlan_boot.sh
- Migrated all SSH calls to use merv_ssh_exec wrapper.
- Updated node IP parsing to return node_id and ip pairs.
- Improved logging with node ID prefixes.

mervlan_manager.sh
- Added --no-collect flag for parallel execution mode.
- Added node detection and completion marker creation for nodes.
- Added stale self-restart marker cleanup at startup.
- Creates self-restart marker before service restarts to prevent heal loops.

service-event-handler.sh
- Excluded httpd events from wildcard patterns to prevent event floods.
- Added secondary filter to catch httpd events that slip through *restart* pattern.
- Added handler-level debounce (5s) for system events.

sync_nodes.sh
- Migrated all SSH calls to use merv_ssh_exec wrapper with retries and timeouts.
- Improved logging with node ID prefixes (NODE1, NODE2, etc.).
- Fixed enable_jffs_and_reboot to handle connection drop during reboot.

update_mervlan.sh
- Added settings.json merge helper to preserve user values during updates.
- Skips Hardware section during merge to allow fresh hardware detection.
- Improved remote cleanup with proper SSH wrapper usage.

save_settings.sh
- Now reads MAX_ETH_PORTS from nested Hardware section using json_get_hw_int().
- Fixed MAX_ETH_PORTS variable assignment so it's properly set before logging.
- MAX_TRUNK_PORTS correctly inherits from MAX_ETH_PORTS when not explicitly set.

lib_json.sh
- Added json_set_section_value() for updating keys inside nested sections.
- Added json_set_section2_value() for two-level nested section updates.
- Added json_get_hw_value() for reading keys from nested Hardware section.
- Added json_get_hw_int() for reading integer values from Hardware section with validation.
- Both new getters use json_extract_hardware_section() to parse nested structure.

lib_ssh.sh
- Added comprehensive SSH wrapper functions with 3 retries and hard timeouts.
- New merv_ssh_exec() handles precheck, retries, timeout, and error classification.
- New merv_ssh_precheck() validates IP, keys, and ping before SSH attempt.
- New merv_ssh_test() and merv_ssh_skip_log() helper functions.
- Added _merv_timeout_run() for BusyBox timeout support.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top