That’s the section heading on page 302 of Derek Molloy’s second edition “Exploring Beaglebone”
I found the section lacking in information on exactly how to do this. A web search showed up the following pages.
https://github.com/adafruit/adafruit-beaglebone-io-python/issues/137
https://linuxize.com/post/how-to-add-user-to-group-in-linux/
https://github.com/cnobile2012/RobotControl/tree/master/contrib
I’m still not sure of the actual process with this revision of the OS.
debian@ebb:~/lazarus$ uname -a
Linux ebb 4.14.108-ti-r136 #1stretch SMP PREEMPT Mon Jun 8 15:38:30 UTC 2020 armv7l GNU/Linux
Robert Nelson mentions 4.11+ as having support for “it” so is any of what is in the first link needed?
“it’s created after you export 0 (or 1) in the pwm system node. only v4.11.x+ has the udev patch for permissions. (didn’t want to break older userspace, we still need to fix bonescript before i backport that patch to v4.4.x/v4.9.x)”
I don’t have a
/etc/udev/rules.d/80-gpio-permissions.rules
So I’m thinking I do have to create that file with
KERNEL==“gpio*”, SUBSYSTEM==“gpio”, ACTION==“add”, PROGRAM="/usr/local/bin/udev-gpio-permissions.sh"
And then create the shell script as outlined but with user debian in group gpio?
Eg:
chown -R nick:digital /sys/devices/gpio
becomes
chown -R debian:gpio /sys/devices/gpio
That’s where it starts to fall apart for me as far as instructions go. There’s an assumption of knowledge about something except I don’t know what that is.
debian@ebb:~/lazarus$ ls -al /etc/udev/rules.d/
total 84
drwxr-xr-x 2 root root 4096 Apr 24 17:05 .
drwxr-xr-x 4 root root 4096 Jul 14 2020 …
-rw-r–r-- 1 root root 372 Jul 10 2020 10-of-symlink.rules
-rw-r–r-- 1 root root 48 Oct 7 2018 50-hidraw.rules
-rw-r–r-- 1 root root 44 Oct 7 2018 50-spi.rules
-rw-r–r-- 1 root root 142 Oct 7 2018 60-omap-tty.rules
-rw-r–r-- 1 root root 921 Jul 10 2020 80-eeprom-noroot.rules
-rw-r–r-- 1 root root 569 Feb 25 06:10 80-gpio-noroot.rules
-rw-r–r-- 1 root root 308 Feb 25 06:10 80-i2c-noroot.rules
-rw-r–r-- 1 root root 2113 Feb 25 06:10 81-pwm-noroot.rules
-rw-r–r-- 1 root root 339 Feb 1 2019 82-gpio-config-pin.rules
-rw-r–r-- 1 root root 359 Jul 10 2020 83-eqep-noroot.rules
-rw-r–r-- 1 root root 509 Aug 15 2018 84-gpio-noroot.rules
-rw-r–r-- 1 root root 188 Aug 15 2018 85-gpio-noroot.rules
-rw-r–r-- 1 root root 1414 Jul 10 2020 86-remoteproc-noroot.rules
-rw-r–r-- 1 root root 352 Jul 10 2020 86-rpmsg-noroot.rules
-rw-r–r-- 1 root root 218 Jul 10 2020 87-iio-noroot.rules
-rw-r–r-- 1 root root 308 Feb 25 06:10 88-leds-noroot.rules
-rw-r–r-- 1 root root 855 Oct 7 2018 beagle-tester.rules
-rw-r–r-- 1 root root 97 Oct 7 2018 tisdk.rules
-rw-r–r-- 1 root root 108 Oct 7 2018 uio.rules
debian@ebb:~/lazarus$
From
debian@ebb:~/lazarus$ more /etc/group
I get:
gpio:x:999:debian,node-red,john
What else is required so I don’t have to use sudo for C, Lazarus or python programs to access GPIO?
debian@ebb:~/lazarus$ cat /etc/udev/rules.d/80-gpio-noroot.rules