Moved NetworkManager interface name to variable.
parent
f632356469
commit
8e7a216693
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
#reset modem first
|
||||
APN="Wholesale" #set your APN name here for network manager.
|
||||
|
||||
NETNAME="4gnet"
|
||||
#disconnect 4gnet
|
||||
sudo nmcli c down 4gnet
|
||||
sudo nmcli c down $NETNAME
|
||||
#power-off the modem in case it's already on.
|
||||
uconsole-4g-cm4 disable
|
||||
#power-on modem.
|
||||
|
@ -19,6 +19,7 @@ echo "attempting startup"
|
|||
echo -en "AT+CUSBPIDSWITCH?\r\n" | sudo socat - /dev/ttyUSB2,crnl
|
||||
|
||||
echo "sudo: reset & re-add modem to network manager"
|
||||
sudo nmcli c del 4gnet
|
||||
sudo nmcli c add type gsm ifname ttyUSB2 con-name 4gnet apn $APN
|
||||
sudo nmcli c up 4gnet
|
||||
sudo nmcli c del $NETNAME
|
||||
sudo nmcli c add type gsm ifname ttyUSB2 con-name $NETNAME apn $APN
|
||||
sleep 10
|
||||
sudo nmcli c up $NETNAME
|
Loading…
Reference in New Issue