Here's a quick script (note that it doesn't have the --append-dns so it doesn't use the operator DNS):
Adjust / correct as required. Hopefully it works most of the time until things are fixed by the devs.
Note that the wwan0 default route has a higher metric (900) than the wifi metric (600) so wifi has priority if it is on.
Hope @neil2ball might be able to help, even though turning modem on, ofonoctl says registered, no ringing on incoming call, and no text message.
Do you reckon eg25-manager needs to be restart too?
As it stands, 1) does not work yet...
Thought the poweroff was the culprit so I removed it. Makes no difference.
Still when you do:
you get:
As soon 2) is run, running 1) gives you the registration message. Running 3) gets mobile data working. But no incoming calls or SMS / text messages....
Code:
#!/bin/bash
COLUMNS=15
PS3="Select the action: "
options=(Mobile_on Mobile_off Data_on Data_off quit)
select opt in "${options[@]}"
do
WWAN="wwan0"
case $opt in
Mobile_on)
ofonoctl poweron
ofonoctl online
sudo systemctl restart ofono ofonoctl
sleep 5
ofonoctl
break
;;
Mobile_off)
ofonoctl offline
ofonoctl poweroff
sudo systemctl restart ofono
ofonoctl
break
;;
Data_on)
ofonoctl poweron
ofonoctl online
sudo ip link set dev $WWAN up
str=$(ofonoctl wan | grep $WWAN)
#echo "str=["$str"]"
#if [ str == "" ]; then
sudo ofonoctl wan --connect
#fi
ip_addr=$(ip a | grep $WWAN | awk '/inet / {gsub("addr:","",$2); print $2}')
#echo "ip_addr="$ip_addr
ip_route=$(ip r | grep $WWAN | grep default)
#echo "ip_route="$ip_route
sudo ip r del $ip_route
#echo "Adding route "$ip_route" proto dhcp metric 900"
sudo ip r add $ip_route proto dhcp metric 900
echo "ip a:"
ip a | grep $WWAN
echo "ip r:"
ip r | grep $WWAN
break
;;
Data_off)
ip_addr=$(ip a | grep $WWAN | awk '/inet / {gsub("addr:","",$2); print $2}')
sudo ip link set dev $WWAN down
sudo ip a del $ip_addr dev $WWAN
echo "ip a:"
ip a | grep $WWAN
echo "ip r:"
ip r | grep $WWAN
break
;;
quit)
break
exit
;;
"")
echo "Invalid input."
;;
esac
done
read -p "Press enter to exit."
Adjust / correct as required. Hopefully it works most of the time until things are fixed by the devs.
Note that the wwan0 default route has a higher metric (900) than the wifi metric (600) so wifi has priority if it is on.
Hope @neil2ball might be able to help, even though turning modem on, ofonoctl says registered, no ringing on incoming call, and no text message.
Do you reckon eg25-manager needs to be restart too?
As it stands, 1) does not work yet...
Thought the poweroff was the culprit so I removed it. Makes no difference.
Still when you do:
Code:
ofonoctl offline
Code:
Modem Status SIM
------------ --------- -------
quectelqmi_0 Unpowered Unknown
As soon 2) is run, running 1) gives you the registration message. Running 3) gets mobile data working. But no incoming calls or SMS / text messages....
Pinephone v1.2 UBports CE. Adelaide, Australia using Amaysim SIM (Optus network, VoLTE enabled) with Mobian SD card. VoLTE working also with Felix / Vodafone AU and Aldimobile / Telstra AU.
Manjaro Plasma Mobile on EMMC.
Manjaro Plasma Mobile on EMMC.