Using GPIOlib as a non-root user on ATSAMA5D31-EK

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

ThoWe
Posts: 2
Joined: Wed May 29, 2013 1:43 pm

Using GPIOlib as a non-root user on ATSAMA5D31-EK

Wed May 29, 2013 2:19 pm

Hi,

I need to control some GPIO pins on the ATSAMA5D31 evaluation kit with a normal non-root user. Therefore I must change the file permission in for instance /sys/class/gpio.

I found in the Raspberry Pi forum http://www.raspberrypi.org/phpBB3/viewt ... =29&t=9667 how this could actually be done using udev rules like this:

SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chown -R pi:pi /sys%p'"

But it doesn't work here. The permissions are still root:root.

I also tried to set the correct permissions using a init script. This works, but is IMO not very elegant.

Could you please show me a way how to do this correctly e.g. via udev rules?
Thank you.

Return to “LINUX”

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 9 guests