Difference between revisions of "Mesh/Firmware/Web Admin Development"

From Sudo Room
Jump to navigation Jump to search
(Added link to github code repo)
m (adding resource links)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Web Admin Development ==


See [[Mesh/Firmware|Firmware Wants]] for a description of what we're hoping to be able to implement with our web admin page.
This used to be a page on our old Luci-based web admin UI, but that UI is being deprecated.


The code for the web admin is hosted here:
We are now writing [https://github.com/sudomesh/sudowrt-web-ui a new UI] that uses ubus via uhttpd-mod-ubus instead of Luci.


https://github.com/sudomesh/luci-app-peopleswifi
ubus is the system bus for OpenWRT, similar to D-Bus but very light-weight. Using ubus it is possible to configure all OpenWRT config files in the /etc/config directory, and even run scripts on the router. uhttpd-mod-ubus allows access to ubus over http with access restricted by access control lists. More info on this [http://wiki.openwrt.org/doc/techref/ubus#access_to_ubus_over_http here].


=== Luci ===
The new UI includes a simulator (written in node.js) that pretends to be a sudowrt router, which makes it easy for developers to test their client-side code without having to always have a sudowrt router with them.


Luci is the web admin framework that OpenWrt ships with and seems to be a popular choice among other projects. It is written in Lua, which is a sort of procedural language that's kind of a mix between javascript and ruby (??).
== Resource Links ==


All of the Luci code is contained on the router in /usr/lib/lua/luci
* [https://wiki.openwrt.org/doc/techref/ubus#access_to_ubus_over_http OpenWRT.org - Access to ubus over HTTP]
 
* [https://wiki.openwrt.org/doc/techref/luci2 Luci2 Web Interface Documentation]
Documentation related to the Luci project can be found at:
* [https://en.wikipedia.org/wiki/XMLHttpRequest Wikipedia - XMLHttpRequest]
 
* [https://github.com/sudomesh/sudowrt-firmware Github - SudoWRT-Firmware]
[http://luci.subsignal.org/trac/wiki/Documentation Luci Documentation]
 
Its a MVC framework, and files are separated into controller/ model/ and view/
 
There's a fairly similar package that we can probably take some cues from:
 
[https://github.com/openwrt-routing/packages/tree/master/luci-app-bmx6 bmx6 Luci Package]
 
 
We'll likely need every AP to serve a private WPA encrypted AP even if users have their own home router so that they can config the routers securely.

Latest revision as of 21:34, 10 May 2016

This used to be a page on our old Luci-based web admin UI, but that UI is being deprecated.

We are now writing a new UI that uses ubus via uhttpd-mod-ubus instead of Luci.

ubus is the system bus for OpenWRT, similar to D-Bus but very light-weight. Using ubus it is possible to configure all OpenWRT config files in the /etc/config directory, and even run scripts on the router. uhttpd-mod-ubus allows access to ubus over http with access restricted by access control lists. More info on this here.

The new UI includes a simulator (written in node.js) that pretends to be a sudowrt router, which makes it easy for developers to test their client-side code without having to always have a sudowrt router with them.

Resource Links