I'm trying to access the GPIO from python context and I absolutely need to do it in a rootless way. (WSGI apache module)
I'm a newbie and noticed that this is the library command causing the error inside the python library:
Code: Select all
fd = open("/dev/mem", O_RDWR);
I do have /dev/mem on my armbian distro and clearly the access to /dev/mem is root limited, what's worst I don't have /dev/gpiomem
Is there a way to create /dev/gpiomem so I can add the apache
my findings about my Orange Pi Zero so far...
create group gpio if you do not have one and then add the users you need to it
KERNEL=="spidev*", GROUP="spi", MODE="0660"
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'chown -R root:gpio /sys/class/gpio && chown -R root:gpio /sys/devices/platform/soc/1c20800.pinctrl && chown -R root:gpio /sys/devices/platform/soc/1f02c00.pinctrl && chmod -R ug+rw /sys/class/g