luci-proto-ncm: suggest both tty and wdm devices
Some modems are controlled only through a tty. Autodetection of control device is broken in ncm.sh Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
This commit is contained in:
parent
c27a77756c
commit
95c38dab8f
1 changed files with 6 additions and 9 deletions
|
@ -19,16 +19,13 @@ local ipv6, delay, defaultroute, metric, peerdns, dns
|
||||||
device = section:taboption("general", Value, "device", translate("Modem device"))
|
device = section:taboption("general", Value, "device", translate("Modem device"))
|
||||||
device.rmempty = false
|
device.rmempty = false
|
||||||
|
|
||||||
local device_suggestions = nixio.fs.glob("/dev/cdc-wdm*")
|
local dev
|
||||||
or nixio.fs.glob("/dev/ttyUSB*")
|
for dev in nixio.fs.glob("/dev/ttyUSB*") do
|
||||||
|
device:value(dev)
|
||||||
if device_suggestions then
|
end
|
||||||
local node
|
for dev in nixio.fs.glob("/dev/cdc-wdm*") do
|
||||||
for node in device_suggestions do
|
device:value(dev)
|
||||||
device:value(node)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
mode = section:taboption("general", Value, "mode", translate("Service Type"))
|
mode = section:taboption("general", Value, "mode", translate("Service Type"))
|
||||||
mode:value("", translate("Modem default"))
|
mode:value("", translate("Modem default"))
|
||||||
|
|
Loading…
Reference in a new issue