OMKAR
October 10, 2023, 6:55am
1
Help help me to configure mi router 4a leds
When internet is working blue light
When internet is not working but enternet is connected yellow light
When wire is not connected
This is output of
root@OpenWrt:~# ls /sys/class/leds/
blue:status mt76-phy0 mt76-phy1 yellow:status
root@OpenWrt:~#
OMKAR
October 10, 2023, 6:56am
2
I want to change that one that says blue:status
And yellow:status
OMKAR
October 10, 2023, 7:02am
4
I mean I want to use that led for internet status
copy and change, where needed.
I have developed a simple script that indicates the Internet status on my router by managing the Red Internet LED.
Tested working on my Buffalo WBMR-HP-G300H. Adapt it to your router if you don't have Red Internet LED.
Here you have, in case someone could consider it useful:
#!/usr/bin/env bash
# Adapta el LED Internet Rojo a parpadeo en función del la respuesta del comando ping hacia Internet:
# Ping a $DomaintoPing y a $IPtoPing correcto --> LED Rojo apagado.
# Ping a $DomaintoPing incorre…
In this example I used a green led to indicate that internet connection is available and a red one to warn when internet connection is not available (Router ADB P.DG A4001N1), but if you have just one led, you can set a fixed light when internet is available and a flash light when it is not available.
let's create the script:
nano /root/internet-check.sh
#!/bin/sh
#
#start looping
while [ true ]; do
#checking if internet is available (google)
/usr/bin/wget -o -q --spider http://google.com > …
1 Like
you already received two + the config route posted by @lleachii ?
OMKAR
October 11, 2023, 12:36pm
9
I don't have knowledge about openwrt plus replacing led name in script it's pain if I brick the router I don't have pc to unbrick
frollic
October 11, 2023, 12:38pm
10
then you'll learn something new in the process.
in your opinion, someone should do the painful part for you ?
OMKAR:
if I brick the router
hardly happening if you get the LEDs wrong.
the LED setup is somewhat device specific, you own the device.