Omega2 wifi led access from c in Openwrt 21.x
-
I have been trying to use the onboard wifi amber led to show a status from my program. The latest mraa library seems too difficult to use and seems to still use the deprecated sysfs method. Now libgpiod seems the replacement in version 21.x and the preferred character devices method. I have tried using both sysfs and libgpiod to access this device which resides on gpiochip1 line 12 but I get a resource busy - presuming the kernel is holding onto it. I don't want to have to resort to creating a custom kernel just to do this. Hoping someone has experience in dealing with this issue. Thanks in advance.
-
@altr I'm not sure about OpenWrt 21, but check out this wiki about how to control the LED via a trigger.
http://onioniot.github.io/wiki/Tutorials/Blinking-Morse-Code-on-LED.html
I know it works as it is one of the earlier things I tried when learning about the Omega2.