What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Asuswrt-Merlin Change Operation Mode Fails via NVRAM Variables

garycnew

Senior Member
All:

I'm in the process of migrating existing Asus AiMesh Nodes to Asus Access Points. The WebUI presents with the error, "Unable to connect to the Parent AP. Ensure that your AiMesh router has been powered on. Reboot your AiMesh router and try again." I am able to successfully SSH into the existing Asus AiMesh Nodes.

I found this post that suggests how to change the Operation Mode via NVRAM variables:


Code:
Router Mode: sw_mode=1 | wlc_express=0 | wlc_psta=0
Repeater Mode: sw_mode=2 | wlc_express=0 | wlc_psta=0
AP Mode: sw_mode=3 | wlc_express=0 | wlc_psta=0
Media Bridge Mode: sw_mode=3 | wlc_express=0 | wlc_psta=1
AiMesh Mode: sw_mode=3 | wlc_express=0 | wlc_psta=2

However, after changing the NVRAM variable from wlc_psta=2 to wlc_psta=0, committing the change, and rebooting--I continue to receive the previously mentioned WebUI error. The same error still persists, if I try changing to Router Mode (sw_mode=1).

Any idea what I might be doing incorrectly?

Thank you for your assistance.

Respectfully,


Gary
 
Last edited:
Why you always do things in a hard way? Just reset and reconfigure in WebUI. AiMesh node doesn't have any configuration to preserve or worry about anyway.
 
Why you always do things in a hard way? Just reset and reconfigure in WebUI. AiMesh node doesn't have any configuration to preserve or worry about anyway.
I have a number of custom configs and scripts that would be more easily kept intact by simply changing Operation Modes.

I suppose it all comes down to whether a firmware upgrade overwrites the /jffs partition?

I've made backups of nvram and /jffs.

Perhaps, I just like pushing @Tech9 buttons? :p
 
One of my buttons you pushed some time ago triggered a warning message in my logs. As you know I retain logs for a long time. Now I'm monitoring the source IP activity. :cool:
 
@Tech9

I thought you were a proponent of a No Logs Policy? It seems I made it onto the @Tech9 GrayList and didn't even know it. ;)

On a more serious note... Please verify whether the /jffs partition is overwritten during a firmware upgrade and I'll move on.

Thanks, again.


Gary
 
The post with the nvram variables pre-dates AiMesh.

A firmware upgrade doesn’t erase /jffs. Take a backup of /jffs before doing anything, then just factory reset the thing.
 
The post with the nvram variables pre-dates AiMesh.

A firmware upgrade doesn’t erase /jffs. Take a backup of /jffs before doing anything, then just factory reset the thing.
@dave14305

The NVRAM variables do seem to work. I noticed that when I nvram set sw_mode=1, nvram set wlc_express=0, nvram set wlc_psta=0, and reboot; it does enable the router's DHCP Server and leases a Client Address. However, the WebUI still persists with the error, "Unable to connect to the Parent AP. Ensure that your AiMesh router has been powered on. Reboot your AiMesh router and try again."

There must be another NVRAM variable that controls the WebUI Parent AP error page, but I'm not having much luck finding it.

It would be nice to understand this facet of the Operation Mode configuration, but it seems like a factory reset is quickly approaching.

Thank you for confirming that a firmware upgrade does not erase the /jffs partition. I have my nvram and /jffs backups.

Respectfully,


Gary
 
Last edited:
There must be another NVRAM variable that controls the WebUI Parent AP error page, but I'm not having much luck finding it.
What is stopping you from doing this:
- nvram show > nvram1.txt
- change it through web UI, reboot
- nvram show > nvram2.txt
- run diff on both files
Obviously some differences will be unrelated but this way you have better chance of figuring it out.

If the variable is protected it won't be in 'nvram show' output but will be in 'nvram save nvram.cfg', you will need a tool to decode it (there is python script somewhere).
I doubt non-credentials related variable would be set to protected so this probably doesn't apply here.
 
Last edited:
What is stopping you from doing this:
- nvram show > nvram1.txt
- change it through web UI, reboot
- nvram show > nvram2.txt
- run diff on both files
Obviously some differences will be unrelated but this way you have better chance of figuring it out.

If the variable is protected it won't be in 'nvram show' output but will be in 'nvram save nvram.cfg', you will need a tool to decode it (there is python script somewhere).
I doubt non-credentials related variable would be set to protected so this probably doesn't apply here.
@jacklul

What is stopping me is the inability to login to the WebUI of the Asus RT-AC66U_B1 in question (as the WebUI still thinks it's in AiMesh Mode; even though, it is assigning DHCP Client Addresses in Router Mode).

Prior to your response, I had already attempted a diff between NVRAM variables from two separate devices: An Asus RT-AC66U_B1 Access Point (FW 386.14_2) and the Asus RT-AC66U_B1 AiMesh Node (FW 384.19). However, there are roughly 2500 and 3000 NVRAM variables, respectively, for each Asus RT-AC66U_B1 (on the two different FW versions).

I believe I would need to downgrade the Asus RT-AC66U_B1 Access Point on FW 386.14_2 to 384.19 to be able to more effectively diff the NVRAM variables.

Do you happen to know whether the NVRAM variables are always archived in the same order?

I like how your analytical mind troubleshoots.

Thank you for your response.

Respectfully,


Gary
 
Last edited:
Here is a sorted, pruned diff of the Asus RT-AC66U_B1 NVRAM variables on FW 384.19 in AiMesh and Access Point Modes:
Code:
# diff -u backup-aimesh.cfg backup-accesspoint.cfg
--- backup-aimesh.cfg
+++ backup-accesspoint.cfg
@@ -283,10 +272,10 @@
-atcover_sip=1
+atcover_sip=0
@@ -304,7 +293,7 @@
-br0_ifnames=vlan1 dpsta
+br0_ifnames=vlan1 eth1 eth2
@@ -473,13 +463,11 @@
-dpsta_ifnames=eth1 eth2
+dpsta_ifnames=
-dwb_band=1
-dwb_mode=0
@@ -568,13 +555,11 @@
-http_enable=0
+http_enable=2
-httpd_handle_request=index.asp
-httpd_handle_request_fromapp=0
@@ -687,18 +672,18 @@
-lan_dns1_x=
+lan_dns1_x=192.168.0.1
-lan_dns=
-lan_dnsenable_x=1
+lan_dns=192.168.0.1
+lan_dnsenable_x=0
-lan_gateway=0.0.0.0
+lan_gateway=192.168.0.1
-lan_ifnames=vlan1 vlan2 eth1 eth2 wl0.1 wl1.1
-lan_ipaddr=192.168.1.1
+lan_ifnames=vlan1 eth1 eth2
+lan_ipaddr=192.168.0.81
@@ -713,10 +698,10 @@
-lanports=1 2 3 4
+lanports=0 1 2 3 4
@@ -825,7 +809,7 @@
-nfsd_enable=1
+nfsd_enable=0
@@ -843,7 +827,7 @@
-obdeth_Setting=1
+obd_allow_scan=0
@@ -909,12 +893,14 @@
-re_mode=1
+re_mode=0
@@ -962,8 +948,8 @@
-sshd_enable=1
-sshd_forwarding=0
+sshd_enable=2
+sshd_forwarding=1
@@ -975,7 +961,7 @@
-sta_phy_ifnames=dpsta
+sta_phy_ifnames=eth1 eth2
@@ -1096,9 +1082,9 @@
-vlan1ports=1 2 3 4 5*
+vlan1ports=0 1 2 3 4 5*
-vlan2ports=0 5
+vlan2ports=5
@@ -1452,7 +1438,7 @@
-w_apply=0
+w_apply=1
@@ -1632,7 +1616,7 @@
-wanports=0
+wanports=5
@@ -1657,36 +1641,28 @@
 webs_state_flag=0
 webs_state_update=
 webs_state_upgrade=
-webs_state_url=
 webs_update_trigger=
@@ -1845,7 +1802,7 @@
-wl0_acs_fcs_mode=1
+wl0_acs_fcs_mode=0
@@ -1859,7 +1816,7 @@
-wl0_atf=1
+wl0_atf=0
@@ -1875,12 +1832,13 @@
-wl0_closed=0
+wl0_chlist=1 2 3 4 5 6 7 8 9 10 11 12 13 14
+wl0_closed=1
-wl0_crypto=tkip+aes
-wl0_dcs_csa_unicast=1
+wl0_crypto=aes
+wl0_dcs_csa_unicast=0
@@ -1915,8 +1873,8 @@
-wl0_mfp=1
-wl0_mode=psr
+wl0_mfp=0
+wl0_mode=ap
@@ -1936,7 +1894,7 @@
-wl0_psr_mrpt=1
+wl0_psr_mrpt=0
@@ -1984,10 +1942,10 @@
-wl0_user_rssi=-80
+wl0_user_rssi=0
-wl0_vifs=wl0.1
+wl0_vifs=
@@ -2013,7 +1971,7 @@
-wl0_wmf_bss_enable=1
+wl0_wmf_bss_enable=0
@@ -2023,32 +1981,25 @@
-wl1.1_auth_mode_x=psk2
+wl1.1_auth_mode_x=open
-wl1.1_bss_enabled=1
+wl1.1_bss_enabled=0
@@ -2209,7 +2141,7 @@
-wl1_acs_fcs_mode=1
+wl1_acs_fcs_mode=0
@@ -2223,7 +2155,7 @@
-wl1_atf=1
+wl1_atf=0
@@ -2241,12 +2173,13 @@
-wl1_closed=0
+wl1_closed=1
-wl1_dcs_csa_unicast=1
+wl1_dcs_csa_unicast=0
@@ -2281,8 +2214,8 @@
-wl1_mfp=1
-wl1_mode=psr
+wl1_mfp=0
+wl1_mode=ap
@@ -2302,7 +2235,7 @@
-wl1_psr_mrpt=1
+wl1_psr_mrpt=0
@@ -2341,7 +2274,7 @@
-wl1_turbo_qam=0
+wl1_turbo_qam=1
@@ -2350,10 +2283,10 @@
-wl1_user_rssi=-80
+wl1_user_rssi=0
-wl1_vifs=wl1.1
+wl1_vifs=
@@ -2379,7 +2312,7 @@
-wl1_wmf_bss_enable=1
+wl1_wmf_bss_enable=0
@@ -2402,11 +2335,11 @@
-wl_akm=
+wl_akm=psk2
@@ -2419,7 +2352,7 @@
-wl_auth_mode_x=open
+wl_auth_mode_x=psk2
@@ -2427,27 +2360,27 @@
-wl_bw_cap=1
+wl_bw_cap=3
-wl_closed=0
-wl_corerev=
+wl_closed=1
+wl_corerev=42
-wl_country_rev=
-wl_crypto=tkip+aes
+wl_country_rev=0
+wl_crypto=aes
-wl_gmode=XSTR(GMODE_AUTO)
+wl_gmode=1
@@ -2482,8 +2415,8 @@
-wl_phytype=n
-wl_phytypes=
+wl_phytype=v
+wl_phytypes=v
@@ -2525,7 +2458,7 @@
-wl_turbo_qam=0
+wl_turbo_qam=1
@@ -2536,7 +2469,7 @@
-wl_vifnames=
+wl_vifnames=wl0.1 wl0.2 wl0.3
@@ -2545,7 +2478,7 @@
-wl_wme=auto
+wl_wme=on
@@ -2558,51 +2491,45 @@
-wl_wmf_igmpq_filter=0
-wl_wmf_mdata_sendup=0
+wl_wmf_igmpq_filter=1
+wl_wmf_mdata_sendup=1
-wl_wmf_ucigmp_query=0
+wl_wmf_ucigmp_query=1
-wl_wps_mode=enabled
+wl_wps_mode=disabled
-wlc0_auth_mode=psk2
-wlc0_crypto=tkip+aes
-wlc0_key=1
+wlc0_auth_mode=
+wlc0_crypto=
+wlc0_key=
-wlc0_sbstate=1
-wlc0_state=3
-wlc0_status=0
-wlc0_wep=0
+wlc0_wep=
-wlc1_auth_mode=psk2
-wlc1_crypto=aes
-wlc1_key=1
+wlc1_auth_mode=
+wlc1_crypto=
+wlc1_key=
-wlc1_sbstate=1
-wlc1_state=3
-wlc1_status=0
-wlc1_wep=0
+wlc1_wep=
-wlc_band=-1
+wlc_band=
-wlc_dpsta=1
+wlc_dpsta=0
-wlc_psta=2
+wlc_psta=0
@@ -2619,7 +2546,7 @@
-wps_enable_x=1
+wps_enable_x=0

Could it be as simple as nvram set http_enable=2?
Code:
-http_enable=0
+http_enable=2
 
Could it be as simple as nvram set http_enable=2?
Code:
-http_enable=0
+http_enable=2
This variable is Administration -> System -> Local Access Config -> Authentication method in the latest firmware (0 is HTTP only, 1 is HTTPS only, 2 is BOTH).

Assuming the old firmware on that device is the same as old in Merlin's repo then it's the same here:
(line 1600)

Check each difference with their defaults:

Also these files provide a lot of info when you try to figure out what nvram variable does:

It will probably take way more time to figure this out than to backup your scripts, reset and reconfigure it.
 
Last edited:
This variable is Administration -> System -> Local Access Config -> Authentication method in the latest firmware (0 is HTTP only, 1 is HTTPS only, 2 is BOTH).

Assuming the old firmware on that device is the same as old in Merlin's repo then it's the same here:
(line 1600)

Check each difference with their defaults:

Also these files provide a lot of info when you try to figure out what nvram variable does:

It will probably take way more time to figure this out than to backup your scripts, reset and reconfigure it.
@jacklul

I appreciate the guidance on decoding the NVRAM variable references.

You're right in that it will likely take longer to figure out this issue.

As an alternative to a factory reset, I tried an NVRAM reset (Holding the WPS Button for 15 seconds; when, powering up the Access Point). While it did reset the NVRAM variables, it appears to have reset the /jffs partition, too. Oh well... It's time to move forward with backups, resets, and reconfigs.

Thanks, again, for your assistance.

Respectfully,


Gary
 
If anyone stumbles across the resolution for removing the "Unable to connect to the Parent AP. Ensure that your AiMesh router has been powered on. Reboot your AiMesh router and try again" error page; after, changing the Operation Mode via the NVRAM variables... Please update this post.

Thanks to all!
 
RT-AC66U B1 instructions:

1741481514340.png
 
RT-AC66U B1 instructions:

View attachment 64280
@Tech9

Thanks for that. :rolleyes: I can only imagine the BIG Grin on your face as you posted that response. :D

No need for sarcasm. I'm moving on... With the WPS Button! :p

I've always appreciated your dry sense of humor. 😂

Have a nice weekend.

Respectfully,


Gary
 

Latest threads

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