Howto: Mobile data on pmOS + Phosh with APN requiring user/pass
#1
Star 
Have been having trouble getting mobile data on any of the available distributions, and finally with the help of IRC, manpages, and a few guides, I managed to get mobile data on my operator, which requires setting up an APN with user and password.

So for me it wasn't a simple matter of using ofonoctl wan --connect --append-dns, or simply enabling ofonod, or anything of the sorts. I had to dig in deeper.

This has only been tested under pmOS + Phosh so far, because it uses NetworkManager and it's easy to install ModemManager without messing up the whole system (like I did once under Ubuntu Touch). YMMV on other distributions.

Step 1

Install pmOS your favorite way, and make sure to install modemmanager


Code:
apk add modemmanager


Step 2

Disable ofono, enable modemmanager at startup

As root:

Code:
rc-service ofono stop
rc-update del ofono
rc-update del ofono-auto-enable
rc-update add modemmanager
rc-service modemmanger start


Step 3

Wait 10-20 seconds and check the status of your modem with:


Code:
mmcli -L
mmcli -m 0


If all is good, you can also see the 4G and modem icons in the status bar.

Step 4

Create a "bearer"

Code:
mmcli -m 0 --create-bearer='apn=APN.NAME,user=USERNAME,password=PASSWORD,allowed-auth=chap,allow-roaming=no'


auth and roaming may vary on your provider.

Once you've done the above successfully, you should see a new device in network manager (previously it was alled ttyUSB2) : cdc-wdm0

This is the device name to use in the next step

Step 5

Now configure the connection with nmcli, I'm not sure if you need to specify tall the APN info all over again or not, I'll have to try without and update this guide:

nmcli c add type gsm ifname cdc-wdm0 con-name OPERATOR-NAME apn APN.NAME user USERNAME password PASSWORD

Step 6

Verify connectivity with all the usual commands


Code:
nmcli c   # check status of the connection named OPERATOR-NAME as above
nmcli d    #  check status of cdc-wdm0
ip addr   # check for wwan0


and so on.

References:
https://docs.ubuntu.com/core/en/stacks/n...onnections
https://docs.ubuntu.com/core/en/stacks/n...onnections
https://www.freedesktop.org/software/Mod...cli.8.html
  Reply
#2
I hear that ofono would be needed for phonecalls (which my SIM can't do), so YMMV...
  Reply
#3
(02-28-2020, 09:06 PM)pajux Wrote: I hear that ofono would be needed for phonecalls (which my SIM can't do), so YMMV...

Nope, you don't need ofono for voice calls. ModemManager handles them just fine. You need something to handle routing the audio when calls are answered. The PureOS PinePhone image only has ModemManager installed and works with calls, sms and data.
  Reply
#4
(02-28-2020, 09:36 PM)mozzwald Wrote:
(02-28-2020, 09:06 PM)pajux Wrote: I hear that ofono would be needed for phonecalls (which my SIM can't do), so YMMV...

Nope, you don't need ofono for voice calls. ModemManager handles them just fine. You need something to handle routing the audio when calls are answered. The PureOS PinePhone image only has ModemManager installed and works with calls, sms and data.

Good to know, awesome!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  US Mobile, via T-Mobile, won't support Pinephone Pro - SOLVED, SIMPLY jovval 11 5,813 07-28-2024, 03:42 PM
Last Post: dchang0
  box86 Actually Works Well on Manjaro Phosh/xfce jakfish 9 3,038 06-30-2024, 12:26 AM
Last Post: Peter Gamma
  can I retrieve accidentally deleted voice mail with T mobile ? HLing 4 1,796 12-13-2023, 01:24 AM
Last Post: oldschool
  how to backup user data? Uturn 1 987 08-30-2023, 05:23 AM
Last Post: Kevin Kofler
  New Zealand network providers mobile data Linux2thabone 3 3,820 08-05-2023, 06:17 AM
Last Post: SchizoPinePhone225
  Problems updating KDE Plasma Mobile OS IMSAI8080 6 4,418 06-30-2023, 11:39 PM
Last Post: ionmich
  Can't get through "User Configuration" on new PinePhone a-l 24 22,229 06-01-2023, 10:08 AM
Last Post: feketej
  Current Situation With Setup and Carrier Activation With Tracfone Verizon T-Mobile pinephoneuser22 0 1,058 05-26-2023, 08:40 PM
Last Post: pinephoneuser22
  Cellular Data, Mobian - "No WWAN Adapter Found" justneedsomedatathanks 3 4,959 05-25-2023, 09:03 PM
Last Post: justneedsomedatathanks
  Cannot call at several mobile phones Gon 3 1,955 05-04-2023, 05:18 AM
Last Post: Gon

Forum Jump:


Users browsing this thread: 3 Guest(s)