Ethernet activity led gpio change???
-
thank you for your answer, i will try your advices and I will write the results here...
-
It looks like i have a hardware design related problem. After I resolve it, i will check for led trigger issue.. thanks for your reply...
-
@crispyoz I have found the cause of hardware related problem on my custom design board. Ethernet is working now it is time to trigger setup for ethernet activity led.
I read many article about it. I saw kmod-ledtrig-netdev control structure. but i guess firstly i need to build a led directory symb link in /sys/class/leds/.. when i check i just see, omega2lte:amber:system and omega2lte:blue:wifi as led control symbolic links. So If i find a way to add here a new link for my custom gpio like omega2lte:white:ethernet, then i can try to use ledtrig-netdev.
Do you know how i can add a led to /sys/class/leds/ directory? Does it have to be done before compiling sources?
-
@optech The files in this directory are typically created by a kernel module that's managing those resources.
-
@crispyoz do you know how i can set that kernel module for custom leds?
-
@optech take a look at the wiki on this topic:
https://oldwiki.archive.openwrt.org/doc/uci/system#wifi_activity
If you are using a custom board with an additional LED, you may need to update the DTS to support this.
-
@crispyoz It works now!!! I write what i did to help people who need this info for future..
Before compiling, I changed the omega2 dts file (OMEGA2.dtsi) from target/linux/ramips/dts as below:
leds { compatible = "gpio-leds"; system_led: system { gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; }; eth0_led0: link { label = "omega2p:green:link"; gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; default-state = "off"; }; eth0_led1: data { label = "omega2p:orange:data"; gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; default-state = "off"; }; };
After I compile and load the binary, i see "omega2p:green:link omega2p:amber:system omega2p:orange:data" links in /sys/class/leds ..
Then i configured leds for ethernet using netdev-trigger using luci..
@crispyoz Thank you for your help.. It was very helpful..
By the way, it was my hardest led blinking work since 15 years
-
@optech Congratulations. I used this about 2 years ago to get my leds functional but then ended up using LedChain by @luz as my purpose was slightly different.
Did they have leds 15 years ago? I'm a bit young to know
-
@crispyoz I feel elderly now
-
This post is deleted!
-
@optech small victories lead to larger ones.