The Xiaomi 4A Gigabit edition comes with two LEDs, one is for the power and the other is for wan/lan ethernet cable connection status indicator.
That said I am pretty sure that the power LED comes with two blue and yellow colors.
The wan led does come with blue color and I am not sure if it can switch to yellow color or not.
I am making a custom firmware for IoT device users and once the custom firmware
is flashed on the router in its first boot the router tries to get connected to the
internet and download some files automatically from a remote site.
Since the users do not have access to the router's webpage and the only way
that the users should get informed about the device internet connection status is via the flashing pattern of the one of the routers led.
Let's as our preference consider implementing the flashing patterns on the wan led by presuming that it is capable of switching to yellow color and it that specific led can get configured accordingly.
The desired flashing pattern style is as follows,
For the first attempt the wan led should blink yellow every half second,
and the wan interface gets enabled until the wan interface connects to the internet, otherwise a 10 seconds timeout will kick in and physical wan interface gets disabled.
In the second attempt the wan led will change its blinking pattern to 250ms ON (yellow) and 750ms off, this pattern stays for 10 second and meanwhile the router will turn on its 2.4GHz radio interface on and tries to connect to a predefined SSID name HUB1, after 10 seconds the timeout will expire and it will turn off its 2.4GHz radio.
In the third attempt the 5GHz radio is turns on, and the wan led blinks with different blinking pattern of 750ms ON and 250ms OFF which comes again with 10 seconds timeout and meanwhile it tries to connect to the HUB1-5G SSID and if it fails it will start from the beginning.
If at any stage or connection attempts the router gets connected to the internet it will immediately changes the wan led color to fixed blue and download the remote files.
Once the remote files are downloaded the router reboots and the device leds should perform as before.
The above mechanism of informing the users facilitate us with troubleshooting the customers.
Anyways what I have consulted was the following website, [OpenWrt Wiki] LED Configuration.
I guess that Xiaomi 4A Giga router does not have non-default leds, but I am wondering how the LEDs are implemented on this device since its structure is way different from the website.
As an example, I have no clue on how to change the power led to yellow on this device?
In addition, there exists example of timer based blinking as below but for other device
config 'led'
option 'sysfs' 'wrt160nl:blue:wps'
option 'trigger' 'timer'
option 'delayon' '500'
option 'delayoff' '2000'
I am wondering how the above config could be adapted for the Xiaomi 4A Giga router using uci commands.
For your information the Xiaomi 4A Giga we have following led structure which
is a way different from others
root@OpenWrt:/sys/class/leds# ls
blue:status mt76-phy0 mt76-phy1 yellow:status
root@OpenWrt:/sys/class/leds# ls blue:status/
brightness device max_brightness subsystem trigger uevent
root@OpenWrt:/sys/class/leds# ls yellow:status/
brightness device max_brightness subsystem trigger uevent