Indicator light when DSL is down (not up!) BT HH5A

Hello :raised_hand_with_fingers_splayed: This is my first post so I'm sorry if it's in the wrong category - I'm hoping it should be right though.
I'm using a BT Homehub 5A and I'm trying to get an indicator LED to come on when the DSL connection is NOT working. After reading through this, I have managed to get the opposite of this quite easily by editing the file /etc/config/system adding the section:

config led 'broadband'
        option name 'Broadband LED'
        option sysfs 'red:broadband'
        option trigger 'netdev'
        option dev 'dsl0'
        list mode 'link'

Can anyone tell me how to get the opposite of this?

You may need to write a script to control the led. There doesn't seem to be a way to invert the logic in config led

1 Like

That's done it! Thanks a lot :smile:

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

2 Likes

Thanks to @d687r02j8g for sending me to the right place.

I created a file /etc/hotplug.d/iface/00-netstate-LEDs
with contents:

#!/bin/sh

[ "$INTERFACE" = wan ] || exit 0
if [ "$ACTION" = ifup ] ; then
echo "none" > /sys/class/leds/red:broadband/trigger
fi
if [ "$ACTION" = ifdown ] ; then
echo "default-on" > /sys/class/leds/red:broadband/trigger
fi
exit 0

That's it!

Those LED names are specific to the BT Homehub 5A

This will put the red broadband LED on when the DSL connection is down and switch it off again when it comes back up.

1 Like

Excellent. Thanks for posting your solution!

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.