The script works like a charm on a Pi 3 !
i did the same what dom wrote above.
Absolutely perfect, THANKS VERY MUCH to all here ! This is a mandatory function for me, because the Pi3 is in my bedroom.
Turning off all LEDs should be a standard function, i really dont understand why this is not possible out-of-the-box!
Cheers!
Re: Controlling LAN LEDs individually
i get this error when trying to make on rpi3
Code: Select all
gcc -lusb llctl.c -o llctl
llctl.c:10:17: fatal error: usb.h: No such file or directory
#include <usb.h>
^
compilation terminated.
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1
Re: Controlling LAN LEDs individually
Did you install libusb-dev?
Re: Controlling LAN LEDs individually
er...... no.....
(works fine now)
*gets coat
(works fine now)
*gets coat

Re: Controlling LAN LEDs individually
djace wrote: ↑Wed Mar 21, 2018 10:09 pmHello,
I'm currently getting, on the Raspberry Pi 3 Model B+:
Code: Select all
Segmentation fault
Yep same here..
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 5709
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: Controlling LAN LEDs individually
There is an dtparam that can control led behaviour - see https://github.com/raspberrypi/firmware ... EADME#L96
It was added March 21, so requires a kernel newer than that date.
It was added March 21, so requires a kernel newer than that date.
Re: Controlling LAN LEDs individually
Would this work for Pi 3 v1.2 ?dom wrote: ↑Tue May 08, 2018 6:21 pmThere is an dtparam that can control led behaviour - see https://github.com/raspberrypi/firmware ... EADME#L96
It was added March 21, so requires a kernel newer than that date.
Because mine still keep blinking after I add
Code: Select all
dtparam=eth_led0=14
dtparam=eth_led1=14
I did a rpi-update to 4.14.39-v7+ May 5, not help.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3600
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: Controlling LAN LEDs individually
This is currently a Pi 3B+-specific feature. The default LED modes weren't very useful so we had to change the LAN7800 driver anyway, and making the modes user-selectable was a simple extension.
Re: Controlling LAN LEDs individually
Any plans to bring it to the older ones as I need it (just to make it easier) on B/B+ (v1) as they make good camera pi.
If not, could you add a note to the readme that it's 3B+ only (or7800).
If not, could you add a note to the readme that it's 3B+ only (or7800).
Re: Controlling LAN LEDs individually
I'm guessing this won't work on the Raspberry Pi 3 Model B+ due to the new gigabit ethernet chip? I tried to compile and run it (with sudo), and all I get are segmentation faults.
- Paul Webster
- Posts: 833
- Joined: Sat Jul 30, 2011 4:49 am
- Location: London, UK
- Contact: Twitter
Re: Controlling LAN LEDs individually
RPI 3 B+ disabling Network LEDs with dtparm worked fine but...
Is there an option a Raspberry 3 B+ for disabling the power and activity LED with dtparm?
Couldnt find a parameter for them....
Thanks
Is there an option a Raspberry 3 B+ for disabling the power and activity LED with dtparm?
Couldnt find a parameter for them....
Thanks
Re: Controlling LAN LEDs individually
HI,
a bit late, but if you still did not found the answer:
Just add these lines before
Code: Select all
exit 0
Code: Select all
#Power LED off
echo none > /sys/class/leds/led1/trigger
echo 0 > /sys/class/leds/led1/brightness
#Activity LED off
echo none > /sys/class/leds/led0/trigger
echo 0 > /sys/class/leds/led0/brightness
Re: Controlling LAN LEDs individually
Dittomcduman wrote: ↑Sun Mar 26, 2017 11:57 amYep it works. I saw a new commit at github though dated February 2017 (https://github.com/dradermacher/lan951x-led-ctl) downloaded and compiled it but could not get it to work
I did
Code: Select all
root@raspberrypi:~/git# apt-get install libusb-dev
root@raspberrypi:~/git# make
gcc -lusb llctl.c -o llctl
strip llctl
root@raspberrypi:~/git# ./llctl f0 l0 d0
Segmentation fault
Code: Select all
Raspberry Pi 3 Model B+
Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
Re: Controlling LAN LEDs individually
(double post please delete)
Last edited by Smrtka on Fri Jun 12, 2020 6:28 am, edited 1 time in total.
Re: Controlling LAN LEDs individually
Hello,
Did anyone test this on RPI 4 ? and if so can I please get step by step guide as I am not very good at Linux, I am running the new Raspbian OS, managed to get the ACT and PWR leds to be off but the ETH0 is quite strong leds and blinking
Did anyone test this on RPI 4 ? and if so can I please get step by step guide as I am not very good at Linux, I am running the new Raspbian OS, managed to get the ACT and PWR leds to be off but the ETH0 is quite strong leds and blinking
Re: Controlling LAN LEDs individually
for rpi4 add this to boot config.txt
Code: Select all
# Turn OFF Network LED's
dtparam=eth_led0=14
dtparam=eth_led1=14
RPI3^2 + RPI4 = 

Re: Controlling LAN LEDs individually
I'm also getting a segmentation fault when trying to run this on my Raspberry Pi 3 Model B Rev 1.2 running Arch. I see some others stating that here and only the reply "See the posts before yours for a different solution for 3B+", but there is no solution above that, maybe it was deleted. So has anyone figured out how to solve this?
(I've also tried the /boot/config.txt method at viewtopic.php?p=1445502&sid=f0624b63887 ... 6#p1445502 , it does nothing.)
Edit: This tool works fine for me: http://lrusak.libreelec.tv/public/lan951x-led-ctl
(I've also tried the /boot/config.txt method at viewtopic.php?p=1445502&sid=f0624b63887 ... 6#p1445502 , it does nothing.)
Edit: This tool works fine for me: http://lrusak.libreelec.tv/public/lan951x-led-ctl