I am using the python periphery library to drive an eink display. currently I have to run my code with sudo permission everytime. I would like to give my user permanent gpio and spi permission. I know on Rpi 5 there are user groups for that.
May I know the details for the eink display and how you connect to Rubik Pi 3?
Seems like itâs not simply a permission question.
It might need additional configuration for the 40-pin connector.
RubikPi can be connected to the SPI display via the 40-pin connector; you may proceed with the relevant adaptation work.
Regarding the permission matter, we are currently syncing this issue internally.
Itâs mentioned by the post that some operation needs user group âdialoutâ, this is easy to fix, you can add dialout group permission to user ubuntu by:
sudo usermod -a -G dialout ubuntu
You need to logout and login to make the new group permission effective.
I checked the UART from 40-pin is using dialout group:
$ ls -l /dev/ttyHS2
crw-rw---- 1 root dialout 236, 2 Oct 30 22:51 /dev/ttyHS2
So UART access can be resolved.
But itâs also mentioned a new udev rules by that post. For that, I think it need to create the udev rule for rubik pi. Itâs related to the use case, that I donât have on hand.
Is there any updates to this issue? I have been trying to use periphery but even after changing the udev rules I still get Permission denied. it seems that its trying to access sysfs gpio. Are there any other example of using GPIO on the rubik pi with another library like gpiod?
I resolved the issue. So the issue is that I was using sysfsGPIO with GPIO(Pin, âoutâ) and that is what causes the permission errors. By changing the way I was calling the GPIO function with 3 parameters instead GPIO(GPIOCHIP, Pin, âoutâ), it calls the cdevGPIO and with the udev rules there are no permission issues.