Configure WAN LED to work like on stock firmware

I have a Xiaomi AIoT Router AC2350 and I would like to configure it's "internet" led to behave like on the stock firmware. Here is the stock behaviour:

  1. WAN cable unplugged: LED is off
  2. WAN cable plugged in, but NO internet conectivity: LED is orange
  3. WAN cable plugged in, with working internet connection: LED is blue

This is acheived by pinging a host (like and seeing if there is a reply.
Can this be done on openwrt, with a script for example?
The led names are: orange:wan and blue:wan .

by coincidence someone basically had the same question today, there are some answers and links that should also help for your device:

1 Like