
Anyone that has experimented with using the GPIO(General Purpose Input & Output) pins on the RPi may have noticed that their program must be run as root (with sudo). For me this is rather bothersome, I don't like running any program as root unless I absolutely have to. In my research I found that Gordon over at projects.drogon.net has an amazing Wiring like library for the Raspberry Pi called WiringPi ofcourse! He's also included a nifty GPIO command line utility which allows exporting GPIO to a "/sys/class/gpio/" interface thereby allowing user code to access the pins without being run as root.
I think we can do better! Lets talk Linux Kernel for a minute here, the kernel is a resource manager, the GPIO pins are a resource. The out of the box kernel doesn't support our gpio pins! Dang..... No problem we'll just write a Kernel Module to manage access to our GPIO pins.
There are a bunch of ways to provide access to the GPIO pins, in my case ioctl calls will work just fine.
So there's the background, heres the news:
I'm developing a linux kernel module that will provide an ioctl interface to the Raspberry Pi's GPIO pins so that programs in userspace can access the pins without being run as root.
The next steps are to write a wrapper for my modules low level interface to make using it more appealing in everday code. Following that I'm hoping to integrate it into WiringPi for an even more streamlined approach.
Stay tuned! I hope you are excited as I am!
Raspberry Pi is a trademark of the Raspberry Pi Foundation