@ -37,7 +37,7 @@ function detect_Node()
return data
end
function get_verbose_hw_info ( iface )
function get_verbose_hw_info ( iface )
local type = iwinfo.type ( iface )
if not type then
return " Unknown interface "
@ -48,27 +48,28 @@ end
return " Driver not supported "
end
-- Get the hardware name (e.g., "Generic MAC80211")
local hw_name = driver.hardware_name and driver.hardware_name ( iface )
if not hw_name or hw_name == " " then
hw_name = " Unknown hardware "
end
-- Get the list of supported modes (e.g., "802.11bgnac" )
local hw_modes_tbl = driver.hwmodelist and driver.hwmodelist ( iface )
local hw_modes_str = " "
if hw_modes_tbl then
local hw_modes = { }
for mode , _ in pairs ( hw_modes_tbl ) do
table.insert ( hw_modes , mode )
local hw_modes = driver.hwmodelist and driver.hwmodelist ( iface )
local supported_modes = { }
if hw_modes then
for mode , supported in pairs ( hw_modes ) do
if supported then
table.insert ( supported_modes , mode )
end
end
hw_modes_str = table.concat ( hw_modes , " / " )
end
if # supported_modes == 0 then
supported_modes_str = " No mode information "
else
hw_modes_str = " No mode information "
supported_modes_str = table.concat ( supported_modes , " / " )
end
-- Combine the hardware name with the supported modes
local verbose_info = hw_name .. hw_modes_str
local verbose_info = hw_name .. " ( " .. supported_modes_str .. " ) "
return verbose_info
end
@ -83,11 +84,6 @@ v:option(DummyValue, "lastseen", translate("lastseen"))
s = m : section ( TypedSection , " easymesh " , translate ( " Mesh Gateway & Node WiFi Settings " ) , translate ( " Choose Mesh Gateway or Mesh Node WiFi Settings: Begin by completing this section on your mesh server and nodes. Ensure each radio's WiFi network name is consistent. For example: easymesh_AC, easymesh_N. " ) )
s.anonymous = true
---- Eanble
o = s : option ( Flag , " enabled " , translate ( " Enable " ) , translate ( " Enable or disable Easy Mesh " ) )
o.default = 0
o.rmempty = false
-- Connection Type Dropdown
--o = s:option(ListValue, "backbone", translate("Connection Type"), translate("Choose if Node or Gateway is connected to internet by LAN or WiFi"))
--o:value("lan", translate("LAN"))
@ -111,11 +107,17 @@ o.rmempty = false
s : tab ( " setup " , translate ( " Basic Setup " ) )
s : tab ( " advanced " , translate ( " Advanced Settings " ) )
---- Eanble
o = s : taboption ( " setup " , Flag , " enabled " , translate ( " Enable " ) , translate ( " Enable or disable Easy Mesh " ) )
o.default = 0
o.rmempty = false
-- Move basic settings under the "Setup" tab
o = s : taboption ( " setup " , ListValue , " role " , translate ( " Mesh Mode " ) )
o : value ( " off " , translate ( " Node " ) )
o : value ( " server " , translate ( " Server " ) )
o : value ( " client " , translate ( " Client (advanced) " ) )
o : depends ( " enabled " , 1 )
o.rmempty = false
apRadio = s : taboption ( " setup " , ListValue , " apRadio " , translate ( " Mesh Radio " ) )
@ -129,18 +131,22 @@ uci:foreach("wireless", "wifi-device",
end )
apRadio : value ( " all " , translate ( " ALL " ) )
apRadio.default = " radio0 "
apRadio : depends ( " enabled " , 1 )
apRadio.rmempty = false
o = s : taboption ( " setup " , Value , " mesh_id " , translate ( " Mesh SSID " ) )
o.default = " easymesh_AC "
o : depends ( " enabled " , 1 )
enable = s : taboption ( " setup " , Flag , " encryption " , translate ( " Encryption WIP DROPDOWN " ) , translate ( " " ) )
enable.default = 0
enable.rmempty = false
encryption = s : taboption ( " setup " , Flag , " encryption " , translate ( " Encryption WIP DROPDOWN " ) , translate ( " " ) )
encryption.default = 0
encryption.rmempty = false
encryption : depends ( " enabled " , 1 )
o = s : taboption ( " setup " , Value , " key " , translate ( " Mesh Password " ) )
o.default = " easymesh "
o : depends ( " encryption " , 1 )
o : depends ( { enabled = " 1 " , encryption = " 1 " } )
o.password = true
-- Move K/V/R settings to the "Advanced" tab
enable_kvr = s : taboption ( " advanced " , Flag , " kvr " , translate ( " K/V/R " ) , translate ( " Enable Key Value Roaming " ) )