[Fixed] Wps to trigger power-led:orange to blink

I have read through this thread, and I wonder ... You are all aware of the timer LED trigger you can use to blink an LED, with custom blink rates using delayon and delayoff (even to the point where you can use it as a crude PWM) ... right?

Yeah, I know. Just wanted to keep it as simple as possible.

But sure, blinking could be done with timer trigger also:

root@LEDE:~# echo "timer" > /sys/class/leds/r7800\:amber\:power/trigger
root@LEDE:~# echo "100" > /sys/class/leds/r7800\:amber\:power/delay_on
root@LEDE:~# echo "100" > /sys/class/leds/r7800\:amber\:power/delay_off

root@LEDE:~# echo "0" > /sys/class/leds/r7800\:amber\:power/brightness

Apparently the timer trigger is nowadays built-in, and a separate kmod is not needed any more.

At least it is listed among the others in the long list:

root@LEDE:~# cat /sys/class/leds/r7800\:amber\:power/trigger
[none] switch0 timer default-on netdev usbport phy0rx phy0tx
phy0assoc phy0radio phy0tpt phy1rx phy1tx phy1assoc phy1radio
phy1tpt

It has been a default trigger at least since OpenWrt AA 12.09, so its presence is pretty reliable.

Some precompiled targets don't come with netdev (e.g. the TP-Link RE450, for reasons that are beyond me), but I've yet to see one that doesn't come with timer, and even if so, the kmod is tiny and easily installed.

In my case it is like

root@HOSTXX:~# echo "timer" /sys/class/leds/wndr4700\:white\:logo/trigger
timer /sys/class/leds/wndr4700:white:logo/trigger
root@HOSTXX:~# echo "100" > /sys/class/leds/wndr4700\:white\:logo/delay_on
-ash: can't create /sys/class/leds/wndr4700:white:logo/delay_on: Permission denied
root@HOSTXX:~# echo "100" > /sys/class/leds/wndr4700\:white\:logo/delay_off
-ash: can't create /sys/class/leds/wndr4700:white:logo/delay_off: Permission denied
root@HOSTXX:~# echo "0" > /sys/class/leds/wndr4700\:white\:logo/brightness 
root@HOSTXX:~#

also

WPSLED="/sys/class/leds/wndr4700:white:logo/brightness"
root@HOSTXX:~# echo "255" > $WPSLED
root@HOSTXX:~# echo "0" > $WPSLED
root@HOSTXX:~# echo "255" > $WPSLED
root@HOSTXX:~# echo "0" > $WPSLED
root@HOSTXX:~# echo "255" > $WPSLED
root@HOSTXX:~# echo "0" > $WPSLED
root@HOSTXX:~# echo 1 > $WPSLED
root@HOSTXX:~# echo 0 > $WPSLED

255 and 1 are same
0 and "0" result same

@chunkeey
I have recently installed fresh version
LEDE Reboot 17.01.2 r3435-65eec8bd5f / LuCI lede-17.01 branch (git-17.152.82987-7f6fc16

having this WPS problem :

root@rrrrrr00:/tmp/run/hostapd#  cd  /var/run/hostapd
root@rrrrrr00:/tmp/run/hostapd#  hostapd_cli -i wlan0 wps_pbc
UNKNOWN COMMAND

any help?

When you installed from new, did you re-install hostapd_utils and wpad (after removing wpad-mini)??

yes, I think so too (well, based on the print, there might be more. but it's difficult to tell without any extra data).
that "UNKNOWN COMMAND" does point to wpad-mini being the suspect.

yes, I manually removed wpad-mini using Remove button in Software, then I installed wpad after that

looks like I forgot to mark Check Box From GUI, let me test

Yes, Its working now

So, if you see "UNKNOWN COMMAND", that could be uncheck from GUI.

2 Likes

Finally, I made the script, but need more testing. But it took me long time.

Here it is