Why does luci require that the user specify WiFi encryption such as none or wpa2? Don't other OS's such as Android just ask for network name and PW? Am I missing something? Or just totally wrong?
Use web control panel to setup wifi, after select detected wireless networks, security is auto complete.
I don't use Android, so I can't speak about that. But when setting up a connection to a WiFi network on my Windows and iOS devices, they all ask for the security type, in addition to the network name and password.
rret:
Why does luci require that the user specify WiFi encryption such as none or wpa2? Don't other OS's such as Android just ask for network name and PW? Am I missing something? Or just totally wrong?
@rret,
From a programming point of view, you are totally wrong.
For several decades, public wifi has been under the dominion of the Wifi Alliance. The self-appointed industry organization is for the benefit of public at large. They set and define all relevant wifi standards. FWIW, they hold the trademark and enforce the use of the word WIFI.
The larger purpose of the Wifi Alliance is to define a standard that is broadly applied and well known. From a programming point of view, there is a set standards and defined methods. The application of the "set standards" is at the discretion of the end user. This means, if you want to use a name and password, then you can. If you want to use, more -- say: password, encrypted keys, and time-based access, you can. If you want to use less -- say: a simple "accepted terms of use" form, you can. These methods, and an entire "rat's nest" of protocols is available.
Does this answer your question?
Jesse
looks like sonnyyu nailed it. on the yun setup web page when you pick from the SSID drop down list, the encryption "auto-completes". the yun knows what the encryption is for all SSID's in its list. does anyone know where the code that queries nearby networks is in Yun openWRT? i'd like to look at that. thanks.
function wifi_detect()
local sys = require("luci.sys")
local iw = sys.wifi.getiwinfo("radio0")
local wifis = iw.scanlist
local result = {}
for idx, wifi in ipairs(wifis) do
if not_nil_or_empty(wifi.ssid) then
local name = wifi.ssid
local encryption = "none"
local pretty_encryption = "None"
if wifi.encryption.wep then
encryption = "wep"
pretty_encryption = "WEP"
elseif wifi.encryption.wpa == 1 then
encryption = "psk"
pretty_encryption = "WPA"
elseif wifi.encryption.wpa >= 2 then
encryption = "psk2"
pretty_encryption = "WPA2"
end
local signal_strength = math.floor(wifi.quality * 100 / wifi.quality_max)
table.insert(result, { name = name, encryption = encryption, pretty_encryption = pretty_encryption, signal_strength = signal_strength })
end
end
luci.http.prepare_content("application/json")
local json = require("luci.json")
luci.http.write(json.encode(result))
end
Thank you.