Tostaki
New Around Here
EDIT: tested and fully explained solution on post #14
Hello,
I wanted to add a custom "night mode" to my RT-AC87U router. My target is to shutdown the wireless adapters and the leds at night. A custom script + a cron job does the job.
This solution enables me get the wifi harware button not turning off the scheduling each time it is pressed.
I just need help to get it working for the 5G network. At this time only the 2.4G one works with the following command. I did not found the 5G interface
Does anybody knows how to deal with the 5g adapter ?
Trying to list the interfaces gave me the following
My full script which does not work entirely
Hello,
I wanted to add a custom "night mode" to my RT-AC87U router. My target is to shutdown the wireless adapters and the leds at night. A custom script + a cron job does the job.
This solution enables me get the wifi harware button not turning off the scheduling each time it is pressed.
I just need help to get it working for the 5G network. At this time only the 2.4G one works with the following command. I did not found the 5G interface
Does anybody knows how to deal with the 5g adapter ?
Trying to list the interfaces gave me the following
Code:
me@RT-AC87U-XXXX:/# lshw
-sh: lshw: not found
me@RT-AC87U-XXXX:/# wl status
SSID: "myssid"
Mode: Managed RSSI: 0 dBm SNR: 0 dB noise: -91 dBm Channel: 9l
BSSID: F0:79:59:D4:XX:XX Capability: ESS ShortSlot RRM
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
VHT Capable:
Chanspec: 2.4GHz channel 11 40MHz (0x180b)
Primary channel: 9
HT Capabilities:
Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 32 ]
VHT Capabilities:
Supported VHT (tx) Rates:
NSS: 1 MCS: 0-9
NSS: 2 MCS: 0-9
NSS: 3 MCS: 0-9
Supported VHT (rx) Rates:
NSS: 1 MCS: 0-9
NSS: 2 MCS: 0-9
NSS: 3 MCS: 0-9
My full script which does not work entirely
Code:
#!/bin/sh
show_help()
{
echo "Arrete et relance le wifi par script. Les leds suivent la meme logique"
echo "usage:"
echo "nightmode -on wifi off, leds off"
echo "nightmode -off wifi on, leds on"
echo ""
}
option="${1}"
case ${option} in
-on)
#2.4G network
wl -i eth1 radio off
#5G network - does not work on RT-AC87U - wl driver adapter not found
wl -i eth2 radio off
logger ****Wifi off****
nvram set led_disable=1
service restart_leds
;;
-off)
#2.4G network
wl -i eth1 radio on
#5G network - does not work on RT-AC87U - wl driver adapter not found
wl -i eth2 radio on
logger ****Wifi on****
nvram set led_disable=0
service restart_leds
;;
*) show_help
exit 1
;;
esac
Last edited: