1 -- Copyright 2016 David Thornley <david.thornley@touchstargroup.com>
2 -- Licensed to the public under the Apache License 2.0.
4 local map, section, net = ...
6 local device, apn, pincode, username, password
10 device = section:taboption("general", Value, "device", translate("Modem device"))
11 device.rmempty = false
13 local device_suggestions = nixio.fs.glob("/dev/cdc-wdm*")
15 if device_suggestions then
17 for node in device_suggestions do
23 apn = section:taboption("general", Value, "apn", translate("APN"))
26 pincode = section:taboption("general", Value, "pincode", translate("PIN"))
29 username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))
32 password = section:taboption("general", Value, "password", translate("PAP/CHAP password"))
33 password.password = true
35 auth = section:taboption("general", Value, "auth", translate("Authentication Type"))
36 auth:value("", translate("-- Please choose --"))
37 auth:value("both", "PAP/CHAP (both)")
38 auth:value("pap", "PAP")
39 auth:value("chap", "CHAP")
40 auth:value("none", "NONE")
42 if luci.model.network:has_ipv6() then
43 ipv6 = section:taboption("advanced", Flag, "ipv6", translate("Enable IPv6 negotiation"))
44 ipv6.default = ipv6.disabled