diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm
index 7796370ed..8b2f191a2 100644
--- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm
+++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm
@@ -35,6 +35,17 @@
return t
end
+ alltty = {}
+ iftty = luci.sys.exec("timeout 1 /usr/bin/mmcli -L")
+ for listtty in iftty:gmatch("([^\r\n]*)[\r\n]") do
+ modemid = luci.util.trim(luci.sys.exec("echo '" .. listtty .. "' | awk -F' ' '{print $1}' | awk -F/ '{print $6}'"))
+ if modemid ~= '' then
+ modeminfo = luci.sys.exec("timeout 1 /usr/bin/mmcli -m " .. modemid .. " --output-keyvalue")
+ tty = luci.util.trim(luci.sys.exec("echo '" .. modeminfo .. "' | grep 'modem.generic.device ' | awk -F': ' '{print $2}'"))
+ table.insert(alltty, tty)
+ end
+ end
+
%>
@@ -780,16 +791,10 @@