[Raspbian-devel] Suggestions for a Pi's Ethernet interface LEDs and tracking in /boot/config.txt.

John W. Kitz John.Kitz-hob at xs4all.nl
Wed Jun 6 22:40:51 BST 2018


Hi,

A couple of days ago I asked the following two questions:

1. Is it technically feasible to track the activity related to a Pi's
Ethernet interface?
2. If yes, are there any plans to include changes (such as adding a
parameter for Ethernet) required to make that possible (by making changes to
/boot/config.txt) in some future release?

To date I received one reaction. In addition I don't know if this is the
correct list to ask these questions. Nonetheless and not knowing of a more
appropriate mailing list to ask them or to make a suggestion, I'll post the
following here.

At this time my first question, i.e. if it is technically feasible to track
the activity of a Pi's Ethernet interface, has remained unanswered, but for
the sake of discussion I'll assume it is. With that in mind I do not know in
which portion of the software, drivers, kernel or somewhere else, any
changes and/or additions required need to be made. But again assuming there
are no significant obstacles that prevent such changes and/or additions, I'd
like to put the following up for consideration to any developers that may be
subscribed to this email list.

1) According to documentation pertaining to the Pi's device tree
implementation that I found on the Internet the following applies to the two
LEDs that are part of a Pi's Ethernet interface:

eth_led0    Set mode of LED0 (usually orange) (default "1").

The legal values are:
            0=link/activity          
            1=link1000/activity
            2=link100/activity       
            3=link10/activity
            4=link100/1000/activity
            5=link10/1000/activity
            6=link10/100/activity
            14=off
            15=on

eth_led1    Set mode of LED1 (usually green) (default "6"). See eth_led0 for
legal values.

I.e. unless changes are made to /boot/config.txt it is my understanding
(please correct me if and where necessary) the default behaviour is for the
orange LED to eluminate whenever a valid 1 Gig Ethernet connection is
present on the Pi's Ethernet port and/or there is activity on that port,
while the green LED eluminates whenever there is either a valid 10 Mbps
connection or a valid 100 Mbps connection present on the Pi's Ethernet port
and/or when there is activity on that port.

Having looked up the use of the orange and green LEDs of Ethernet ports on
some other devices and acknowledging the fact that not all devices behave
the same (after all what use is a standard if one can't deviate from it : ),
I think it is fair to say that the typical use is for the green LED to be
used to indicate the presence of a valid Ethernet link and for the orange
LED to be used to indicate, by flashing, the presence of activity on that
link or the other way around.

However, using the present set of valid values (see above or the Pi's device
tree implementation) for both eth_led0 and eth_led1, in /boot/config.txt, it
seems to be impossible to configure the LEDs to indicate link and activity
separately. So my first suggestion is to, if technically feasible, make
changes such that link and activity can each be assigned separately, to
either the orange or green LED of the Ethernet port, by making changes to
/boot/config.txt.

2) My second suggestion pertains to the possibility to 'track' some of a
Pi's hardware functions, as I understand it (please correct me if and where
necessary) to exist based on various sources on the Internet, such as the
documentation pertaining to the Pi's device tree implementation,
particularly:

act_led_trigger    Choose which activity the LED tracks. Use "heartbeat" for
a nice load indicator. (default "mmc")

act_led_gpio       Set which GPIO to use for the activity LED (in case you
want to connect it to an external device)
                   (default "16" on a non-Plus board, "47" on a Plus or Pi
2) N.B. For Pi3 see pi3-act-led overlay

Considering the above my second suggestion is to, if technically feasible,
make changes such that act_led_trigger can be assigned some, new to be
defined, value representative of a Pi's Ethernet port that, when used in
/boot/config.txt, causes not only one of the LEDs that are part of the
Ethernet port to eluminate whenever activity is detected on it, but also an
additional LED attached to a GPIO pin can be configured to 'track' activity
on the Ethernet port.

Regards, Jk.




More information about the Raspbian-devel mailing list