diff --git a/files/www/cgi-bin/status b/files/www/cgi-bin/status index dcee4e8f..985f7392 100755 --- a/files/www/cgi-bin/status +++ b/files/www/cgi-bin/status @@ -167,10 +167,12 @@ local cursor = uci.cursor() local wifi_channel local wifi_chanbw +local wifi_freq_range = "" local wifi_ssid if not wifi_disabled then wifi_channel = cursor:get("wireless", radio, "channel") wifi_channel = tonumber(wifi_channel) or 0 + wifi_chanbw = tonumber(cursor:get("wireless", radio, "chanbw") or "20") local rfchans = aredn.hardware.get_rfchannels(wifi_iface) if rfchans and rfchans[1] then local basefreq = rfchans[1].frequency @@ -179,8 +181,15 @@ if not wifi_disabled then elseif basefreq > 900 and basefreq < 2300 then wifi_channel = wifi_channel * 5 + 887 end + for _, chan in ipairs(rfchans) + do + if chan.number == wifi_channel then + wifi_freq_range = (chan.frequency - wifi_chanbw / 2) .. " - " .. (chan.frequency + wifi_chanbw / 2) .. " MHz" + break + end + end end - wifi_chanbw = cursor:get("wireless", radio, "chanbw") or "20" + wifi_ssid = "none" cursor:foreach("wireless", "wifi-iface", function (section) @@ -319,7 +328,7 @@ else col1[#col1 + 1] = "primary address:" .. ip .. " / " .. cidr .. "
" else wifi_gw = get_default_gw("wifi") - col1[#col1 + 1] = "mesh address:
mesh gateway:
gateway node:
SSID:
channel:
channel width:" .. ip .. " / " .. cidr .. "
" .. wifi_gw .. "
" .. mesh_ip_to_hostnames(wifi_gw) .. "
" .. wifi_ssid .. "
" .. wifi_channel .. "
" .. wifi_chanbw .. " MHz" + col1[#col1 + 1] = "mesh address:
mesh gateway:
gateway node:
SSID:
channel:
channel width:
frequency range:
" .. ip .. " / " .. cidr .. "
" .. wifi_gw .. "
" .. mesh_ip_to_hostnames(wifi_gw) .. "
" .. wifi_ssid .. "
" .. wifi_channel .. "
" .. wifi_chanbw .. " MHz
" .. wifi_freq_range .. "" end end