What's new

Asus merlin: 386.3_2 - New nvram executable produces errors in nvram save

  • 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!

Spc

Regular Contributor
I am testing latest merlin firmware.

I have 3 routers:

1. RT-AC68U
2. RT-AC86U
3. RT-AX86U

All are set as:
Operation Mode:Wireless router Firmware Version:386.3_2

Same firmware, same settings.

If i set password for wireless (without quoutes):

"ThisIsATestP4ssword "

With the space at the end.

- All routers accept this password
- On all routers everything works, full speed no errors
- When i reset routers, ONLY RT-AC68U keeps the space at the end, other routers erase space at the end after reboot.
- RT-AC68U keeps the password correct in nvram
- RT-AC86U erases space at the end, clients report wrong password (after reboot)
- RT-AX86U erases space at the end, clients report wrong password (after reboot)

If i enter password again once unit is booted and click apply password works again until next reboot.

This is very strange bug, can someone check why space at the end of the password doesn't get saved in newer versions of routers ? Only RT-AC68U writes password correctly.
 
Still on this?

That is why spaces should not be used. The RT-AC68U is giving the unexpected results here.
 
Still on this?

That is why spaces should not be used. The RT-AC68U is giving the unexpected results here.
RT-AC68U is the only one that works without any problems.
Space at the end is always present even after million reboots.

Maybe firmware is broken for this new " HND platform",as older devices on same firmware work flawlessly.


HND platform:
  • RT-AC86U
  • RT-AC2900 (same firmware as RT-AC86U)
  • GT-AC2900
  • RT-AX88U
  • GT-AX11000
  • RT-AX56U
  • RT-AX58U
  • RT-AX3000 (same firmware as RT-AX58U)
  • RT-AX86U
  • RT-AX68U
 
I found a problem and i know why this happens.

nvram executable doesn't write value correctly to system


RT-AC68U nvram:
nvram get wl0_wpa_psk
CSS:
"ThisIsATestP4ssword  "

RT-AX86U nvram:
nvram get wl0_wpa_psk
CSS:
"ThisIsATestP4ssword "

So older version of nvram wrote 2 spaces at the end of the wpa2 password to nvram
Never version of nvram writes only 1 space at the end of the wpa2 password to nvram, even if we write 8 spaces at the end or more.

1 space gets ignored, 2 spaces produce 1 space at the end, 1 space gets ignored.


Problem is with newer version of nvram executable, if we replace it with old one it will work again.

Old version of nvram executable:
Even if i type:
CSS:
nvram set wl0_wpa_psk=" ThisIsATestP4ssword      "

nvram value looks like this after set:
CSS:
" ThisIsATestP4ssword       "

New version of nvram executable:
Code:
nvram set wl0_wpa_psk=" ThisIsATestP4ssword      "

nvram value looks like this after set:
CSS:
"ThisIsATestP4ssword"

If i use code alt+0160 and get a "space" then new nvram writes spaces to the end of the value.
Problem is alt+0160 is not space.
 
Last edited:
Same firmware, different nvram executables.

RT-AC68U nvram:
-rwxr-xr-x 1 0 0 15248 Aug 7 00:21 nvram

RT-AX86U nvram:
-rwxr-xr-x 1 0 0 23300 Aug 7 2021 nvram
 
If i set the password from GUI it writes values correctly to the nvram with spaces.
Example:
Web GUI: " ThisIs The Password "
nvram from ssh: "ThisIs The Password"

this shows that nvram executable has a problem with spaces.
It's not a hardware problem or linux kernel problem.

Password works as long as you enter it from web gui and don't reset the router.
if you enter it from ssh with nvram, spaces are lost.
if you reset the router after you apply password with gui, spaces get lost on reboot.


/bin/nvram executable has to get fixed so that it writes all spaces into nvram values correctly.
 
Last edited:
HND nvram userspace tool is closed source.
 
Yes.

But I have a suspicious feeling this is the fix.
 

Latest threads

Sign Up For SNBForums Daily Digest

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