What's new

RT-AX88U: 'nvram restart'/'rc restart' not working

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

ktj

New Around Here
I've been trying to configure my newly bought Asus RT-AX88U AP using nvram commands via serial connection. Like, when I try to set the below values on the AP using nvram commands, the nvram values are getting set (verified by using 'nvram get' command). But when I try to do 'nvram restart' OR 'rc restart' to set effect to the changes I made to nvram values, I am getting errors as shown below. Due to this, my settings are not effective on the AP. Let me know if anybody faced this issue, have a workaround or anyother thoughts about how I can solve this.

Code:
RT-AX88U-80F8:/tmp/home/root# nvram set wl0_auth="0"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_auth_mode="none"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_akm=""

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_wep="disabled"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_preauth="0"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_key1=""

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_key2=""

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_key3=""

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_key4=""

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_akm="psk2"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_crypto="aes"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_wpa_psk="1234567890"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_closed="0"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_key="1"

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_key4=""

RT-AX88U-80F8:/tmp/home/root# nvram set wl0_key1=""

RT-AX88U-80F8:/tmp/home/root#

RT-AX88U-80F8:/tmp/home/root# nvram commit

RT-AX88U-80F8:/tmp/home/root#

RT-AX88U-80F8:/tmp/home/root#

RT-AX88U-80F8:/tmp/home/root#

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_auth

0

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_auth_mode

none

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_akm

psk2

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_wep

disabled

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_preauth

0

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_key1



RT-AX88U-80F8:/tmp/home/root# nvram get wl0_key2



RT-AX88U-80F8:/tmp/home/root# nvram get wl0_key3



RT-AX88U-80F8:/tmp/home/root# nvram get wl0_key4



RT-AX88U-80F8:/tmp/home/root# nvram get wl0_akm

psk2

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_crypto

aes

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_wpa_psk

nvram get wl0_closed

1234567890

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_closed

0

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_key

nvram get wl0_key4

1

RT-AX88U-80F8:/tmp/home/root# nvram get wl0_key4



RT-AX88U-80F8:/tmp/home/root# nvram get wl0_key1



RT-AX88U-80F8:/tmp/home/root#

RT-AX88U-80F8:/tmp/home/root# rc restart

Segmentation fault

RT-AX88U-80F8:/tmp/home/root# nvram restart

_netlink_recv_mesg:197  return NULL from rec, why socke is not initialized?
 
rc restart is an invalid command and nvram restart is not appropriate. What are you trying to achieve with those commands?
 
If you want to apply changes to the WiFi system try using the following command:
Code:
service restart_wireless
 
Hi @ColinTaylor
I just want to give effect to the values I set using 'nvram set' commands. I got 'nvram restart' from the m/c itself (find below). Normal 'reboot' command just reboots the machine. It doesn't give effect to the changes I made to the nvram values. Also, the service restart_wireless command doesn't seem to have any effect. It just returns "Done".

Code:
RT-AX88U-13E8:/tmp/home/root# nvram

======== NVRAM CMDS ========
[set]            : set name with value
[setflag]        : set bit value
[unset]            : remove nvram entry
[get]            : get nvram value with name
[getflag]        : get bit value
[show:dump:getall]    : show all nvrams
[loadfile]        : populate nvram value from files
[savefile]        : save all nvram value to file
[commit]        : save nvram [optional] to restart wlan when following restart
[restart]        : restart wlan
[save]            : save all nvram value to file
[restore]        : restore all nvram value from file
[erase]            : erase nvram partition
[fb_save]        : save the romfile for feedback



RT-AX88U-13E8:/tmp/home/root# service restart_wireless

Done.
 
Last edited:
I don't believe the nvram restart command does what you think it does.

service restart_wireless always returns "Done". Check the syslog to see if it's worked.
 
Well, the service restart_wireless command too doesn't seem to give effect to my nvram set values. The syslogs/dmesg reflects no such activity.

Do we have any other way to configure the security or band width or channel etc through the serial interface? Any commands as such? I hoped nvram commands would suffice. The same had worked for me earlier on Netgear R7000 AP.
 
Well, the service restart_wireless command too doesn't seem to give effect to my nvram set values. The syslogs/dmesg reflects no such activity.
Unless you're suppressing the messages you should see something in the logs. At least messages like "entered listening state".

Do we have any other way to configure the security or band width or channel etc through the serial interface? Any commands as such? I hoped nvram commands would suffice. The same had worked for me earlier on Netgear R7000 AP.
By "serial interface" you mean SSH or Telnet?
 
service restart_wireless will restart all radios. If it doesn't work, then one of your settings might be invalid.

Blindly configuring a radio over the command line isn't trivial, as there are many related parameters - much more than back in the 802.11g days.
 
The logs show up like this-
Code:
May  4 23:15:19 rc_service: service 1228:notify_rc restart_wireless
May  4 23:15:21 kernel: ubi1: attaching mtd10
May  4 23:15:21 kernel: ubi1: scanning is finished
May  4 23:15:21 kernel: ubi1: attached mtd10 (name "misc1", size 8 MiB)
May  4 23:15:21 kernel: ubi1: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
May  4 23:15:21 kernel: ubi1: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
May  4 23:15:21 kernel: ubi1: VID header offset: 2048 (aligned 2048), data offset: 4096
May  4 23:15:21 kernel: ubi1: good PEBs: 64, bad PEBs: 0, corrupted PEBs: 0
May  4 23:15:21 kernel: ubi1: user volume: 1, internal volumes: 1, max. volumes count: 128
May  4 23:15:21 kernel: ubi1: max/mean erase counter: 6/2, WL threshold: 4096, image sequence number: 696890461
May  4 23:15:21 kernel: ubi1: available PEBs: 0, total reserved PEBs: 64, PEBs reserved for bad PEB handling: 4
May  4 23:15:21 kernel: ubi1: background thread "ubi_bgt1d" started, PID 1294
May  4 23:15:22 kernel: UBIFS (ubi1:0): background thread "ubifs_bgt1_0" started, PID 1320
May  4 23:15:22 kernel: UBIFS (ubi1:0): UBIFS: mounted UBI device 1, volume 0, name "nvram"
May  4 23:15:22 kernel: UBIFS (ubi1:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
May  4 23:15:22 kernel: UBIFS (ubi1:0): FS size: 5840896 bytes (5 MiB, 46 LEBs), journal size 1396736 bytes (1 MiB, 11 LEBs)
May  4 23:15:22 kernel: UBIFS (ubi1:0): reserved for root: 0 bytes (0 KiB)
May  4 23:15:22 kernel: UBIFS (ubi1:0): media format: w4/r0 (latest is w4/r0), UUID F81C8FF9-1B06-40EB-A05C-64D9AAF47331, small LPT model
May  4 23:15:22 kernel: UBIFS (ubi1:0): un-mount UBI device 1
May  4 23:15:22 kernel: UBIFS (ubi1:0): background thread "ubifs_bgt1_0" stops
May  4 23:15:22 kernel: ubi1: detaching mtd10
May  4 23:15:22 kernel: ubi1: mtd10 is detached
May  4 23:15:24 kernel: ubi1: attaching mtd10
May  4 23:15:24 kernel: ubi1: scanning is finished
May  4 23:15:24 kernel: ubi1: attached mtd10 (name "misc1", size 8 MiB)
May  4 23:15:24 kernel: ubi1: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
May  4 23:15:24 kernel: ubi1: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
May  4 23:15:24 kernel: ubi1: VID header offset: 2048 (aligned 2048), data offset: 4096
May  4 23:15:24 kernel: ubi1: good PEBs: 64, bad PEBs: 0, corrupted PEBs: 0
May  4 23:15:24 kernel: ubi1: user volume: 1, internal volumes: 1, max. volumes count: 128
May  4 23:15:24 kernel: ubi1: max/mean erase counter: 6/2, WL threshold: 4096, image sequence number: 696890461
May  4 23:15:24 kernel: ubi1: available PEBs: 0, total reserved PEBs: 64, PEBs reserved for bad PEB handling: 4
May  4 23:15:24 kernel: ubi1: background thread "ubi_bgt1d" started, PID 1384
May  4 23:15:25 kernel: UBIFS (ubi1:0): background thread "ubifs_bgt1_0" started, PID 1402
May  4 23:15:25 kernel: UBIFS (ubi1:0): UBIFS: mounted UBI device 1, volume 0, name "nvram"
May  4 23:15:25 kernel: UBIFS (ubi1:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
May  4 23:15:25 kernel: UBIFS (ubi1:0): FS size: 5840896 bytes (5 MiB, 46 LEBs), journal size 1396736 bytes (1 MiB, 11 LEBs)
May  4 23:15:25 kernel: UBIFS (ubi1:0): reserved for root: 0 bytes (0 KiB)
May  4 23:15:25 kernel: UBIFS (ubi1:0): un-mount UBI device 1
May  4 23:15:25 kernel: UBIFS (ubi1:0): background thread "ubifs_bgt1_0" stops
May  4 23:15:25 kernel: ubi1: detaching mtd10
May  4 23:15:25 kernel: ubi1: mtd10 is detached
May  4 23:15:27 acsd: eth6: Selecting 2g band ACS policy
May  4 23:15:27 wlceventd: wlceventd Start...
May  4 23:15:31 acsd: eth6: selected channel spec: 0x1903 (5u)
May  4 23:15:31 acsd: eth6: Adjusted channel spec: 0x1903 (5u)
May  4 23:15:31 acsd: eth6: selected channel spec: 0x1903 (5u)
May  4 23:15:31 acsd: acs_set_chspec: 0x1903 (5u) for reason APCS_INIT
May  4 23:15:31 acsd: eth7: Selecting 5g band ACS policy
May  4 23:15:33 acsd: acs_candidate_score_intf(997): eth7: intf check failed for chanspec: 0xe832 (36/160)
May  4 23:15:33 acsd: acs_candidate_score_bgnoise(1314): eth7: bgnoise check failed for chanspec: 0xe832 (36/160)
May  4 23:15:33 acsd: acs_candidate_score_txop(1565): eth7: txop check failed for chanspec: 0xe832
May  4 23:15:33 acsd: acs_candidate_score_intf(997): eth7: intf check failed for chanspec: 0xe932 (40/160)
May  4 23:15:33 acsd: acs_candidate_score_bgnoise(1314): eth7: bgnoise check failed for chanspec: 0xe932 (40/160)
May  4 23:15:33 acsd: acs_candidate_score_txop(1565): eth7: txop check failed for chanspec: 0xe932
May  4 23:15:33 acsd: acs_candidate_score_intf(997): eth7: intf check failed for chanspec: 0xea32 (44/160)
May  4 23:15:33 acsd: acs_candidate_score_bgnoise(1314): eth7: bgnoise check failed for chanspec: 0xea32 (44/160)
May  4 23:15:33 acsd: acs_candidate_score_txop(1565): eth7: txop check failed for chanspec: 0xea32
May  4 23:15:33 acsd: acs_candidate_score_intf(997): eth7: intf check failed for chanspec: 0xeb32 (48/160)
May  4 23:15:33 acsd: acs_candidate_score_bgnoise(1314): eth7: bgnoise check failed for chanspec: 0xeb32 (48/160)
May  4 23:15:33 acsd: acs_candidate_score_txop(1565): eth7: txop check failed for chanspec: 0xeb32
May  4 23:15:33 acsd: eth7: selected channel spec: 0xe832 (36/160)
May  4 23:15:33 acsd: eth7: Adjusted channel spec: 0xe832 (36/160)
May  4 23:15:33 acsd: eth7: selected channel spec: 0xe832 (36/160)
May  4 23:15:33 acsd: acs_set_chspec: 0xe832 (36/160) for reason APCS_INIT
May  4 23:15:40 ntp: start NTP update
May  4 23:15:40 ntp: start NTP update

I don't see the relevant part, what I want here. From what I learned over some other forums, to set effective the nvram values, we'd need to "rc restart" => which basically does what the apply button (in the gui page) does. But in my case, its returning "Segmentation Fault". I've no idea why thats happening.



 
Asuswrt is not DD-WRT, the commands and variables are different. Also the RT-AX88U is completely different platform than those routers from a decade ago.

If your nvram variables are being reset then as Merlin said, you've probably got some invalid settings.
 
That log does show your wireless being reinitialized, with acsd selecting the chanspec for both bands. I'm not sure what else you are expecting to see in your log.

Code:
rc restart
is NOT a valid Asuswrt command.
 
Okay. Thank you for these insights, I have a better understanding now. But do we know why nvram restart isn’t working? given that It’s shown as an option in the nvram commands from the #


Code:
RT-AX88U-80F8:/tmp/home/root# nvram restart

_netlink_recv_mesg:197  return NULL from rec, why socke is not initialized?
 
But do we know why nvram restart isn’t working?
Because 1) it doesn't do what you think it does, and 2) it's not compatible with all routers. If you want to restart the wireless system the command is service restart_wireless.
 
Okay. Thank you for these insights, I have a better understanding now. But do we know why nvram restart isn’t working? given that It’s shown as an option in the nvram commands from the #


Code:
RT-AX88U-80F8:/tmp/home/root# nvram restart

_netlink_recv_mesg:197  return NULL from rec, why socke is not initialized?
Because Asuswrt does not run an nvram daemon, it directly access the data. There is nothing to restart.
 
Okay. Then that settles the debate. One more doubt, is there any way I can change the ap wireless security setting using serial line cmds?
 
Okay. Then that settles the debate. One more doubt, is there any way I can change the ap wireless security setting using serial line cmds?
What exactly are to trying to achieve? If you just want to change the password of an AP that's already configured the following works for me (2.4GHz only):
Code:
# nvram set wl0_wpa_psk="12345678"
# nvram commit
# service restart_wireless
 
Okay. Thank you All. Your suggestions helped. I wanted to configure the AP in different securities viz- WPA2-PSK-AES, WPA/WPA2-PSK/TKIP mix etc. Now I am able to do that. The issue was with one of the commands I used to set the security protocol. I had used "nvram set wl0_akm="psk2"". Instead/along with that when I use "nvram set wl0_auth_mode_x="psk2"", I am able to set it properly now. Hence the command "service restart_wireless" along with this change solves my issue.
 

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