Wiki info on how to get non-root RPI GPIO access is wrong

Problems with packages? Post here, using [tags] of the package name.

Wiki info on how to get non-root RPI GPIO access is wrong

Postby erkexzcx » Sun Sep 15, 2019 6:01 pm

Hi.

Instructions at the bottom of this page -> Wiki called Non-Root GPIO does not work.

For example, I try to run my C app using regular user and get this:
$this->bbcode_second_pass_code('', 'wiringPiSetup: Unable to open /dev/mem or /dev/gpiomem: Permission denied.
Aborting your program because if it can not access the GPIO
hardware then it most certianly won't work
Try running with sudo?')

But if I try as root user - everything works as expected.

Yes, I did add myself to tty group as per instructions, but still does not work. What else I could try?
erkexzcx
 
Posts: 1
Joined: Sun Sep 15, 2019 5:51 pm

Re: Wiki info on how to get non-root RPI GPIO access is wron

Postby ArchGalileu » Fri Nov 01, 2019 3:16 am

It happens to me also.

Very frustrating :(

Any advice from community?

Best regards
ArchGalileu
ArchGalileu
 
Posts: 2
Joined: Wed Nov 18, 2015 2:54 pm

Re: Wiki info on how to get non-root RPI GPIO access is wron

Postby lategoodbye » Fri Nov 01, 2019 3:11 pm

A lot of so-called GPIO libraries accesses the IO register of the BCM2835 directly via /dev/mem or indirectly via /dev/gpiomem (requires rpi downstream driver). Both ways are a security nightmare. Every good distribution should avoid this.

The hardware independent way would be to use sysfs or the new libgpiod.
lategoodbye
 
Posts: 124
Joined: Sat Dec 29, 2018 1:24 am


Return to Packages

Who is online

Users browsing this forum: No registered users and 54 guests