Developing lightweight computation at the DSG edge

Commit 2371d29a authored by p4u's avatar p4u
Browse files

If WPA2 key is smaller than 8 chars, don't use it. Extend WiFi help

parent 5e660ed5
......@@ -182,7 +182,7 @@ qmp_configure_wifi_device() {
local txpower="$(qmp_uci_get @wireless[$id].txpower)"
local network="$(qmp_get_virtual_iface $device)"
local key="$(qmp_uci_get @wireless[$id].key)"
[ -z "$key" ] && encrypt="none" || encrypt="psk2"
[ $(echo "$key" | wc -c) -lt 8 ] && encrypt="none" || encrypt="psk2"
local dev_id="$(echo $device | tr -d [A-z])"
dev_id=${dev_id:-$(date +%S)}
......
......@@ -84,7 +84,7 @@ for _,wdev in ipairs(wdevs) do
s_wireless:option(Value,"name","ESSID", translate("Name of the WiFi network"))
-- Channel
channel = s_wireless:option(ListValue,"channel","Channel",translate("WiFi channel to use in this device.\nSelect +/- for 40MHz channel. Select b for 802.11b only"))
channel = s_wireless:option(ListValue,"channel","Channel",translate("WiFi channel to be used in this device.<br/>Select +/- for 40MHz channel. Select b for 802.11b only"))
mymode = m.uci:get("qmp",wdev,"mode")
for _,ch in ipairs(qmpinfo.get_channels(mydev)) do
......@@ -97,13 +97,14 @@ for _,wdev in ipairs(wdevs) do
end
-- WPA key
local key=s_wireless:option(Value,"key","WPA2 key", translate("WPA2 key for AP. Leave blank for leave it open (recomended)."))
local key=s_wireless:option(Value,"key","WPA2 key",
translate("WPA2 key for AP (8 chars or more).<br/>Leave blank for make it OPEN (recomended)"))
key.default = ""
key:depends("mode","ap")
key:depends("mode","adhoc_ap")
-- Txpower
txpower = s_wireless:option(ListValue,"txpower","Power",translate("Choose the transmit power (each 4 number the power is doubled)"))
txpower = s_wireless:option(ListValue,"txpower","Power",translate("Choose the transmit power (each 4, the power is doubled)"))
for _,t in ipairs(qmpinfo.get_txpower(mydev)) do
txpower:value(t,t)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment