Thanks for the input.
I can see how the echo command is being used to turn something on and off but the next trick I’d like to see is how to make the LED blink at a certain rate without using a script to turn it on and off repeatedly. Meaning, one command to start the LED flashing at a s certain rate, one more command to stop it or change it to another rate.
From what I have read, the kmod-ledtrig-timer is the package I need to do blinking LEDs.
I am not a programmer so am trying to avoid writing a script unless there is something very simple to be found on the Internet somewhere.
I find this on the openwrt site but no idea how to use it.
opkg install kmod-ledtrig-timer
Name Type Required Default Description
default integer no 0 LED state before trigger: 0 means OFF and 1 means ON
delayoff integer yes (none) How long (in milliseconds) the LED should be off.
delayon integer yes (none) How long (in milliseconds) the LED should be on.
sysfs string yes (none) LED device name
trigger string yes (none) timer
Then back to ‘none’ to stop it but that’s not what I am looking for. I want to flash the LED at different speeds, have it remain flashing until I stop it using ‘none’ again, for example.
And the delay is an integer, so max is 2147483647. You won’t have much use then a few seconds, but you can set longer. They use 2 seconds in the example above, 2000ms.
Yes, I just realized this :).
I thought the limit was 1-255 but now I see there is more.
Now I’m trying to figure out how to change the brightness. Maybe the LED script has to be restarted for that since it doesn’t work like the others.
There is one interesting problem. I have not confirmed when/what causes this but when dealing with the files directly, meaning using echo to send into delay_on/off for example, the files eventually disappear. I have tested this on both tp-link and glinet to be true so far.
No idea what condition causes this to happen and only a reboot resets this. I’ll try restarting the led program next time.