How to disable LEDs


#1

How can I disable the LEDs of the router?

I have placed the router in a bedroom, so I really need to disable completely LEDs because they are too shine during the night.

Unfortunately, I don’t know how to write a script to do that. Is there a simple way to disable LEDs?

PS: I’ve got a MT300A


#2

Tape? :slight_smile:


#3

I don’t have MT300A, but for my AR150 router, this works

echo 0 > /sys/devices/platform/leds-gpio/leds/gl_ar150\:wlan/brightness echo 0 > /sys/devices/platform/leds-gpio/leds/gl_ar150\:lan/brightness echo 0 > /sys/devices/platform/leds-gpio/leds/gl_ar150\:wan/brightness

So, it could be the case of replacing “gl_ar150” with your router model.

This can be put on /etc/rc.local so it is run automatically when the router starts.


#4

Try looking in Luci:

Advanced Settings (top right in UL) > System > LED Configuration

 

::::::::::::::::::::

>>>>>> This can be put on /etc/rc.local so it is run automatically when the router starts.

Or do it in Luci: System > Start Up


#5

Thanks venet, but it works only for wan e wlan (perhaps it is because I’m using the repeater mode). I’ve run this:

echo 0 > /sys/devices/gpio-leds/leds/gl-mt300a:wan/brightness
echo 0 > /sys/devices/gpio-leds/leds/gl-mt300a:wlan/brightness

Unfortunately, the first led is still on and I can’t disable it.

Glitch, I don’t know how to set up LEDs option in Luci. I need some help.


#6
lstevens

MAY 14, 2017 AT 7:48 AM #64831

Tape? 


this is what i do… works like a charm… no Luci skills needed :slight_smile:

M


#7

>>> I don’t know how to set up LEDs option in Luci. I need some help.

What didn’t you understand about “Advanced Settings (top right in UL) > System > LED Configuration”?


#8

Once I’m in “LED Configuration” page, I don’t know whatever to add or delete or modify. There are nouns such as “netdev”, “gre0”, “phy0rx” and so on. I don’t know how to set up.

Maybe tape could really be the right (and the only) solution for me :smiley:


#9

My guess is you could try clicking the delete button (start with just one) and see what happens!


#10

in Luci->system->LED Configuration page

There is a button with text “Delete”, click it, then in the next page showed to you, click “Save & Apply”

This only disable wifi LED but not Power LED. To disable power led, use the method from @venet

Otherwise, use tape is easiest.


#11

Which parameter do I have to use? I’ve found only :wan, :wlan, :lan, and :powerusb (which is for the power of usb pen drive, not the router).

None of them can disable the power led of the router.


#12

@tipo0011, maybe the power LED is hardcored in hardware.


#13

This works on my ar300m (including turning off the power led) but it should work on any of them:

find /sys/devices/platform/leds-gpio/leds/ ! -path ‘usbpow’ -name brightness -exec sh -c ‘echo 0 > {}’ ;

to turn them back on (except for power) I use:

/etc/init.d/led start

If you want to turn the power led back on change 0 to 255 in the first find command above.

I put these in cron to turn them off at night and back on during the day.


#14

Just wanted to add my exact lines in my crontab - you can add these to yours in the advanced setting to automatically turn off the LED’s and turn them back on in the morning.

# LEDs off
*/5 15-23 * * * find /sys/devices/platform/leds-gpio/leds \! -path '*usbpow*' -name brightness -exec sh -c 'echo 0 > {}' \;
# LEDs on
0 0 * * * find /sys/devices/platform/leds-gpio/leds \! -path '*usbpow*' -name brightness -exec sh -c 'echo 255 > {}' \; && /etc/init.d/led start

It runs the LED off job every 5 minutes. This is so in case the router reboots it will turn the lights off again, but still give you enough time to make sure everything is connecting right by looking at the LED’s before turning them off again automatically.

The hour is the 2nd number on each uncommented line (no # in front). In my example 15-23 would be 3pm-11pm. My router runs in GMT timezone. Adjust these hours to your needs.

It then turns them back on at midnight (again in GMT).


#15

updated for LEDE firmware:

# leds off
*/5 21-23,0-5 * * * find /sys/devices/platform/leds-gpio/leds \! -path '*usb*' -name brightness -exec sh -c 'echo 0 > {}' \;
# leds on
*/5 6-20 * * * find /sys/devices/platform/leds-gpio/leds \! -path '*usb*' -name brightness -exec sh -c 'echo 255 > {}' \; &&  /etc/init.d/led start

#16

Thanks guys I didn’t know how can I disable the LEDs its really useful thread for me.


#17

Glad you like it. Wish the lights did anything useful at all in the V3 firmware though!