I ran a full release upgrade, through the GUI, on my raspberry pi 3b and now i get an error about needing privileges to access /dev/gpiomem. I've had this issue using RPi.gpio in python and using the gpio utility from wiringpi.
I used it before the upgrade so I don't think anything about my user should be the issue.
I'm sure there's something obvious I'm missing here, but I appreciate the help. Thanks for the help.
1 Like
So I figured out a solution. Might not be the best answer, but it's what I got. I added my user to group called dialout and then added that group to /dev/mem and /dev/gpiomem. I used the commands below. I also had to do the same for the SPI and I2C interfaces in /dev/ too but you may not need that.
sudo usermod -aG dialout [your username]
sudo chown root.dialout /dev/mem
sudo chmod g+rw /dev/mem
sudo chown root.dialout /dev/gpiomem
sudo chmod g+rw /dev/gpiomem
If anyone has a better answer, please let me know.
2 Likes