% local uci = require "luci.model.uci".cursor() local ntm = require "luci.model.network".init() local sys = require "luci.sys" local redir_page = 0 local devices = ntm:get_wifidevs() local changes = uci:changes("wireless") local iface_num = uci:get('functionlist','vendorlist','AP_WIFI_IFACE_NUM') local HWMODE_AX = uci:get('functionlist','functionlist','HWMODE_AX') local MAX_CLIENT_LIMIT = uci:get('functionlist','vendorlist','CONNECTION_LIMIT_NUM') or 127 local RSSI_THRESHOLD_MAX = uci:get('functionlist','vendorlist','RSSI_THRESHOLD_MAX') or -60 local RSSI_THRESHOLD_MIN = uci:get('functionlist','vendorlist','RSSI_THRESHOLD_MIN') or -100 local JAPAN_COUNTRY_ID if uci:get("functionlist","functionlist","SUPPORT_JAPAN_BANDWIDTH_HT80") == '1' then JAPAN_COUNTRY_ID = 4015 else JAPAN_COUNTRY_ID = 392 end if changes.wireless then for s, c in pairs(changes.wireless) do for option, v in pairs(c) do if option == "obeyregpower" then -- redir_page = 1 break end end end end local disabled_radio2G = "1" local disabled_radio5G = "1" local disabled_radio52G = "1" uci:foreach("wireless", "wifi-iface", function(s) if s.device == "wifi0" and (s.mode_display == "ap" or (s.mode_display == "wds_ap" and s.nawds == "0")) then if s.disabled == "0" then disabled_radio2G = "0" end end if s.device == "wifi1" and (s.mode_display == "ap" or (s.mode_display == "wds_ap" and s.nawds == "0")) then if s.disabled == "0" then disabled_radio5G = "0" end end if WLAN5G_2=="1" then if s.device == "wifi2" and (s.mode_display == "ap" or (s.mode_display == "wds_ap" and s.nawds == "0")) then if s.disabled == "0" then disabled_radio52G = "0" end end end end) if uci:get('functionlist','functionlist','SUPPORT_REPEATER_MODULE') == '1' then local sta_ap_ap = {} for _, dev in ipairs(devices) do sta_ap_ap[#sta_ap_ap+1] = ntm:get_wifinet_index(dev:name(),"sta_ap",tonumber(1)):name() end end if uci:get('functionlist','functionlist','SUPPORT_AP_RP_SETUP_WIZARD') == "1" and uci:get("system","firmware","first_login") == "1" then redir_page = 1 end %> <%if redir_page ~= 1 then%> <%if uci:get('functionlist','functionlist','SUPPORT_MYID') == '1' then%> <%+myid%> <%end%> <%+header%> <%end%> <% local radioNum,wifi_dev=0,{} if WLAN24G == '1' then radioNum=radioNum+1 wifi_dev["2.4G"]={"wifi0"} end if WLAN5G == '1' then radioNum=radioNum+1 wifi_dev["5G"]={"wifi1"} if WLAN5G_2=="1" then table.insert(wifi_dev["5G"], "wifi2") end if WLAN5G_2 == '1' then --[[ #### WLAN5G_2 feature ### --]] radioNum=radioNum+1 end --[[ #### WLAN5G_2 feature ### --]] end local devs={} devs["2.4G"]={} --[[ record 2.4G radio --]] devs["5G"]={} --[[ record 5G radio --]] local wifi_ap_enable = {} --[[ record if wifi really up --]] local wifi_all_net={} --[[ record the interfaces of the device --]] for _, dev in ipairs(devices) do wifi_all_net[dev:name()] = dev:get_wifinets_all() if filterRadio and dev:name()==filterRadio then else for i, v in pairs(wifi_dev) do for a, b in pairs(v) do if dev:name() == b then table.insert(devs[i], dev:name()) end end end end if dev:name()=="wifi1" or dev:name()=="wifi2" then wifi_ap_enable[dev:name()] = "0" for _, net in ipairs(wifi_all_net[dev:name()]["all"]) do if net:noise() ~= 0 then wifi_ap_enable[dev:name()] = "1" end end end end local enjet_name local mgmt_name for _, dev in ipairs(devices) do local nets = wifi_all_net[dev:name()]["all"] for i, net in ipairs(nets) do option = net:name():match("wifi1_enjet") or "" if option ~= "" then networkName_enjet = net:id() end if uci:get('functionlist','vendorlist','MANAGEMENT_SUPPORT_RADIO') == '1' then option = net:name():match("wifi0_mgmt") or "" elseif uci:get('functionlist','vendorlist','MANAGEMENT_SUPPORT_RADIO') == '2' then option = net:name():match("wifi1_mgmt") or "" end if option ~= "" then networkName_mgmt = net:id() end end end local arpcache = { } sys.net.arptable(function(e) arpcache[e["HW address"]:upper()] = e["IP address"] end) local opmode_type = {} local ManagementVLANID_MIN_VALUE = tonumber(uci:get("functionlist", "vendorlist", "ManagementVLANID_MIN_VALUE") or 1) local ManagementVLANID_MAX_VALUE = tonumber(uci:get("functionlist", "vendorlist", "ManagementVLANID_MAX_VALUE") or 4094) if uci:get('functionlist','functionlist','SUPPORT_REPEATER_MODULE') == '1' then opmode_type = {[1]="ap",[2]="sta",[3]="wds_ap",[4]="wds_sta",[5]="wds_bridge",[6]="sta_ap"} else opmode_type = {[1]="ap",[2]="sta",[3]="wds_ap",[4]="wds_sta",[5]="wds_bridge"} end --[[ local netlist = { } local netdevs = { } local dev for _, dev in ipairs(devices) do local net for _, net in ipairs(dev:get_wifinets()) do netlist[#netlist+1] = net:id() netdevs[net:id()] = dev:name() end end ]]-- %>
<%:Specify the distance between AirBridge devices to support the Layer 2 acknowledgement time-out period. The optimum value depends on deployment and terrain. In a point-to-point setup, for a distance of up to 500 m (1,640 ft), enter 0. For a distance of more than 500 m, round to the nearest km. In a point-to-multipoint setup, enter the maximum distance between the AirBridge master and the farthest satellite. Adjust the distance to maximize throughput.%>
<%:This configuration allows segregate temporary guest WiFi usage with individual SSID, security, and DHCP settings.%>
<%:When a weakening wireless link between Access Point and client is detected below specified RSSI, the AP will encourage client to connect to the surrounding AP with stronger signal.%>
<%:If the feature is enabled with specified VLAN ID, the device will only allow management access with the same specified VLAN ID.%>
<%:This is to specify threshold packet size for RTS/CTS; a small number may cause RTS/CTS frames to be sent more often and consume more bandwidth.%>
<%:For enhanced transmit efficiency, it can merge multiple data frames upon specified number of frames or bytes into one aggregated frame for transmission on 2.4GHz.%>
<%:Block the communication between the associated clients under the same WLAN.%>
<%:When this option is checked with specified VLAN ID in a SSID profile, the traffics from this SSID will be tagged with this VLAN ID upon entering LAN bridge.%>
<%:Unicast conversion method allows a WLAN AP to have a direct relationship with each client to transmit original multicast-like traffics on a one-to-one basis, establishing individual sessions between the transmission server and each client. This method will add additional bandwidth overhead on the unicast server upon each additional client.%>
<%:Multicast transmission is a one-to-many group communication methodology in which a WLAN AP forwards all broadcast traffics from a multicast source to a client subnet where multiple client devices are listening.%>
<%:Data frames will be sent out at the lowest selected rate. Client devices must use either the lowest selected rate or a faster one.%>
<%:* Enter a name with 1 to 15 alphanumeric characters, including hyphens but no other special characters. The name must start and end with alphanumeric characters.%>
<%:* No symbols are allowed except for the hyphen (-).%>
<%:* Spaces are not allowed.%>
<%:* Must contain at least one alphabetic character.%>
<%:Enable the AirBridge system. Your AP can then transmit data more efficiently, avoid collisions, and reduce latency and packet losses. (If you do not enable AirBridge, data will be sent via traditional CSMA.)%>
<%:In AirBridge mode, the AirBridge Master assigns time slots for each client’s data transmission. The larger the time slot, the faster the data transmission.%>
<%:In AirBridge mode, the client bridge/AirBridge Satellite’s data transmission is prioritized by data. High level means a longer transmission time. (The time ratio is 10:5:1.)%>
<%:Enable the EnGenius EnJet system. Your AP can then transmit data more efficiently, avoid collisions, and reduce latency and packet losses. (If you do not enable EnJet, data will be sent via traditional CSMA.)%>
<%:In EnJet mode, the AP will assign time slots for each client’s data transmission. The larger the slot, the faster the data transmission.%>
<%:In EnJet mode, the client bridge/WDS station’s data transmission is prioritized by data. High level means a longer transmission time. (The time ratio is 10:5:1.)%>
<%:* Enter a name with 1 to 15 alphanumeric characters, including hyphens but no other special characters. The name must start and end with alphanumeric characters.%>
<%:* No symbols are allowed except for the hyphen (-).%>
<%:* Spaces are not allowed.%>
<%:* Must contain at least one alphabetic character.%>
<%:Management SSID will be turned off when the setting is done and idle in 15 minutes. If you need to turn on please reboot the device.%>