05-02-2020, 09:39 PM
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
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