This guide is for users of the Robustel EG5200 gateway who want to use the user1 and user2 LEDs as custom indicators. You may be in a scenario where you need a visual cue for a specific application status, script success, or network event. By default, these LEDs may be controlled by other system processes. This document provides the step-by-step commands to take manual control of these LEDs to turn them on, turn them off, or make them blink based on system triggers.
/sys/class/leds/ control)Before you can control the LEDs from the command line, you must first release them from any system-level control via the Web UI.
/sys/class/leds/ directory.To simplify operations, we will first define a variable. We will use user1 for all examples.
LED_NAME=user1 # or use LED_NAME=user2echo none > /sys/class/leds/${LED_NAME}/trigger1 (ON):echo 1 > /sys/class/leds/${LED_NAME}/brightnessnone.0 (OFF):echo 0 > /sys/class/leds/${LED_NAME}/brightnessYou can also set the LEDs to react to system events, such as a timer (blinking) or network activity.
timer:echo timer > /sys/class/leds/${LED_NAME}/triggerecho 1000 > /sys/class/leds/${LED_NAME}/delay_onecho 1000 > /sys/class/leds/${LED_NAME}/delay_offnetdev (network device):echo netdev > /sys/class/leds/${LED_NAME}/triggerwwan0):echo wwan0 > /sys/class/leds/${LED_NAME}/device_nameecho 1 > /sys/class/leds/${LED_NAME}/txecho 1 > /sys/class/leds/${LED_NAME}/rxecho 1 > /sys/class/leds/${LED_NAME}/linkYou can verify your configuration by observing the physical user1 or user2 LED on the front panel of the EG5200.
echo 1 > /sys/class/leds/user1/brightnessuser1 LED on the device should immediately light up and stay solid.echo 0 > /sys/class/leds/user1/brightnessuser1 LED on the device should immediately turn off.user1 LED should immediately begin blinking at the interval you specified (e.g., 1 second on, 1 second off).netdev commands from Step 4, using wwan0 and enabling tx and rx.ping command to an internet address:ping 8.8.8.8).user1 LED should flash in sync with the transmit and receive packets over the wwan0 interface.Below is an example of the CLI commands being executed successfully:
Bash
root@Router:~# # Example: Turn on user1 LED
root@Router:~# echo none > /sys/class/leds/user1/trigger
root@Router:~# echo 1 > /sys/class/leds/user1/brightness
root@Router:~# # Example: Make user1 LED blink
root@Router:~# echo timer > /sys/class/leds/user1/trigger
root@Router:~# echo 1000 > /sys/class/leds/user1/delay_on
root@Router:~# echo 1000 > /sys/class/leds/user1/delay_off
root@Router:~# # Example: Make user1 blink on wwan0 activity
root@Router:~# echo netdev > /sys/class/leds/user1/trigger
root@Router:~# echo wwan0 > /sys/class/leds/user1/device_name
root@Router:~# echo 1 > /sys/class/leds/user1/tx
root@Router:~# echo 1 > /sys/class/leds/user1/rxQ: I ran the commands, but the LED is not changing. What's wrong?
A: The most common reason is that a system process still has control of the LED. Double-check Step 1 and ensure the "User LED" setting in the Web UI is set to "none". After setting it to "none", save and apply the changes, and then try the command line steps again.
Q: My LED settings disappeared after I rebooted the gateway. How do I make them permanent?
A: These command-line settings are not saved to non-volatile memory and will be lost on reboot. To make them permanent, you must add the desired echo commands to a custom startup script. This can often be done in the Web UI under a "System" or "Custom Scripts" section.
Q: Can I control the other LEDs, like 'run' or 'rssi'?
A: No. The run,rssi,modem, and vpn LEDs are typically hard-coded to system functions and are not intended for user control. This guide only applies to the user1 and user2 LEDs.
Q: I set the trigger to 'timer', but now I want to turn the LED off manually. How?
A: You must first set the trigger back to none before you can manually control the brightness.
# Set trigger back to manual
echo none > /sys/class/leds/user1/trigger
# Now you can turn it off
echo 0 > /sys/class/leds/user1/brightnessVersion | Date | Author | Changes |
1.0 | 2025-10-24 | Hubery | Initial document creation. |