s=m:section(TypedSection,"easymesh",translate("Enable Router as DHCP Mesh Node"),translate("Set up Easy Mesh WiFi on your server and nodes first. All mesh nodes will utilize your mesh server for DHCP. "))
s.anonymous=true
-- s = m:section(TypedSection, "easymesh", translate("Enable Router as DHCP Mesh Node"), translate("Set up Easy Mesh WiFi on your server and nodes first. All mesh nodes will utilize your mesh server for DHCP. "))
-- s.anonymous = true
---- ap_mode
enable=s:option(Flag,"ap_mode",translate("Enable as DHCP Mesh Node"),translate("Important: Setup your mesh WiFi network before enabling."))
enable.default=0
enable.rmempty=false
---- ip address
--o = s:option(Value, "ipaddr", translate("Static IP Address"))
--o.default = "192.168.8.2"
--o.datatype = "ip4addr"
--o:depends("ap_mode", 1)
o=s:option(Value,"dns",translate("Mesh Gateway IP Address"))
btnAPMode=s:taboption("apmode",Button,"_btn_apmode",translate("Join Mesh Network"),translate("WARNING: THIS WILL CHANGE THIS NODE'S IP ADDRESS, YOU WILL LOOSE ACCESS TO THIS UI"))
functionbtnAPMode.write()
luci.sys.call("/easymesh/easymesh.sh apmode")
end
btnAPMode:depends("role","off")
---- ip address
--o = s:option(Value, "ipaddr", translate("Static IP Address"))
--o.default = "192.168.8.2"
--o.datatype = "ip4addr"
--o:depends("ap_mode", 1)
-- o = s:option(Value, "dns", translate("Mesh Gateway IP Address"))
-- o.default = "192.168.8.1"
-- o.datatype = "ip4addr"
-- o:depends("ap_mode", 1)
-- o = s:option(Value, "netmask", translate("IPv4 netmask"))
-- o.default = "255.255.255.0"
-- o.datatype = "ip4addr"
-- o:depends("ap_mode", 1)
-- MESH Node Control: apply mesh settings
ctrl=m:section(TypedSection,"easymesh","Click Save Then Enable or Disable Your Mesh WiFi settings")