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
  Reply
#2
Just booted up my clusterboard, running Armbian Debian Buster, and this worked fine on it also. Thanks for the tip! Smile I'll now need to see if there is anything else interesting that can be done poking those registers... i.e. powering down the link when it's not in use, triggering a phy reset when it's misbehaving, etc.

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
phytool write eth0/0/31 0x0000
as this seems to be what the datasheet instructs (after doing the led control register changes).
  Reply
#3
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
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Clusterboard does not even turn on? poVoq 1 64 5 hours ago
Last Post: tllim

Forum Jump:


Users browsing this thread: 1 Guest(s)