OpenWrt Forum Archive

Topic: C from Django(Web)

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

How I can run C application from OpenWRT on Django Web without any other interact?

I wrote program which turn on and turn off led (low-level, direct register access) and i have to run this from Django Web ( with turn on button and turn off button).

How I can run this from Django (OPKG)?

Is it possible?
If not, how I can run C program from OpenWRT when I click on web button?


Thank you very much !

(Last edited by bane on 30 Jan 2017, 13:18)

bane wrote:

how I can run C program from OpenWRT when I click on web button?


Lua programming language is used in OpenWRT GUI and it has very useful tools and functions with which you can Call any program/script on button click event.


bane wrote:

How I can run C application from OpenWRT on Django Web without any other interact?


I havn't used Django but i have some python experience. Well, you can use os.system() call in your Django application to call your C-program (i.e. executable)..

(Last edited by th3gr8 on 30 Jan 2017, 18:02)

The discussion might have continued from here.