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

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


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 ... =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: No registered users and 3 guests