Skip to content
Snippets Groups Projects
Unverified Commit 5a854853 authored by Tobias's avatar Tobias Committed by GitHub
Browse files

gluon-web-cellular: add auth option to GUI (#3307)

parent dc51f3d3
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ local function setup_ncm_qmi(devpath, control_type, delay)
local pincode = uci:get('gluon', 'cellular', 'pin')
local username = uci:get('gluon', 'cellular', 'username')
local password = uci:get('gluon', 'cellular', 'password')
local auth = uci:get('gluon', 'cellular', 'auth')
uci:section('network', 'interface', 'cellular', {
proto = control_type,
......@@ -40,6 +41,7 @@ local function setup_ncm_qmi(devpath, control_type, delay)
set_or_delete('network', 'cellular', 'pincode', pincode)
set_or_delete('network', 'cellular', 'username', username)
set_or_delete('network', 'cellular', 'password', password)
set_or_delete('network', 'cellular', 'auth', auth)
set_or_delete('network', 'cellular', 'delay', delay)
end
......
......@@ -47,3 +47,18 @@ msgstr ""
"Du kannst den Uplink über einen Mobilfunk Service aktivieren. Wenn du "
"dich dafür entscheidest, wird die VPN-Verbindung über das integrierte "
"Mobilfunk-Modem hergestellt."
msgid "Authentication"
msgstr "Authentifizierung"
msgid "None"
msgstr "Keine"
msgid "PAP"
msgstr ""
msgid "CHAP"
msgstr ""
msgid "Both"
msgstr "Beide"
......@@ -35,3 +35,18 @@ msgid ""
"You can enable uplink via cellular service. If you decide so, the VPN "
"connection is established using the integrated WWAN modem."
msgstr ""
msgid "Authentication"
msgstr ""
msgid "None"
msgstr ""
msgid "PAP"
msgstr ""
msgid "CHAP"
msgstr ""
msgid "Both"
msgstr ""
......@@ -33,6 +33,14 @@ local password = s:option(Value, "password", translate("Password"))
password:depends(enabled, true)
password.default = uci:get('gluon', 'cellular', 'password')
local auth = s:option(ListValue, "auth", translate("Authentication"))
auth:depends(enabled, true)
auth:value("none", translate("None"))
auth:value("pap", translate("PAP"))
auth:value("chap", translate("CHAP"))
auth:value("both", translate("Both"))
auth.default = uci:get('gluon', 'cellular', 'auth') or "none"
function f:write()
local cellular_enabled = false
if enabled.data then
......@@ -46,6 +54,7 @@ function f:write()
pin = pin.data,
username = username.data,
password = password.data,
auth = auth.data,
})
uci:commit('gluon')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment