![]() |
Turn off the lights - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64-LTS / SOPINE Compute Module (https://forum.pine64.org/forumdisplay.php?fid=66) +--- Forum: Clusterboard (https://forum.pine64.org/forumdisplay.php?fid=91) +--- Thread: Turn off the lights (/showthread.php?tid=9780) |
Turn off the lights - joncostello - 05-02-2020 So I went down the rabbit hole(for me anyway) of writing a script that turns off the green and amber leds for each node. Just in case anyone else is thinking about doing this or when I flash a new os and don't back it up, I thought I'd post it here. I'm not a driver dev or anything so I'm sure there is a better way to do it than this, but a post on here pointed me toward setting RTL8211E registers. I found some documentation and a tool to read/write and was able to use that to write a couple scripts. Phytool requires sudo, so sudo sh lights_off.sh will turn off the leds and lights_on.sh will set them back to the way they work normally. I'm using armbian's bionic server , but I don't know why it wouldn't work with other distros. lights_off.sh: #/bin/bash phytool write eth0/0/31 0x0007 phytool write eth0/0/30 0x2c phytool write eth0/0/0x1a 0x0000 phytool write eth0/0/0x1c 0x0000 phytool write eth0/0/31 0x0007 phytool write eth0/0/30 0x0000 lights_on.sh: #!/bin/bash phytool write eth0/0/31 0x0007 phytool write eth0/0/30 0x2c phytool write eth0/0/0x1a 0x00d1 phytool write eth0/0/0x1c 0x9770 phytool write eth0/0/31 0x0007 phytool write eth0/0/30 0x0000 RE: Turn off the lights - pfeerick - 05-04-2020 Just booted up my clusterboard, running Armbian Debian Buster, and this worked fine on it also. Thanks for the tip! ![]() Are those last two lines what you mean to put in? Just wondering why you didn't do Code: # switch to the PHY’s Page RE: Turn off the lights - joncostello - 05-04-2020 Good catch! That was definitely just me reading that note wrong. I'll switch the last two lines in mine to that line. Glad it worked for you too RE: Turn off the lights - hvdkooij - 11-13-2020 Some major kudo points for this one. |