Turn off the lights
#1
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


Messages In This Thread
Turn off the lights - by joncostello - 05-02-2020, 09:39 PM
RE: Turn off the lights - by pfeerick - 05-04-2020, 03:25 AM
RE: Turn off the lights - by joncostello - 05-04-2020, 12:08 PM
RE: Turn off the lights - by hvdkooij - 11-13-2020, 04:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Clusterboard does not even turn on? poVoq 3 6,263 08-15-2020, 07:31 AM
Last Post: poVoq

Forum Jump:


Users browsing this thread: 1 Guest(s)