Hi there,
I've noticed that on Mango the LED configuration isn't saving properly. After I change and save on Luci, the LEDs work great! But after rebooting the device, the LEDs fall back to the default configuration, even though my config is shown on the Luci page. Is there a way around this? Could this bug be fixed?
I apologize if this is an unusual request, but it's an important one for me. I need to set one of the LEDs to indicate that the VPN is up on the Mango-based spokes. Ideally, the end user would be able to see the LED and know that the VPN is working properly.
Can you give me a hint what you changed in luci?
Absolutely! I used the DOCS to find the path to make the configuration:
I've made the configuration as simple as I can, and when I commit it, the LED will show you whether the VPN is ON or OFF.
But as soon as I reboot the device, even though I can see the configuration on LuCi is right, the LED goes back to showing the default WAN indication status.
Oh, and I just wanted to let you know that I'm using the latest version (4.3.18).
Probably can try to add the config in the rc.local, to automatically set it again every time in router boot-up.
vi /etc/rc.local
uci set system.led_wan.dev='wgclient'
uci add_list system.led_wan.mode='link'
uci set system.led_wan.trigger='netdev'
Hello Bruce,
I think your answer was on the right track, but unfortunately, the command did not work:
Do uci show | grep led
to find the correct value pairs.
Hello admon!
The LED output from "uci show | grep led" is as follows. I have omitted some parts due to their length, as the words "enabled" and "disabled" also contain "led" in the word.
system.@led[0]=led
system.@led[0].trigger='default-on'
system.@led[0].sysfs='green:power'
system.@led[0].name='Power'
system.@led[1]=led
system.@led[1].dev='ra0'
system.@led[1].sysfs='red:wlan'
system.@led[1].name='WLAN'
system.@led[1].trigger='netdev'
system.@led[1].mode='link' 'tx' 'rx'
system.@led[2]=led
system.@led[2].trigger='netdev'
system.@led[2].sysfs='green:wan'
system.@led[2].name='VPN'
system.@led[2].mode='link'
system.@led[2].dev='wgclient'
The UCI is right, but the LED is not working as it should.
I have found that if I change to something else and then change back to this configuration, it will work until the next reboot.
I find it quite amusing that in Shadow, this configuration works perfectly and holds. In the same software version, Mango exhibits this odd behavior.
@admon
Is there a way to force the re-commit of the config?
@bruce Can you help?
Hi, you can log in to ssh and try the following command to see if it works
mv /etc/rc.d/S96led /etc/rc.d/S98led
Hello @dawei.liu,
Thank you for your answer.
It works, but now the toggle switch is not working to enable or disable Wireguard. Do you think this is related?
It doesn't seem to affect the toggle switches, after I reboot the device using the above command the toggle switches can be enabled or disabled by Wireguard, after executing the following command and rebooting the device are you able to use the toggle switches normally?
mv /etc/rc.d/S98led /etc/rc.d/S96led
If the toggle switch doesn't work properly, please provide me with the logs
Sure, can you walk me trough on how to get those logs?
I reset the Mango to factory and redid you workarround.
Now both LED and Button is working.
Thank you @dawei.liu