From 52b5d08c869ff9284cbe43c36538a97fb5e260e0 Mon Sep 17 00:00:00 2001 From: fujr Date: Fri, 1 Nov 2024 01:41:02 +0800 Subject: [PATCH] fix rmnet --- .../root/usr/share/qmodem/modem_dial.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh b/luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh index 767ae9b..ecb03a9 100755 --- a/luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh +++ b/luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh @@ -639,8 +639,16 @@ qmi_dial() cmd_line="$cmd_line $auth" fi if [ -n "$modem_netcard" ]; then + qmi_if=$modem_netcard + #if is wwan* ,use the first part of the name + if [ "$modem_netcard" == "wwan"* ];then qmi_if=$(echo "$modem_netcard" | cut -d_ -f1) - qmi_if=$(echo "$qmi_if" | cut -d. -f1) + fi + #if is rmnet* ,use the first part of the name + if [ "$modem_netcard" == "rmnet"* ];then + qmi_if=$(echo "$modem_netcard" | cut -d. -f1) + fi + cmd_line="${cmd_line} -i ${qmi_if}" fi if [ -e "/usr/bin/quectel-CM-M" ];then