A Cure for the Moble Data Blues (KDE Community Edition)
#1
I thought for sure that there was something wrong with ofono.  I even compiled ofono's master branch from source and learned how to create a pkgbuild, then eventually post my attempt on the AUR.  Apparently, they didn't like that very much.  However, I managed to get through it.  However, this approach led to a phone that would not make calls.  So, I reinstalled the original ofono and went back to the drawing board.

I started chasing down a few items online, including a few interesting items that turned out to not be too relevant.  I began to look at the network interfaces and noticed how wwan0 never had a link and only had an ipv6 address.  I ventured a guess that my service would be on ipv4 and couldn't find a good way to obtain or renew a lease.  I downloaded udhcpd from the AUR and ran it.  It spit out an ipv4 address along with DNS servers!  Everything went sideways after that and I thought I broke the phone.  However, with a few restarts I was back to the business of trying to get my mobile data working.

I disabled NetworkManager and enabled dhcpcd instead.  I noticed that wwan0 had an ipv4 address, but still no Internet or calls.  I went back to NetworkManager to keep things as close to default as I could.

Through more research, I stumbled across this post on the Manjaro gitlab for the Plasma Mobile Pinephone.  I was struggling with the same issue.  It just happens to be the case that my modem was on and registered while my wi-fi was off when I tried the following command:

Code:
sudo ofonoctl wan --connect --append-dns

Hearkening back to the old days of fighting with NetworkManager on linux desktops, i decided to ping a public ip address and received a response, despite the icon claiming that I am disconnected: success.  Immediately afterward, I opened Angelfish and began to surf the information superhighway.

Alas, not all of the troubles are over.  It seems that when the phone goes idle and the screen turns off, the modem likes to shut down.  However, Michael Lenz (God bless him), also provided a link to the ofonoctl main page.  When this happened, the commands will not work.  It first requires a restart of the ofono service.

Code:
sudo systemctl restart ofono
sudo ofonoctl poweron
sudo ofonoctl online     #You can make phone calls here.
sudo ofonoctl wan --connect --append-dns       #Enjoy those tasty waves!

It should be simple enough to write a bash script for this.  Perhaps make it check the the internet connection and execute the script via a cron job.  I will see what I can do if someone else doesn't get to it first.  I hope this helps you as much as it does me.

P.S. The latest update to the unstable branch has allowed me to use DTMF tones during a call.  I can check my voicemail now without using my old phone to generate the tones of my pin code into the microphone of my Pinephone.  Life is good.
  Reply
#2
Thanks for posting this. Been messing with it for about a month. It has a long way to go but Plasma has potential. I wish the radio would stay persistent. I have to enter the sudo ofonoctl wan --connect --append-dns command often. But It's just for testing. Not reliable enough for a daily driver.
  Reply
#3
(02-24-2021, 06:09 PM)C0ffeeFreak Wrote: Thanks for posting this.  Been messing with it for about a month. It has a long way to go but Plasma has potential. I wish the radio would stay persistent.  I have to enter the sudo ofonoctl wan --connect --append-dns command often. But It's just for testing. Not reliable enough for a daily driver.

Perhaps if you need something as reliable as the newest Android or iPhone, sure.  However, my commute each day in each direction is over an hour long and I have managed to have voice chats on Telegram last as long over mobile data without the radio going down.  It's only when there is no signal that the radio software likes to go sideways.  Then it's usually just a restart of ofonod or even simply bringing the modem online, but sometimes a phone restart.

Maybe I can't answer calls yet or know who is calling me.  I have always lived by the "if it's important enough, they will leave a message" motto.  So, thank goodness for voice mail.  Maybe the ring tone plays through the earpiece rather than the speaker and I can't click links or get pictures in MMS.  Say one had to rely on the phone for a job, the Pinephone would not hold up.  However, if that is not the case, the phone is very usable if you know a few simple bash commands.

My wish would be to get an ofonod that works with Plasma Mobile using the master branch of ofono.  There are many updates to that branch that I'm guessing would iron out a lot of these wrinkles.  Then of course the power management contributes its own issues.

I also learned that "ofonoctl online" will power on the modem automatically, so you can skip one step in practice.  Thanks for letting me know that the post was useful.  I'll keep trying for quality posts when I can.
  Reply
#4
(02-24-2021, 07:40 PM)neil2ball Wrote:
(02-24-2021, 06:09 PM)C0ffeeFreak Wrote: Thanks for posting this.  Been messing with it for about a month. It has a long way to go but Plasma has potential. I wish the radio would stay persistent.  I have to enter the sudo ofonoctl wan --connect --append-dns command often. But It's just for testing. Not reliable enough for a daily driver.

Perhaps if you need something as reliable as the newest Android or iPhone, sure.  However, my commute each day in each direction is over an hour long and I have managed to have voice chats on Telegram last as long over mobile data without the radio going down.  It's only when there is no signal that the radio software likes to go sideways.  Then it's usually just a restart of ofonod or even simply bringing the modem online, but sometimes a phone restart.

Maybe I can't answer calls yet or know who is calling me.  I have always lived by the "if it's important enough, they will leave a message" motto.  So, thank goodness for voice mail.  Maybe the ring tone plays through the earpiece rather than the speaker and I can't click links or get pictures in MMS.  Say one had to rely on the phone for a job, the Pinephone would not hold up.  However, if that is not the case, the phone is very usable if you know a few simple bash commands.

My wish would be to get an ofonod that works with Plasma Mobile using the master branch of ofono.  There are many updates to that branch that I'm guessing would iron out a lot of these wrinkles.  Then of course the power management contributes its own issues.

I also learned that "ofonoctl online" will power on the modem automatically, so you can skip one step in practice.  Thanks for letting me know that the post was useful.  I'll keep trying for quality posts when I can.
I apologize for me not being more clear. Yes your tip helped me. I have iPhones and Android phones. What I meant was it was nice to be able to finally test Plasma beacuse of your tip. ofono stopped working on all of the distros a month ago. Mobian on the Pinephone is my daily driver. Other then the alarm and Bluetooth calling, all the basic phone functions work. I use Wake Up Call in place of the alarm and a wired headset for now. It will come. Chromium runs well and Chromium Web Apps can replace anything I use. Arch is not far behind. Very usable. Both Manjaro Phosh and Plasma are not fully functional yet but coming along nicely. They got a later start. Linux phones are a dream come true for me. Linux mobile has come a long way in a year.
  Reply
#5
Here's a quick script (note that it doesn't have the --append-dns so it doesn't use the operator DNS):
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
you get:
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.
  Reply
#6
I wish I had the time to give your post the attention it deserves, but maybe later today.  I was having trouble at the start too.  I even flashed the modem firmware.  However, it turned out that I only needed a new sim card.  My old phone was cdma and was kicked off the network when the phone company switched to VoLTE.  The Pinephone needs a gsm sim card.  I hope that helps for now.  I will check later.
  Reply
#7
No worries, mate, as we would say down under (Australia), I'm off to bed. Annoying commands are ignored if you don't restart ofonoctl, and need ofono restart before, too...
Ofonoctl says phone registered, indicator displays it, you can get a data ip and ping it....but no incoming / outgoing calls / sms (at least for me - maybe works ok for others?).

Anyway, off to bed, hopefully someone out there can fix it. At least I get my aeroplane / airplane mode. Restart the phone to get mobile back on for now!

Sim / network / data / sms all work for me except when I use offline / offline & poweroff and try and switch it back on. No big deal. Just rather 'silly'.
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.
  Reply
#8
Ok, I believe I have things working now:
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)
    status=$(sudo systemctl status eg25-manager | grep running)
    if [ "$status" = "" ]; then
        echo "    Starting eg25-manager..."
        sudo systemctl start eg25-manager
        sleep 20
    fi
    echo "    Modem powering on and going online..."
    sudo ofonoctl poweron
    sudo ofonoctl online
    sleep 5
        ofonoctl
        break
        ;;

Mobile_off)
        echo "  Modem going offline and powering off..."
    sudo ofonoctl offline    
        sudo ofonoctl poweroff
        echo "  Stopping eg25-manager..."
        sudo systemctl stop eg25-manager
        ofonoctl
        break
        ;;

Data_on)
    status=$(sudo systemctl status eg25-manager | grep running)
        if [ "$status" = "" ]; then
                echo "  Starting eg25-manager..."
                sudo systemctl start eg25-manager
                sleep 20
        fi
        echo "  Modem powering on and going online..."
    sudo ofonoctl poweron
        sudo ofonoctl online
    sleep 5
    sudo ip link set dev $WWAN down
        sudo ip link set dev $WWAN up
    #str=$(ofonoctl wan | grep $WWAN)
    #echo "str=["$str"]"
    echo "    Running ofonoctl wan --connect"
        sudo ofonoctl wan --connect
    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 "    Deleting route and ip address"
    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."

Note that I get several clicks when stopping eg25-manager.
I haven't bothered dealing with the ofonoctl status as I don't believe it makes any difference (as in if powered / online).
You can safely ignore the output of ofonoctl wan --connect if you run Data on multiple times, it still works.


Let me know if you're having any issues.
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.
  Reply
#9
Back to square one for the mobile on one, it doesn't survive prolonged suspend or losing network, apparently.
I went for a walk and when I go the phone out of suspend it gave a network not connected message, even though the cellular signal / operator was visible and ofonoctl said registered...

Might be linked to /usr/bin/pinephone* scripts not running correctly? Not sure who runs those...
/usr/bin/pinephone-modem-setup.sh gives errors trying to echo to /sys/bus/usb/devices/3-1 (the modem)
on my Pinephone with Manjaro Plasma Mobile the modem is on 2-1:
Code:
cat /sys/bus/usb/devices/2-1/idVendor
2c7c
and
Code:
cat /sys/bus/usb/devices/2-1/idProduct
0125
This should match
Code:
lsusb
Bus 002 Device 003: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem

So to get eg25-manager / modem properly configured you need to modify 3-1 to 2-1 in
/usr/bin/pinephone-modem-setup-modemmanager.sh
and
/usr/bin/pinephone-modem-setup-ofono.sh

One of those at least will be run at boot and hopefully prevent weird things happening.

Be warned for now if you use the Mobile off and back on. I would probably reboot at this stage to make sure things are all configured properly (when you turn it back on).

Anyone with a better understanding of eg25-manager is more than welcome to chip in.
I'll do some more testing with suspend / resume.
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.
  Reply
#10
(02-25-2021, 04:54 AM)neil2ball Wrote: I wish I had the time to give your post the attention it deserves, but maybe later today.  I was having trouble at the start too.  I even flashed the modem firmware.  However, it turned out that I only needed a new sim card.  My old phone was cdma and was kicked off the network when the phone company switched to VoLTE.  The Pinephone needs a gsm sim card.  I hope that helps for now.  I will check later.

Registered to simply reply to this post.

Is it really as simple as [GSM SIM] for the pine64 phone?  Regardless of the response, ordered (2) T-Mobile SIMs, as they are GSM, to test out the pinephones Ive ordered.  

Hopefully Ill remember to update here once I receive.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PinePhone Beta Edition will not boot from MicroSD card Timothy_Ecc 10 8,965 10-04-2024, 12:01 AM
Last Post: spazz
  debugging issue realted to iso image wth extra data eror penguins_rule 4 1,375 06-18-2024, 01:18 AM
Last Post: waderatke
  Manjaro Plasma Beta and Cellular Data Service Fred Zyphal 7 6,526 03-17-2022, 05:50 PM
Last Post: Fred Zyphal
  No incoming SMS. Outgoing SMS, calls and data working. HardwarePunk 3 3,838 11-20-2021, 12:53 AM
Last Post: HardwarePunk
  No mobile data working itwurketnet 3 3,086 10-14-2021, 09:04 AM
Last Post: itwurketnet
  Plasma Mobile - no data connection KNERD 9 10,258 02-25-2021, 03:44 AM
Last Post: dcinoz
  Anbox on KDE Community Edition (Manjaro) neil2ball 8 8,152 02-21-2021, 08:53 PM
Last Post: neil2ball
  Mobile Data toggle not retained after reboot Shane 0 1,665 12-23-2020, 07:42 AM
Last Post: Shane
  Todays Manjaro CE Update Broke my AT&T Data cyberbillp 4 4,669 12-14-2020, 06:39 PM
Last Post: cyberbillp
Exclamation PinePhone Manjaro Edition, does not boot vdiazroa 2 3,622 11-28-2020, 02:00 PM
Last Post: bcg7

Forum Jump:


Users browsing this thread: 1 Guest(s)