LED Configuration - Archer C7 AC1750 v4

Hello people,

I've just installed OpenWrt firmware on my router and i noticed the LED's are behaving different than when it used the stock firmware.
I'd like to use the stock firmware LED configuration for the WAN port, which works something like this:

  • LED is green when internet is working properly;
  • if not the LED is amber. I believe it stays that color when there is no connection to the port also.

I've tried some different configurations through the LED configuration at the GUI but had no success.
If anyone knows how to configure this and can teach me, i'd appreciate.

You can edit /etc/config/system,configuration method on https://openwrt.org/docs/guide-user/base-system/led_configuration

1 Like

This is not a "standard" trigger for Linux or for OpenWrt, as far as I know. It is something that you could script, where the complexity increases quickly with how "accurately" you want to define "working properly".

If you're sloppy in your definition (and TP-Link probably was), it should be reasonably easy with "hotplug" scripts:

  • DHCP lease received -- turn on green LED
  • DHCP lease lost -- turn off green LED
  • Interface down -- turn off green LED

The amber LED could just be a standard "netdev" trigger than you can set up in LuCI for the right interface being "Link On" (as long as you find the "amber" + "green" LED acceptable)

If "amber" = "red" + "green" or you don't like the look of amber and green together, things get a little trickier

How familiar are you with shell scripts?


DTS confirms that there are two, independent LEDs for the WAN function:

                wan {
                        label = "tp-link:green:wan";
                        gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;

                wan_fail {
                        label = "tp-link:orange:wan";
                        gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;

Given the naming -- green if "OK", amber if not:

  • Boot -- turn on amber
  • Link down -- turn on amber
  • DHCP lease received -- turn on green; turn off amber
  • DHCP lease lost -- turn off green; turn on amber

Hi @jeff,

Are you saying that those settings will work as a stock firmware?
I guess I need to delete the current "config led" under /etc/config/system for WAN and add the lines above as you mentioned??

Mine looks like and I cannot find a way to make the amber appears only when the internet link is down :frowning: :

config led
option sysfs 'tp-link:green:wan'
option default '0'
option trigger 'netdev'
option name 'WAN ON'
option dev 'pppoe-wan'
list mode 'rx'

Thank you