I am somewhat of a newbie, so please let me know if there is a way I can go about this better.
I'm working on doing some LED coding (WS8201 strip) with node.js and it appears I am having trouble accessing /dev/mem. I have spent hours on this and tried pretty much every I can find regarding permission issues. (here, here, here, and many other places)
My issue is regarding this tutorial. During the install section I am receiving the following error regarding permission.
cat >/etc/udev/rules.d/20-gpiomem.rules <<EOF
SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio", MODE="0660"
EOF
-bash: /etc/udev/rules.d/20-gpiomem.rules: Permission denied`
I went ahead and tried running some test code anyways and received the following error.
bcm2835_init: Unable to open /dev/mem: Permission denied
/home/pi/node_modules/rpio/lib/rpio.js:104
return bindfunc(optarg);
^
Error: Could not initialize bcm2835 GPIO library`
I am unsure if these errors are directly related or what to do from here since I've tinkered with permission settings for hours and nothing seems to work. I appreciate the help and please let me know if there is additional information needed!
Thank you
/dev/mem
requires root permission - for compiled c code this can be managed but python requires programs to be run withsudo
. pigpio has access, but I do not know if helps with java./dev/gpiomem
provides access to members of groupgpio
– Milliways Oct 07 '18 at 03:28