adjust huasifei slot cfg
This commit is contained in:
parent
c4c5603a3c
commit
cb5704de73
@ -50,51 +50,20 @@ modem_settings()
|
||||
huasifei,ws3006)
|
||||
#m2 usb3.0
|
||||
#(slot 2)
|
||||
uci set qmodem.5g1="modem-slot"
|
||||
uci set qmodem.5g1.slot="2-1.2"
|
||||
uci set qmodem.5g1.alias="5g1"
|
||||
uci set qmodem.5g1.type="usb"
|
||||
uci set qmodem.5g1.net_led="green:5g2"
|
||||
uci set qmodem.5g1.sim_led="green:sim2"
|
||||
add_slot_cfg "5g1" "2-1.2" "usb" "5g1" "green:5g2" "green:sim2" "" "m2_reset_2" "1" "0" "5"
|
||||
#(slot 1)
|
||||
uci set qmodem.5g0="modem-slot"
|
||||
uci set qmodem.5g0.slot="2-1.4"
|
||||
uci set qmodem.5g0.alias="5g0"
|
||||
uci set qmodem.5g0.type="usb"
|
||||
uci set qmodem.5g0.net_led="green:5g1"
|
||||
uci set qmodem.5g0.sim_led="green:sim1"
|
||||
add_slot_cfg "5g0" "2-1.4" "usb" "5g0" "green:5g1" "green:sim1" "" "m2_reset_1" "1" "0" "6"
|
||||
#m2 usb2.0
|
||||
#(slot 2)
|
||||
uci set qmodem.4g3="modem-slot"
|
||||
uci set qmodem.4g3.slot="1-1.1"
|
||||
uci set qmodem.4g3.type="usb"
|
||||
uci set qmodem.4g3.alias="4g3"
|
||||
uci set qmodem.4g3.net_led="green:5g2"
|
||||
uci set qmodem.4g3.sim_led="green:sim2"
|
||||
add_slot_cfg "4g3" "1-1.1" "usb" "4g3" "green:5g2" "green:sim2" "" "m2_reset_2" "1" "0" "20"
|
||||
#(slot 1)
|
||||
uci set qmodem.4g2="modem-slot"
|
||||
uci set qmodem.4g2.slot="1-1.4"
|
||||
uci set qmodem.4g2.alias="4g2"
|
||||
uci set qmodem.4g2.type="usb"
|
||||
uci set qmodem.4g2.net_led="green:5g1"
|
||||
uci set qmodem.4g2.sim_led="green:sim1"
|
||||
add_slot_cfg "4g2" "1-1.4" "usb" "4g2" "green:5g1" "green:5g1" "" "m2_reset_1" "1" "0" "21"
|
||||
#mini pci slot
|
||||
#(slot 2)
|
||||
uci set qmodem.4g1="modem-slot"
|
||||
uci set qmodem.4g1.slot="1-1.2"
|
||||
uci set qmodem.4g1.type="usb"
|
||||
uci set qmodem.4g1.alias="4g1"
|
||||
uci set qmodem.4g1.net_led="green:5g2"
|
||||
uci set qmodem.4g1.sim_led="green:sim2"
|
||||
add_slot_cfg "4g1" "1-1.2" "usb" "4g1" "green:5g2" "green:5g2" "" "m2_reset_2" "1" "0" "22"
|
||||
#(slot 1)
|
||||
uci set qmodem.4g0="modem-slot"
|
||||
uci set qmodem.4g0.slot="1-1.3"
|
||||
uci set qmodem.4g0.type="usb"
|
||||
uci set qmodem.4g0.alias="4g0"
|
||||
uci set qmodem.4g0.net_led="green:5g1"
|
||||
uci set qmodem.4g0.sim_led="green:sim1"
|
||||
|
||||
uci commit qmodem
|
||||
add_slot_cfg "4g0" "1-1.3" "usb" "4g0" "green:5g1" "green:5g1" "" "m2_reset_1" "1" "0" "23"
|
||||
uci commit qmodem
|
||||
;;
|
||||
cyber,cyber3588-aib)
|
||||
uci batch << EOF
|
||||
@ -109,6 +78,31 @@ EOF
|
||||
esac
|
||||
}
|
||||
|
||||
add_slot_cfg()
|
||||
{
|
||||
cfg=$1
|
||||
cfg_slot=$2
|
||||
cfg_type=$3
|
||||
alias=$4
|
||||
net_led=$5
|
||||
sim_led=$6
|
||||
associated_usb=$7
|
||||
gpio=$8
|
||||
gpio_up=$9
|
||||
gpio_down=${10}
|
||||
default_metric=${11}
|
||||
[ -n "$cfg_type" ] && uci set qmodem.${cfg}.type=${cfg_type}
|
||||
[ -n "$cfg_slot" ] && uci set qmodem.${cfg}.slot=${cfg_slot}
|
||||
[ -n "$net_led" ] && uci set qmodem.${cfg}.net_led=${net_led}
|
||||
[ -n "$alias" ] && uci set qmodem.${cfg}.alias=${alias}
|
||||
[ -n "$sim_led" ] && uci set qmodem.${cfg}.sim_led=${sim_led}
|
||||
[ -n "$associated_usb" ] && uci set qmodem.${cfg}.associated_usb=${associated_usb}
|
||||
[ -n "$gpio" ] && uci set qmodem.${cfg}.gpio=${gpio}
|
||||
[ -n "$gpio_up" ] && uci set qmodem.${cfg}.gpio_up=${gpio_up}
|
||||
[ -n "$gpio_down" ] && uci set qmodem.${cfg}.gpio_down=${gpio_down}
|
||||
[ -n "$default_metric" ] && uci set qmodem.${cfg}.default_metric=${default_metric}
|
||||
}
|
||||
|
||||
board=$(board_name)
|
||||
modem_settings $board
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user