File tree Expand file tree Collapse file tree 2 files changed +34
-8
lines changed
application/qmodem/files/usr/share/qmodem Expand file tree Collapse file tree 2 files changed +34
-8
lines changed Original file line number Diff line number Diff line change @@ -376,6 +376,13 @@ match_config()
376376 sa_available_band=$( echo $modem_config | jq -r " .sa_band" )
377377}
378378
379+ get_model_name_by_id ()
380+ {
381+ local id=$1
382+ local name=$( echo $modem_support | jq -r ' .modem_support."' $slot_type ' " | to_entries[] | select(.value.id=="' $id ' ") | .key' )
383+ echo $name
384+ }
385+
379386get_modem_model ()
380387{
381388 local at_port=$1
@@ -434,15 +441,18 @@ add()
434441 esac
435442 # if no netdev return
436443 [ -z " $net_devices " ] && lock -u /tmp/lock/modem_add_$slot && return
437- for trys in $( seq 1 3) ; do
438- for at_port in $valid_at_ports ; do
439- m_debug " try at port $at_port ;time $trys "
440- get_modem_model " /dev/$at_port "
441- [ $? -eq 0 ] && break || modem_name=" "
444+ modem_name=$( get_model_name_by_id $id )
445+ if [ -z " $modem_name " ]; then
446+ for trys in $( seq 1 3) ; do
447+ for at_port in $valid_at_ports ; do
448+ m_debug " try at port $at_port ;time $trys "
449+ get_modem_model " /dev/$at_port "
450+ [ $? -eq 0 ] && break || modem_name=" "
451+ done
452+ [ -n " $modem_name " ] && break
453+ sleep 1
442454 done
443- [ -n " $modem_name " ] && break
444- sleep 1
445- done
455+ fi
446456 [ -z " $modem_name " ] && lock -u /tmp/lock/modem_add_$slot && return
447457 m_debug " add modem $modem_name slot $slot slot_type $slot_type "
448458 if [ -n " $is_exist " ]; then
Original file line number Diff line number Diff line change 10891089 " ecm"
10901090 ]
10911091 },
1092+ "simcom_a8200_serias" : {
1093+ "manufacturer_id" : " 1a0e" ,
1094+ "id" : " 1e0e:9011" ,
1095+ "manufacturer" : " simcom" ,
1096+ "platform" : " asrmicro" ,
1097+ "data_interface" : " usb" ,
1098+ "pdp_index" : " 1" ,
1099+ "wcdma_band" : " 1/2/3/4/5/8" ,
1100+ "lte_band" : " 1/2/3/4/5/7/8/12/13/14/17/18/19/20/25/26/28/29/30/32/34/38/39/40/41/42/43/46/48/66/71" ,
1101+ "nsa_band" : " 1/2/3/5/7/8/12/20/28/38/40/41/48/66/71/77/78/79" ,
1102+ "sa_band" : " 1/2/3/5/7/8/12/20/28/38/40/41/48/66/71/77/78/79" ,
1103+ "modes" : [
1104+ " ecm" ,
1105+ " rndis"
1106+ ]
1107+ },
10921108 "simcom_d8200g" : {
10931109 "manufacturer_id" : " 1a0e" ,
10941110 "manufacturer" : " simcom" ,
You can’t perform that action at this time.
0 commit comments