#Install the kmod-ledtrig-morse
opkg install kmod-ledtrig-morse
#list your leds
ls -1 /sys/class/leds/
#enable morse code
echo morse > /sys/class/leds/tp-link\:green\:lan/trigger
echo morse > /sys/class/leds/tp-link\:green\:wlan/trigger
echo morse > /sys/class/leds/tp-link\:green\:3g/trigger
#type a message
a="SOS"
echo $a > /sys/class/leds/tp-link\:green\:wlan/message
echo $a > /sys/class/leds/tp-link\:green\:lan/message
echo $a > /sys/class/leds/tp-link\:green\:3g/message
#
#other optional packages
opkg install kmod-ledtrig-timer
opkg install kmod-ledtrig-heartbeat
opkg install kmod-ledtrig-netdev
opkg install kmod-ledtrig-gpio
opkg install kmod-ipt-led
opkg install iptables-mod-led
Sample:
#list your leds
ls -1 /sys/class/leds/
#enable morse
echo morse > /sys/class/leds/tp-link\:green\:lan/trigger
echo morse > /sys/class/leds/tp-link\:green\:wlan/triggerecho morse > /sys/class/leds/tp-link\:green\:3g/trigger
#post message
echo "SOS" > /sys/class/leds/tp-link\:green\:wlan/message
echo "SOS" > /sys/class/leds/tp-link\:green\:lan/message
echo "SOS" > /sys/class/leds/tp-link\:green\:3g/message
Notes:
#check initial status
cat /sys/class/leds/tp-link\:green\:wlan/trigger
#Put everything back according to previous cat
echo phy0tpt> /sys/class/leds/tp-link\:green\:wlan/trigger
echo netdev> /sys/class/leds/tp-link\:green\:lan/trigger
echo usbdev> /sys/class/leds/tp-link\:green\:3g/trigger
No comments:
Post a Comment