errazzor
Posts: 3
Joined: Mon Mar 14, 2016 9:03 am

Re: Controlling LAN LEDs individually

Fri Sep 15, 2017 10:25 am

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!

kara
Posts: 3
Joined: Mon Jan 29, 2018 4:12 pm

Re: Controlling LAN LEDs individually

Thu Mar 15, 2018 8:04 pm

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

User avatar
rpdom
Posts: 14701
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Controlling LAN LEDs individually

Thu Mar 15, 2018 8:25 pm

Did you install libusb-dev?

kara
Posts: 3
Joined: Mon Jan 29, 2018 4:12 pm

Re: Controlling LAN LEDs individually

Thu Mar 15, 2018 9:22 pm

er...... no.....

(works fine now)

*gets coat ;)

djace
Posts: 1
Joined: Wed Mar 21, 2018 10:06 pm

Re: Controlling LAN LEDs individually

Wed Mar 21, 2018 10:09 pm

Hello,

I'm currently getting, on the Raspberry Pi 3 Model B+:

Code: Select all

Segmentation fault

GamerGun
Posts: 3
Joined: Sat Apr 30, 2016 4:27 pm

Re: Controlling LAN LEDs individually

Tue May 01, 2018 8:27 pm

djace wrote:
Wed Mar 21, 2018 10:09 pm
Hello,

I'm currently getting, on the Raspberry Pi 3 Model B+:

Code: Select all

Segmentation fault

Yep same here..

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5282
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Controlling LAN LEDs individually

Tue May 08, 2018 6:21 pm

​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.

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Controlling LAN LEDs individually

Tue May 08, 2018 8:30 pm

dom wrote:
Tue May 08, 2018 6:21 pm
​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.
Would this work for Pi 3 v1.2 ?

Because mine still keep blinking after I add

Code: Select all

dtparam=eth_led0=14
dtparam=eth_led1=14
to /boot/config.txt

I did a rpi-update to 4.14.39-v7+ May 5, not help.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2279
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Controlling LAN LEDs individually

Sat May 12, 2018 10:18 am

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.

User avatar
bensimmo
Posts: 4123
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Controlling LAN LEDs individually

Sat May 12, 2018 11:09 am

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).

quadrplax
Posts: 1
Joined: Sun Jul 29, 2018 12:39 am

Re: Controlling LAN LEDs individually

Sun Jul 29, 2018 12:43 am

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.

User avatar
Paul Webster
Posts: 797
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK
Contact: Twitter

Re: Controlling LAN LEDs individually

Sun Jul 29, 2018 6:01 am

quadrplax wrote:
Sun Jul 29, 2018 12:43 am
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.
See the posts before yours for a different solution for 3B+

errazzor
Posts: 3
Joined: Mon Mar 14, 2016 9:03 am

Re: Controlling LAN LEDs individually

Fri Aug 10, 2018 12:39 pm

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

Msprg
Posts: 2
Joined: Thu Mar 30, 2017 11:11 am

Re: Controlling LAN LEDs individually

Mon Feb 04, 2019 12:31 pm

errazzor wrote:
Fri Aug 10, 2018 12:39 pm
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
HI,
a bit late, but if you still did not found the answer:

Just add these lines before

Code: Select all

exit 0
line of the /etc/rc.local

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
This should disable the leds altogheter during the bootup.

raspmod
Posts: 16
Joined: Sun Nov 25, 2018 3:48 am

Re: Controlling LAN LEDs individually

Tue Apr 23, 2019 12:44 am

mcduman wrote:
Sun Mar 26, 2017 11:57 am
Yep 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
Ditto

I did

Code: Select all


[email protected]:~/git#  apt-get install libusb-dev
[email protected]:~/git# make
gcc -lusb llctl.c -o llctl
strip llctl
[email protected]:~/git# ./llctl f0 l0 d0
Segmentation fault

I downloaded the file from this post.

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


Return to “General discussion”