Commit 00ead99e authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

improve wwan_connect

parent 78ca41a2
#!/bin/bash #!/bin/bash
sudo mmcli -m 0 --simple-connect="apn=webaut,allow-roaming=true" MODEM_NR=$(sudo mmcli -L| cut -d / -f 6|cut -d ' ' -f 1)
echo "Modem Nr: $MODEM_NR"
sudo mmcli -m $MODEM_NR --simple-connect="apn=webaut,allow-roaming=true"
ADDR=$(sudo mmcli --bearer 0 | grep address | awk '{ print $3 }') ADDR=$(sudo mmcli --bearer 0 | grep address | awk '{ print $3 }')
GW=$(mmcli --bearer 0 | grep gateway | awk '{ print $3 }') GW=$(mmcli --bearer 0 | grep gateway | awk '{ print $3 }')
echo "Configuring Addr $ADDR and Gw $GW"
sudo ifconfig wwan0 ${ADDR}/30 sudo ifconfig wwan0 ${ADDR}/30
sudo route add default gw $GW sudo route add default gw $GW
sudo resolvectl dns wwan0 8.8.8.8 sudo resolvectl dns wwan0 8.8.8.8
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment