Control GPIO port from user application
asked 2016-02-07 03:24:47 +0300
This post is a wiki. Anyone with karma >75 is welcome to improve it.
I am going to release app soon but I don't know how to control GPIO (for i2c purpose) from Jolla application as writing to /sys/class/gpio needs root priviliges:
QProcess sh;
sh.start("sh");
sh.write("echo 67 > /sys/class/gpio/export"); // Bad things will happen as nemo is not root!
sh.closeWriteChannel();
sh.waitForFinished();
Any thoughts?
Check @kimmoli's I2C Tool source code
jollailija ( 2016-02-07 14:36:55 +0300 )edityep, root is needed for that.
kimmoli ( 2016-02-07 14:38:30 +0300 )editUh, how I am suppose to release app that needs root privileges (to use INT port)? @kimmoli ?
Mandrako ( 2016-02-07 17:39:59 +0300 )edit@Mandrako OpenRepos ? :)
MartinK ( 2016-02-08 10:30:28 +0300 )editWell, @kimmoli's app is available at Store, does it not use root stuff? I'm a bit confused, maybe I should check the code.
What is your app about, by the way? Are you selling some kind of TOHs?
jollailija ( 2016-02-08 10:44:47 +0300 )edit