Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » running Lua Remote Application - Permission denied
running Lua Remote Application - Permission denied [message #1416915] Tue, 11 June 2013 10:37 Go to next message
Marc Zesty is currently offline Marc ZestyFriend
Messages: 6
Registered: June 2013
Junior Member
Hello Guys,

i try to run a script via Remote, but I get following Error Message:
sh: 1: cannot create /sys/class/gpio/export: Permission denied


> os.execute("echo GPIO4 > /sys/class/gpio/export")
> os.execute("echo out > /sys/class/gpio/gpio4/direction")
> os.execute("echo 1 > /sys/class/gpio/gpio4/value")
> os.execute("echo 0 > /sys/class/gpio/gpio4/value")


works fine in ssh Terminal when I start the interpreter with "sudo lua"

Question:
How to run a remote script as superuser to access GPIO?

Sorry, of course you should know ... I'm using a Raspberry Pi

Kind Regards
Re: running Lua Remote Application - Permission denied [message #1416916 is a reply to message #1416915] Tue, 11 June 2013 10:46 Go to previous messageGo to next message
Eclipse UserFriend
Hello Marc,

As you noticed you should be a superuser indeed for manipulating the GPIO. Therefore, instead of connecting to your remote system using pi/raspberry as I am pretty sure you are doing, you should rather create a root user and then configure your remote system in Eclipse to use this login.
Enabling the root user is pretty simple, see http://www.instructables.com/id/Control-Stuff-with-your-Raspberry-Pi-GPIO/step2/Root-account/

Also, maybe doing something as simple as

> os.execute("sudo echo GPIO4 > /sys/class/gpio/export")

may work, maybe?

On a side note, have you looked at http://www.eclipse.org/mihini? We are working on providing a nice GPIO API in it (see http://git.eclipse.org/c/mihini/org.eclipse.mihini.git/log/?h=bugs/401629) but that still requires super-privileges.
Re: running Lua Remote Application - Permission denied [message #1416917 is a reply to message #1416916] Tue, 11 June 2013 11:11 Go to previous messageGo to next message
Marc Zesty is currently offline Marc ZestyFriend
Messages: 6
Registered: June 2013
Junior Member
Hello Benjamin,

of course I looked at Mihini ;).
But I found a statement at sierrawireless .. eclipsecon2013-m2m-tutorial .. slides .. (I'm not allowed to post a link)
-> Local communication protocols
-> Many more to come! (e.g. GPIO)

So I thought GPIO is a future thing.

In addition I need for local use on my RasPi I2C and Modbus-ethernet (SPI nice to have)

Thank you for taking the time ...
Re: running Lua Remote Application - Permission denied [message #1416918 is a reply to message #1416917] Tue, 11 June 2013 11:48 Go to previous messageGo to next message
Marc Zesty is currently offline Marc ZestyFriend
Messages: 6
Registered: June 2013
Junior Member
Hello Benjamin,

the tutorial from the link you posted is working.
Now I can run my lua script remote with GPIO access.
Great

Thank you
Re: running Lua Remote Application - Permission denied [message #1416919 is a reply to message #1416918] Wed, 12 June 2013 04:45 Go to previous message
Eclipse UserFriend
Awesome! :)
I would highly encourage you to give feedback to the Mihini people on the project mailing list https://dev.eclipse.org/mailman/listinfo/mihini-dev
I2C would be a nice addition and I believe there is a bug tracking that already in Mihini's bug tracker.
Regarding Modbus ethernet, this should be available already ; have you had problems with the API? See http://www.eclipse.org/mihini/api-documentation/modbustcp.html

Cheers!
Benjamin.
Previous Topic:Windows Koneki and Corona first steps setup
Next Topic:Does code assistance only work if you have the lua module associated with the documents
Goto Forum:
  


Current Time: Thu Mar 28 23:34:31 GMT 2024

Powered by FUDForum. Page generated in 0.04774 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top