Controlling GPIO - General discussion

Hello fellow OpenWRT users and coders,

I am new to this forum but not to OpenWRT. I have been using it several years now and have grown very fond of it.

But to my dismay, there is one part of OpenWRT that is still kind of inaccessible to many users due to the fact they are not coders but power users or network engineers. I am talking about effectively and easily controlling GPIO lines on devices with a GPIO so one can add LEDs or buttons/switches to the configuration without having to resort to having to write a patch or some modification to the kernel (I for one have no idea how to do this - I am a network engineer who happens to like to use OpenWRT for his private projects). I use different models of Raspberry Pi, including the Rpi 4B.

I would like you, fellow forum users and in particular users who would also like to have this ability, to chip in in this discussion. I will be asking many question and ultimately my goal is to have LUCI support for easy and quick control over GPIO lines. Again, I am no coder. I am hoping someone with the needed expertise will donate some time to help me with this endeavour.

Of course there already may be a solution to this, but I have scoured Google for any helpful information and any solution I could find requires one to have a fair bit of knowledge of coding.

I know there is the sysfs method but I am talking about low-latency, kernel controlled GPIO control that can be triggered in the case of an output (extra LEDs).

Thank you so much in advance. Kind regards.

Paul.

OOTB unlikely... one mans input is another mans output

3 words in config.txt ( non-openwrt specific see raspi(os)an forums ) and some uci system led definitions ( not too complex ) is not exactly coding...

(re)search, test, rinse and repeat...

which 3 words in config.txt and which UCI commands?

If you're talking about sys/class/leds and sys/class/gpio, that will only work if the latency is very low, as in milliseconds.

@PaulF [OT] What does WRT stand for?

Blockquote [OT] [What does WRT stand for? ]

Not sure why you are asking this? Remnant of the days that OpenWRT was developed for Linksys WRT routers/access points. I assume WRT stands for Wireless RouTer, I never really looked it up.

Just read the post I linked to and please stop using wrong project name. It's OpenWrt, not OpenWRT. EOT.

1 Like

I didn't realise spelling the name was more important than the function of this forum, which is asking/offering help.

All Answers i got till now have either been cryptic or are to argue I spelled Wrt with all caps. WTF?
Just saying, and it's a bit disappointing.
-edit- nevermind.

I think you misunderstood my OT (off topic!) comment. It's my private war against people stating that they use the project for several years and at the same time aren't able to spell its name correctly :slight_smile: Don't take it personally.

Your post is just 14h old... be patient and don't get upset if nobody else joins the discussion.

Sorry for that!

1 Like

Oh well, no harm done. I may have overreacted. The thing is I've been hunting for a way to configure GPIO leds, but mostly it meant modifying the DTS. That means i have to learn a whole subject just for one modification, time I don't have. I am a network engineer, not a software developer. I need some crucial help to get me on my way to my goal. From wulfy's hints I understand it's possible to define GPIO leds in the config.txt?