# MBW2 LED control - by n00b32 >/sys/class/leds/wdc-leds:degraded/brightness"); //echo file_get_contents("/sys/class/leds/wdc-leds:degraded/brightness"); ///sys/class/leds/wdc-leds:degraded/brightness //echo file_put_contents("/sys/class/leds/wdc-leds:degraded/brightness","255"); //ok ... you need to run chmod a+wrx on /sys/class/leds/wdc-leds:*/brightness // or chown for user / group www-data // ... preferably first option //n00b $ltab[1]="activity"; $ltab[2]="degraded"; $ltab[3]="fuel-gauge"; $ltab[4]="ignore-act"; $ltab[5]="over-temp"; $ltab[6]="power"; $ltab[7]="rebuilding"; $ltab[8]="transition"; //these can change in 2.0 firmware ;) ::n00b if(isset($_POST['ledid']) && isset($_POST['ledval']) ){ $lid=$_POST['ledid']; $lval=$_POST['ledval']; if($lid>=1 && $lid<=8){ $tmp=$ltab[$lid]; }else $tmp=$ltab[1]; $lval=$lval+1-1; if($lval<0){ $lval=0; echo "rounded up led value to 0... .o0"; } if($lval>255){ $lval=255; echo "rounded down led value to 255... .o0"; } file_put_contents("/sys/class/leds/wdc-leds:".$tmp."/brightness",$lval); echo "set "."/sys/class/leds/wdc-leds:".$tmp."/brightness"." to ".$lval." . o0 ."; } ?>
brightness value:
led :