修复一些bug,添加模块管理拨号
This commit is contained in:
parent
a7c3da5d2e
commit
0b3c330336
@ -70,6 +70,7 @@ getMobileNetwork()
|
||||
|
||||
-- 拨号工具
|
||||
dial_tool = s:taboption("advanced", ListValue, "dial_tool", translate("Dial Tool"))
|
||||
dial_tool.description = translate("After switching the dialing tool, it may be necessary to restart the module or restart the router to recognize the module.")
|
||||
dial_tool.rmempty = true
|
||||
dial_tool:value("", translate("Auto Choose"))
|
||||
dial_tool:value("quectel-CM", translate("quectel-CM"))
|
||||
@ -94,12 +95,6 @@ apn:value("ctnet", translate("China Telecom"))
|
||||
apn:value("cbnet", translate("China Broadcast"))
|
||||
apn:value("5gscuiot", translate("Skytone"))
|
||||
|
||||
username = s:taboption("advanced", Value, "username", translate("PAP/CHAP Username"))
|
||||
username.rmempty = true
|
||||
|
||||
password = s:taboption("advanced", Value, "password", translate("PAP/CHAP Password"))
|
||||
password.rmempty = true
|
||||
|
||||
auth = s:taboption("advanced", ListValue, "auth", translate("Authentication Type"))
|
||||
auth.default = "none"
|
||||
auth.rmempty = false
|
||||
@ -108,4 +103,17 @@ auth:value("both", translate("PAP/CHAP (both)"))
|
||||
auth:value("pap", "PAP")
|
||||
auth:value("chap", "CHAP")
|
||||
|
||||
username = s:taboption("advanced", Value, "username", translate("PAP/CHAP Username"))
|
||||
username.rmempty = true
|
||||
username:depends("auth", "both")
|
||||
username:depends("auth", "pap")
|
||||
username:depends("auth", "chap")
|
||||
|
||||
password = s:taboption("advanced", Value, "password", translate("PAP/CHAP Password"))
|
||||
password.rmempty = true
|
||||
password.password = true
|
||||
password:depends("auth", "both")
|
||||
password:depends("auth", "pap")
|
||||
password:depends("auth", "chap")
|
||||
|
||||
return m
|
||||
|
@ -65,7 +65,7 @@ o.cfgvalue = function(t, n)
|
||||
if dial_tool == "" then
|
||||
dial_tool = translate("Auto Choose")
|
||||
end
|
||||
return dial_tool
|
||||
return translate(dial_tool)
|
||||
end
|
||||
|
||||
o = s:option(DummyValue, "pdp_type", translate("PDP Type"))
|
||||
|
@ -80,7 +80,7 @@
|
||||
responseElement=document.getElementById("response");
|
||||
if ("response" in data) {
|
||||
//显示当前时间
|
||||
responseElement.value+=data["time"]+"\n";
|
||||
responseElement.value+=data["time"]+" ";
|
||||
//显示返回值
|
||||
responseElement.value+=data["response"];
|
||||
//滚动到底部
|
||||
|
@ -115,6 +115,9 @@ msgstr "响应"
|
||||
msgid "Return to old page"
|
||||
msgstr "返回旧界面"
|
||||
|
||||
msgid "Return to modem debug"
|
||||
msgstr "返回模组调试界面"
|
||||
|
||||
msgid "Custom quick commands"
|
||||
msgstr "自定义快捷命令"
|
||||
|
||||
@ -172,6 +175,9 @@ msgstr "仅显示适配模组可用的拨号模式"
|
||||
msgid "Dial Tool"
|
||||
msgstr "拨号工具"
|
||||
|
||||
msgid "After switching the dialing tool, it may be necessary to restart the module or restart the router to recognize the module."
|
||||
msgstr "切换拨号工具后,可能需要重启模组或重启路由器才能识别模组。"
|
||||
|
||||
msgid "Auto Choose"
|
||||
msgstr "自动选择"
|
||||
|
||||
@ -202,12 +208,6 @@ msgstr "中国广电"
|
||||
msgid "Skytone"
|
||||
msgstr "天际通"
|
||||
|
||||
msgid "PAP/CHAP Username"
|
||||
msgstr "PAP/CHAP 用户名"
|
||||
|
||||
msgid "PAP/CHAP Password"
|
||||
msgstr "PAP/CHAP 密码"
|
||||
|
||||
msgid "Authentication Type"
|
||||
msgstr "认证类型"
|
||||
|
||||
@ -217,6 +217,12 @@ msgstr "PAP/CHAP (均使用)"
|
||||
msgid "NONE"
|
||||
msgstr "无"
|
||||
|
||||
msgid "PAP/CHAP Username"
|
||||
msgstr "PAP/CHAP 用户名"
|
||||
|
||||
msgid "PAP/CHAP Password"
|
||||
msgstr "PAP/CHAP 密码"
|
||||
|
||||
msgid "Message"
|
||||
msgstr "信息"
|
||||
|
||||
|
@ -346,17 +346,14 @@ stop_qmi()
|
||||
#Modem Manager
|
||||
#获取接口名称
|
||||
local interface_name="wwan_5g_$modem_no"
|
||||
echo "$interface_name" >> /root/a
|
||||
if [[ "$command" = *"$interface_name"* ]]; then
|
||||
echo "111" >> /root/a
|
||||
local pid=$(echo "$response" | jq -r ".modem.instances.$i.pid")
|
||||
kill $pid >/dev/null 2>&1
|
||||
|
||||
#获取调制解调器设备(模组路径)
|
||||
local path=$(uci -q get modem.modem$modem_no.path)
|
||||
mmcli -m "$path" --simple-disconnect
|
||||
|
||||
# uci set network.$interface_name.auto='0'
|
||||
#删除网络接口
|
||||
uci del network.$interface_name
|
||||
uci commit network
|
||||
fi
|
||||
|
@ -56,6 +56,14 @@ fibocom_get_mode()
|
||||
*) mode="$mode_num" ;;
|
||||
esac
|
||||
;;
|
||||
"mediatek")
|
||||
case "$mode_num" in
|
||||
"29") mode="mbim" ;;
|
||||
"40") mode="rndis" ;; #-
|
||||
"41") mode="rndis" ;;
|
||||
*) mode="$mode_num" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
mode="$mode_num"
|
||||
;;
|
||||
@ -104,6 +112,14 @@ fibocom_set_mode()
|
||||
*) mode_num="34" ;;
|
||||
esac
|
||||
;;
|
||||
"mediatek")
|
||||
case "$2" in
|
||||
# "mbim") mode_num="40" ;;
|
||||
# "rndis") mode_num="40" ;;
|
||||
"rndis") mode_num="41" ;;
|
||||
*) mode_num="41" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
mode_num="32"
|
||||
;;
|
||||
|
@ -49,6 +49,12 @@
|
||||
"network_interface":"usb",
|
||||
"modes":["ecm","mbim","rndis","ncm"]
|
||||
},
|
||||
"fm350-gl":{
|
||||
"manufacturer":"fibocom",
|
||||
"platform":"mediatek",
|
||||
"network_interface":"usb",
|
||||
"modes":["rndis"]
|
||||
},
|
||||
"fm150-ae":{
|
||||
"manufacturer":"fibocom",
|
||||
"platform":"qualcomm",
|
||||
@ -75,6 +81,12 @@
|
||||
"network_interface":"pcie",
|
||||
"modes":["qmi","gobinet","mbim"]
|
||||
},
|
||||
"fm350-gl":{
|
||||
"manufacturer":"fibocom",
|
||||
"platform":"mediatek",
|
||||
"network_interface":"pcie",
|
||||
"modes":["mbim"]
|
||||
},
|
||||
"fm150-ae":{
|
||||
"manufacturer":"fibocom",
|
||||
"platform":"qualcomm",
|
||||
|
Loading…
x
Reference in New Issue
Block a user