Skip to content

Commit 2712ae6

Browse files
committed
feat: add sim8380g-m2 pcie mode,fix mhi pcie scan
1 parent b6209f8 commit 2712ae6

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

luci/luci-app-qmodem/root/usr/share/qmodem/modem_scan.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,16 @@ scan_pcie_slot_interfaces()
172172
[ ! -z "$dun_device" ] && dun_device_path="$wwan0_path/$dun_device"
173173
[ ! -z "$dun_device_path" ] && dun_devices=$(basename "$dun_device_path")
174174
fi
175-
fi
175+
fi
176176
#mt_t7xx device
177177
wwan_path="$slot_path/wwan"
178-
net_devices=$(ls "$wwan_path" | grep -E "wwan[0-9]")
179-
devices_path="$wwan_path/$net_devices"
180-
if [ -d "$devices_path" ];then
181-
mbim_devices=$(ls "$devices_path" | grep -E "wwan[0-9]mbim[0-9]")
182-
dun_devices=$(ls "$devices_path" | grep -E "wwan[0-9]at[0-9]")
178+
if [ -d "$wwan_path" ]; then
179+
net_devices=$(ls "$wwan_path" | grep -E "wwan[0-9]")
180+
devices_path="$wwan_path/$net_devices"
181+
if [ -d "$devices_path" ];then
182+
mbim_devices=$(ls "$devices_path" | grep -E "wwan[0-9]mbim[0-9]")
183+
dun_devices=$(ls "$devices_path" | grep -E "wwan[0-9]at[0-9]")
184+
fi
183185
fi
184186
echo "net_devices: $net_devices dun_devices: $dun_devices"
185187
at_ports="$dun_devices"
@@ -299,6 +301,8 @@ match_config()
299301

300302
[[ "$name" = *"T99W373"* ]] && name="t99w373"
301303

304+
[[ "$name" = *"SIM8380G"* ]] && name="SIM8380G-M2"
305+
302306
#rg200u-cn
303307
[[ "$name" = *"rg200u-cn"* ]] && name="rg200u-cn"
304308

@@ -321,7 +325,7 @@ get_modem_model()
321325
local at_port=$1
322326
cgmm=$(at $at_port "AT+CGMM")
323327
sleep 1
324-
cgmm_1=$(at $at_port "AT+CGMM?")
328+
cgmm_1=$(at $at_port "AT+CGMM")
325329
name_1=$(echo -e "$cgmm" |grep "+CGMM: " | awk -F': ' '{print $2}')
326330
name_2=$(echo -e "$cgmm_1" |grep "+CGMM: " | awk -F'"' '{print $2} '| cut -d ' ' -f 1)
327331
name_3=$(echo -e "$cgmm" | sed -n '2p')
@@ -366,6 +370,7 @@ add()
366370
for trys in $(seq 1 3);do
367371
for at_port in $valid_at_ports; do
368372
m_debug "try at port $at_port;time $trys"
373+
sleeps 1
369374
get_modem_model "/dev/$at_port"
370375
[ $? -eq 0 ] && break || modem_name=""
371376
done

luci/luci-app-qmodem/root/usr/share/qmodem/modem_support.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,19 @@
750750
"mbim"
751751
]
752752
},
753+
"simcom_sim8380g-m2": {
754+
"manufacturer": "simcom",
755+
"platform": "qualcomm",
756+
"data_interface": "pcie",
757+
"define_connect": "1",
758+
"wcdma_band": "1/2/3/4/5/8",
759+
"lte_band": "1/2/3/4/5/7/8/12/13/14/17/18/19/20/25/26/28/29/30/66/71",
760+
"nsa_band": "1/2/3/5/7/8/12/20/28/40/41/48/66/71/77/78/79",
761+
"sa_band": "1/2/3/5/7/8/12/20/28/40/41/48/66/71/77/78/79",
762+
"modes": [
763+
"qmi"
764+
]
765+
},
753766
"rm500q-cn": {
754767
"manufacturer": "quectel",
755768
"platform": "qualcomm",
@@ -1117,11 +1130,13 @@
11171130
"qualcomm": {
11181131
"vendor_id": [
11191132
"1a0e",
1120-
"1e0e"
1133+
"1e0e",
1134+
"17cb"
11211135
],
11221136
"product_id": [
11231137
"9001",
1124-
"9011"
1138+
"9011",
1139+
"0308"
11251140
]
11261141
}
11271142
},

0 commit comments

Comments
 (0)