Page 1 of 1

Run EV3 C-programs without a network connection

Posted: 24 Oct 2013, 02:19
by lvoc
I found a way of running native c-programs directly from the EV3 menu and without using a network connection. I am making the details available at:
http://www.robotnav.com/run-programs-without-network/

Re: Run EV3 c-programs without a network connection

Posted: 24 Oct 2013, 11:15
by gloomyandy
Interesting. Can you access sensors and other devices without the Lego VM interfering with them?

Re: Run EV3 C-programs without a network connection

Posted: 24 Oct 2013, 16:52
by pepijndevos
Very good find!

I wonder indeed if the C program can access the sensors without freaking out lms.

Possibly, this program could communicate over stdio with the system call and control the motors and sensors. That'd be a lot of work probably. Or maybe it could simply allow reverse arbitrary code execution? :P

Re: Run EV3 C-programs without a network connection

Posted: 24 Oct 2013, 17:25
by pepijndevos
The assembler itself can be found here: https://github.com/mindboards/ev3source ... embler.jar

Re: Run EV3 C-programs without a network connection

Posted: 24 Oct 2013, 22:09
by lvoc
I think this method has the potential of “preventing” problems with the Lego-VM. The fact that the VM is in charge of executing the C-program, also guarantees that all the services will be available for this single program. This is not the case when the program runs within a terminal, since users may still be able to run a Lego-program using the menus, which can cause conflicts.

Re: Run EV3 C-programs without a network connection

Posted: 25 Oct 2013, 15:21
by totokan
What is preventing you from just writing a rudimentary shell to run on top of the official VM? If you wanted to you could implement it using the current API that John Hansen released for button and screen manipulation, with some low-level linux system calls to handle directory reading and running programs. Come to think of it, I may try this myself!