Doodle3D / doodle3d-firmware

The API of the Doodle3D WiFi box. This can for example talk to print3d, save settings, update the firmware etc.
www.doodle3d.com
GNU General Public License v2.0
13 stars 9 forks source link

Create seperate, better lua network module #32

Open peteruithoven opened 9 years ago

peteruithoven commented 9 years ago

Currently our network / wifi related code is very fragile and entangled with the Doodle3D-firmware code.

We currently rely on checking certain files (like /sys/class/net/wlan0/address), we use the iwinfo lua binding, ifconfig.

peteruithoven commented 9 years ago

Accessing utilities like iwinfo through ubus might also be interesting, see: http://wiki.openwrt.org/doc/techref/ubus#lua_module_for_ubus https://forum.openwrt.org/viewtopic.php?id=57554

De nieuwe Luci (LuCI2) lijkt ook ubus over http te gebruiken? http://wiki.openwrt.org/doc/techref/luci2 http://wiki.openwrt.org/doc/techref/ubus#access_to_ubus_over_http

peteruithoven commented 9 years ago

Someone on the mailinglist suggested writing a hotplug script instead of an init script. http://www.bangmoney.org/posts/2004-10-08-hotplug.html If I understand the OpenWRT wiki hotplug is replaced by procd: http://wiki.openwrt.org/doc/techref/hotplug This page on procd init scripts seems relevant: http://wiki.openwrt.org/inbox/procd-init-scripts

peteruithoven commented 9 years ago

procd will call '/sbin/hotplug $args' which is invoked from netifd via ubus...(hope you are confused now...) 8-)

More on hotplug: http://wiki.openwrt.org/doc/techref/hotplug

peteruithoven commented 9 years ago

Also see: https://github.com/Doodle3D/doodle3d-client/issues/224