[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
Thu Jun 7 10:04:52 BST 2018


Stian,

Thanks for taking the time to respond.

On 2018-06-07 00:49, Stian Skjelstad wrote:
> The ethernet on the PI, is to my knowledge an external usb chip, so
> using system gpio hardware is not possible. So it has to be a software
> implementation of some sort.

I have no idea how this activity tracking feature has been implemented, 
but looking at a list[1] of possible values for act_led_trigger:

none                No trigger
kbd-scrolllock      Keyboard scroll lock
kbd-numlock         Keyboard num lock
kbd-capslock        Keyboard caps lock
kbd-kanalock        Keyboard kana lock
kbd-shiftlock       Keyboard shift
kbd-altgrlock       Keyboard altgr
kbd-ctrllock        Keyboard ctrl
kbd-altlock         Keyboard alt
kbd-shiftllock      Keyboard left shift
kbd-shiftrlock      Keyboard right shift
kbd-ctrlllock       Keyboard left ctrl
kbd-ctrlrlock       Keyboard right ctrl
timer               Flash at 1 second intervals
oneshot             Flash only once
heartbeat           Flash like a heartbeat (1-0-1-00000)
backlight           Always on
gpio                Flash when a certain GPIO is high???
cpu0                Flash on cpu0 usage
cpu1                Flash on cpu1 usage
cpu2                Flash on cpu2 usage
cpu3                Flash on cpu3 usage
default-on          Always on
[input]             Default state
panic               Flash on kernel panic
mmc0                Flash on mmc0 (primary SD Card interface) activity
mmc1                Flash on mmc1 (secondary SD Card interface) activity
rfkill0             Flash on wifi activity
rfkill1             Flash on bluetooth activity

[1] 
https://raspberrypi.stackexchange.com/questions/69674/are-there-other-act-led-trigger-options-besides-mmc-and-heartbeat

... that I found on the Internet and while considering that the amount 
of processing needed to accomplish it presumably must be kept low to 
avoid a considerable performance impact, I assume that it is done 
relatively 'close to the hardware'.

While to date I haven't tested any of this, given the relevant content 
of Raspbery Pi's device tree documentation and a number of 
posts[2],[3],[4] on this and a related topic[5] at this time I have no 
reason to doubt that this feature actually does work. Hence I would very 
much like to see some value representing the Ethernet interface added to 
the list of possible values above.

[2] https://softsolder.com/2016/03/29/raspberry-pi-power-heartbeat-led/
[3] 
https://www.jeffgeerling.com/blogs/jeff-geerling/controlling-pwr-act-leds-raspberry-pi
[4] 
http://bohdan-danishevsky.blogspot.com/2017/01/act-led-heartbeat-for-raspberry-pi.html
[5] https://github.com/raspberrypi/linux/issues/1363

In addition I would like to be able to configure the behaviour of the 
two LEDs that are part of a Pi's Ethernet interface in a way that is 
more consistent with the typical behaviour of other equipment and 
therefore makes more sense to me and is more meaningful in terms of 
diagnosing simple connectivity issues.

Finally the combination of both would allow users of a Pi to position 
LEDs indicative of a Pi's operation (such as Ethernet or disk, or rather 
microSD, read/write activity) further away from the PCB without the need 
to modify a Pi's hardware itself, use a light pipe or some other 
solution.

> You have to poke inside the ethernet
> driver, and probably patch it up a bit.

At this time I have no intention to do any coding myself, I'm merely 
trying to find the proper place to get my questions re. to Raspberry and 
Raspbian answered and to make suggestions as the ones in this post and 
the one to which you replied.

> The ethernet led documentation you found, configures the PHY chip,
> which has some gpio lines of its own for LEDs.
> Stian

Regards, Jk.



More information about the Raspbian-devel mailing list