Questions tagged [luci]

LuCI (a WebUI for OpenWrt)

LuCI was founded in March 2008 as "FFLuCI" as part of the efforts to create a port of the Freifunk-Firmware from OpenWrt? Whiterussian to Kamikaze.

The initial reason for this project was the absence of a free, clean, extensible and easily maintainable web user interface for embedded devices. While most similar configuration interfaces make heavy use of the Shell-scripting language LuCI uses the Lua programming language and splits up the interface into logical parts like models and views, uses object-oriented libraries and templating. That ensures a higher performance, smaller installation size, faster runtimes and what is even more important: better maintainability.

Meanwhile LuCI evolved from a MVC-Webframework to a collection of several libraries, applications and user interfaces with general purpose for Lua programmers while the focus still remains on the web user interface which also became an official part of OpenWrt? Kamikaze.

References :

http://luci.subsignal.org/trac

57 questions
4
votes
1 answer

Install LuCI on ubuntu instead of OpenWRT

I have a Linux board with Ubuntu Trusty on it - this board has WiFi, ethernet port and GPRS modem as well. In addition to my application running on it, I am looking to install LuCI on it so that I can use that Linux board as a router and use LuCI as…
A1-C
  • 63
  • 1
  • 1
  • 6
3
votes
1 answer

download file from luci web user interface (openWrt Luci)

I want to allow user to download some files using Luci web user interface of my openWrt linux . I have uploaded my files in /etc and /tmp folders of openWrt. But i dont know how can i give a url of this uploaded files to user . Can any one help me ?…
mirjafarabedi
  • 133
  • 2
  • 8
2
votes
1 answer

How can i extract values except double quotes in lua

this is a string "'"id"':001 (it is visualized "id":001) I want to capture only the values in lua. if there is not double quotes, i can extract values only. (use something:gmatch((%a+)%sd:%s(%d+))) Is there anyone who solve this problem?
darren
  • 103
  • 7
2
votes
1 answer

How to pass command line argumets inside Luci openwrt sys.exec() function ?

I want to execute a sys.exe function with command line arguments . my code is var1 = "myname" var2 = "address" function btn.write() luci.sys.exec("/bin/register $var1 $var2") end This is wrong i know . How can i pass arguments to a sys.exe…
user2986042
  • 776
  • 1
  • 9
  • 27
2
votes
1 answer

How to map with multiple config files

Work on openwrt luci.I have multiple configuration files like: network and wireless face problem in mapping.I use bellow syntax for mapping m = Map("network", translate("Wireless Settings")) How to map with multiple config files in one model
shamim
  • 6,186
  • 19
  • 71
  • 139
2
votes
1 answer

how to reload /usr/lib/lua/luci/dispatcher.lua after a modification without restart the board?

Queston: on an openwrt board I've done some adhoc modification to some luci files i.e. /usr/lib/lua/luci/dispatcher.lua, how can it be reloaded into use without a total restart of the board?
Bruce Lu
  • 53
  • 1
  • 5
1
vote
1 answer

how to update cbi variable in luci web interface using lua code before commit?

I'm trying to modify each element in the dynamic list and if those modification went ok and the validation passed, i want to commit the updated variable and not the original. example: i pass "A B C" and "1 2 3 ABC" and i want the function to save…
shadow
  • 527
  • 1
  • 5
  • 16
1
vote
0 answers

How to re-render the form data after successful AJAX request using jQuery

I have a template which is rendered dynamically from Luci. If any of the fields are modified, on click of save, i am making a jQuery AJAX post call which updates the data in back-end and returns response to callback of ajax. If any of the field is…
Divya
  • 77
  • 1
  • 7
1
vote
0 answers

How to create buttons in openWRT Luci Lua code

I need to create one butten in the header of OpenWrt UI. how can i achive this using Luci Lua code.
1
vote
1 answer

Does Luci have print function?

I want to print my parsing value at Luci. Here is my code. local val = {} mm = Map("test", translate("For TEST")) test=mm:section(TypedSection, "test", translate("TEST")) test.anonymous = true test.addremove = false rssis = test:option(DummyValue,…
darren
  • 103
  • 7
1
vote
1 answer

How to get a particular word/string in lua regex

I have a problem to get a string. Here is my code: conf = "option fn_o 'Operator'" print(conf) local s, e, pa = string.find(conf, "\b(?!option|fn_o)\b\w+") print(s, e, pa) I want to get an Operator only. In Javascript, that regex works good, but in…
darren
  • 103
  • 7
1
vote
1 answer

How can I catch the values in changed config file

I have caught the value in the config file like this: file = io.open("testch", "r") -- testch is config file in same directory file:read("*l") file:seek("cur", 17) version = file:read("*l") _, _, version = string.find(version,…
darren
  • 103
  • 7
1
vote
1 answer

How to pass array in XHR.get request of Luci openwrt?

I am trying to send array from javascript to XHR.get request in Luci Openwrt . var myarray[] has some contents . for example : `myarray[] = {"1","2","3"}` I need to pass this array to XHR.get requests as arguments . How can i pass this array ?…
vkp_stack
  • 147
  • 12
1
vote
0 answers

Luci.sys.exec() function shows syntax error when adding a variable

I'm trying to print IP address of a particular interface using luci.sys.exec() function. My requirement is to add a variable which consists of the interface name for eg: eth0 or eth1. code executed is : local interfacename=…
Amritha
  • 11
  • 1
1
vote
1 answer

UCI. Lua script. How to edit firewall rule

I have redirect rules for one host in my config, but sometimes I need to change the…
B Jackson
  • 79
  • 8
1
2 3 4