ispro Posted September 25, 2021 Posted September 25, 2021 Hello, No access to GPIO without root. It is necessary for Moonraker. in group grep gpio /etc/group gpio:x:1001:isp isp@3dprinter:~$ echo 10 /sys/class/gpio/export 10 /sys/class/gpio/export but isp@3dprinter:~$ ls -lL /sys/class/gpio/ total 0 -rwxrwx--- 1 root gpio 4096 сен 25 23:10 export drwxr-xr-x 3 root root 0 сен 25 23:10 gpiochip0 drwxr-xr-x 3 root root 0 сен 25 23:10 gpiochip352 -rwxrwx--- 1 root gpio 4096 сен 25 23:10 unexport and isp@3dprinter:~$ sudo cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-223, parent: platform/1c20800.pinctrl, 1c20800.pinctrl: gpio-17 ( |orangepi:red:status ) out lo gpio-20 ( |reg_vcc_wifi ) out hi gpio-166 ( |cd ) in lo ACTIVE LOW gpio-204 ( |usb0_id_det ) in hi IRQ gpiochip1: GPIOs 352-383, parent: platform/1f02c00.pinctrl, 1f02c00.pinctrl: gpio-358 ( |vdd-cpux ) out lo gpio-359 ( |reset ) out hi ACTIVE LOW gpio-362 ( |orangepi:green:pwr ) out hi if i make echo 10 | sudo tee /sys/class/gpio/export then all ok isp@3dprinter:~$ sudo cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-223, parent: platform/1c20800.pinctrl, 1c20800.pinctrl: gpio-10 ( |sysfs ) in lo gpio-17 ( |orangepi:red:status ) out lo gpio-20 ( |reg_vcc_wifi ) out hi gpio-166 ( |cd ) in lo ACTIVE LOW gpio-204 ( |usb0_id_det ) in hi IRQ gpiochip1: GPIOs 352-383, parent: platform/1f02c00.pinctrl, 1f02c00.pinctrl: gpio-358 ( |vdd-cpux ) out lo gpio-359 ( |reset ) out hi ACTIVE LOW gpio-362 ( |orangepi:green:pwr ) out hi rc.local: chown -R root:gpio /sys/class/gpio chmod -R 770 /sys/class/gpio 99-gpio.rules SUBSYSTEM=="gpio", PROGRAM="/bin/sh -c 'chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio'" SUBSYSTEM=="gpio", PROGRAM="/bin/sh -c 'chown -R root:gpio /sys/devices/platform/soc/1c20800.pinctrl/gpiochip0/gpio && chmod -R 770 /sys/devices/platform/soc/1c20800.pinctrl/gpiochip0/gpio'" What am I doing wrong? I need to access GPIO without root to work with Moonraker. Thanks!
Werner Posted September 26, 2021 Posted September 26, 2021 Your issue report is not a valid bug report per the Armbian bug reporting instructions (https://www.armbian.com/bugs). With limited resources the Armbian project is only able to spend time on issues where all the requested information has been provided and for only the boards/images/software that are supported. Your report is invalid for one or more of the following reasons (non-exhaustive list): it is for an unsupported board or image (CSC/EOS/WIP/edge) it is for software that is not supported (such as userspace modules installed on top of the core operating system) it has been logged in the wrong forum (for example requests for help that are not actual bug reports) it lacks requested data (armbianmonitor output) it could have been easily solved by a quick search and/or reading documentation Please review what you have submitted and the bug logging instructions (https://www.armbian.com/bugs) and either add the required information or open a new topic in the correct forum (such as Common issues / peer to peer technical support or General chit chat)
Recommended Posts