绿联 NAS

绿联NAS

更换系统

led控制

绿联NAS的LED灯通过主板上的I2C总线控制,需通过Linux系统调用i2c-tools和特定驱动模块(如i2c-i801.ko)实现底层操作。通过开源ugreen_leds_cli工具可方便操作led。

下载开源工具ugreen_leds_cli:https://github.com/miskcoo/ugreen_leds_controller/releases ugreen_leds_cli帮助文档:

Usage: ugreen_leds_cli  [LED-NAME...] [-on] [-off] [-(blink|breath) T_ON T_OFF]
                    [-color R G B] [-brightness BRIGHTNESS] [-status]

       LED_NAME:    separated by white space, possible values are
                    { power, netdev, disk[1-8], all }.
       -on / -off:  turn on / off corresponding LEDs.
       -blink / -breath:  set LED to the blink / breath mode. This 
                    mode keeps the LED on for T_ON millseconds and then
                    keeps it off for T_OFF millseconds. 
                    T_ON and T_OFF should belong to [0, 65535].
       -color:      set the color of corresponding LEDs.
                    R, G and B should belong to [0, 255].
       -brightness: set the brightness of corresponding LEDs.
                    BRIGHTNESS should belong to [0, 255].
       -status:     display the status of corresponding LEDs.

示例:

# 关闭电源灯
sudo ./ugreen_leds_cli power -off

# disk1的led闪黄灯
sudo ./ugreen_leds_cli disk1  -color 255 255 0 -blink 400 600

https://github.com/miskcoo/ugreen_leds_controller