diff --git a/luci-app-modem/luasrc/model/cbi/modem/config.lua b/luci-app-modem/luasrc/model/cbi/modem/config.lua index 2c8c324..94f5b9a 100644 --- a/luci-app-modem/luasrc/model/cbi/modem/config.lua +++ b/luci-app-modem/luasrc/model/cbi/modem/config.lua @@ -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 diff --git a/luci-app-modem/luasrc/model/cbi/modem/index.lua b/luci-app-modem/luasrc/model/cbi/modem/index.lua index 656c30d..fc856c3 100644 --- a/luci-app-modem/luasrc/model/cbi/modem/index.lua +++ b/luci-app-modem/luasrc/model/cbi/modem/index.lua @@ -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")) diff --git a/luci-app-modem/luasrc/view/modem/modem_debug.htm b/luci-app-modem/luasrc/view/modem/modem_debug.htm index c583774..d660ffe 100644 --- a/luci-app-modem/luasrc/view/modem/modem_debug.htm +++ b/luci-app-modem/luasrc/view/modem/modem_debug.htm @@ -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"]; //滚动到底部 diff --git a/luci-app-modem/po/zh-cn/modem.po b/luci-app-modem/po/zh-cn/modem.po index fa08fd9..0cd8a39 100644 --- a/luci-app-modem/po/zh-cn/modem.po +++ b/luci-app-modem/po/zh-cn/modem.po @@ -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 "信息" diff --git a/luci-app-modem/root/etc/init.d/modem b/luci-app-modem/root/etc/init.d/modem index 612f9c6..c96a0aa 100755 --- a/luci-app-modem/root/etc/init.d/modem +++ b/luci-app-modem/root/etc/init.d/modem @@ -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 diff --git a/luci-app-modem/root/usr/share/modem/fibocom.sh b/luci-app-modem/root/usr/share/modem/fibocom.sh index 27d2a67..4e402bd 100755 --- a/luci-app-modem/root/usr/share/modem/fibocom.sh +++ b/luci-app-modem/root/usr/share/modem/fibocom.sh @@ -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" ;; diff --git a/luci-app-modem/root/usr/share/modem/modem_support.json b/luci-app-modem/root/usr/share/modem/modem_support.json index 5e5e76d..d3bc779 100644 --- a/luci-app-modem/root/usr/share/modem/modem_support.json +++ b/luci-app-modem/root/usr/share/modem/modem_support.json @@ -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",