Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Pertinax on March 28, 2022, 08:24:16 PM

Title: GPIO access without root
Post by: Pertinax on March 28, 2022, 08:24:16 PM
I am about to develop a GUI in Python to access GPIO, I2C, CAN bus on A20+Shield. I realize, that access to GPIO is only possible as root, which I dislike for an application
Is it possible to define a group my user belongs to and have this group be the owner of the necessary directories? If so, which do I have to set?

Thanks
Title: Re: GPIO access without root
Post by: LubOlimex on March 29, 2022, 11:58:13 AM
Not sure about that one. But you can check how years ago we did some Python modules for other boards in the past:

https://pypi.org/project/pyA20Lime2/
https://pypi.org/project/pyA20/

I am not even sure if these modules work with latest Olimage images but probably can be of help.
Title: Re: GPIO access without root
Post by: JohnS on March 29, 2022, 12:07:24 PM
There are posts on the net about how to access Linux gpio as non-root.

I'm reluctant to insult anyone by describing how to do web searches!!

John