There are two different userspace services in postmarketOS that can manage the modem:
- oFono: Integrated in Plasma Mobile
- ModemManager: Integrated in Phosh
Some modems might be only supported in oFono, while others are only supported in ModemManager. But usually both can be used.
oFono is integrated into the UI of Plasma Mobile. Alternatively it can be controlled using the Python oFono test scripts from the command line:
$ sudo apk add ofono-scripts $ /usr/lib/ofono/test/enable-modem $ /usr/lib/ofono/test/online-modem $ /usr/lib/ofono/test/list-modems
Unlock the SIM card:
$ /usr/lib/ofono/test/enter-pin pin <pin>
Eventually, your SIM card should show up as registering in
ofonoctl is also very useful test tool:
$ sudo apk add ofonoctl $ ofonoctl list
receive-sms test scripts (from
$ /usr/lib/ofono/test/send-sms "COUNTRYCODENUMBER" "Test SMS from oFono" 0 Send message using modem /gobi_0 ... /gobi_0/message_9914F33A7C53DD6F080B38755E7D64FD59EA8F8F
ModemManager is integrated into the UI of Phosh. Alternatively it can be controlled using
mmcli from the command line:
# List modems $ sudo mmcli -m 0 # Enter pin $ sudo mmcli --sim 0 --pin <pin>
On most Qualcomm SoCs the modem is a separate processor which lives next to the main CPU where Linux is running on. It needs to be given firmware by the host processor to start.
The procedure for getting the modem to work is generally the following:
- Package and install the Firmware of your modem into the file system, generally the
- Install the package
msm-modem-rpmsg(for most older SoCs on mainline, see below), depending on the kernel you are using (and reboot to activate the udev rules and services).
ofonoand start it using
rc-service ofono start
- You should see signs of your firmware being loaded in the dmesg.
- You can use the ofono test scripts (packaged in
ofonoctlto see if the Linux recognized your modem and if it works correctly.
- Note, that for dual SIM (maybe only for DSDS - dual SIM dual standby) devices you need to follow additional manual steps, otherwise the modem (and ofono) will not recognize your SIM card. See this guide.
Note: On newer SoCs (e.g. SDM845 or MSM8953), the modem seems to be available only through QRTR, and not through rpmsg channels as on older Qualcomm SoCs. You can see this if
qrtr-lookup also lists modem services such as
User Identity Module service. In that case, you can query the modem through libqmi 1.26.0+ like
qmicli -d qrtr://<node> --uim-get-card-status (get
<node> from the
qrtr-lookup output). Currently, the QRTR transport does not seem to be supported in modem services like oFono or ModemManager yet. At least for ModemManager there seem to be ongoing efforts to make it work, though. See SDM845 Modem for details and example output.
- #520 N900: integrate ofono
- #598 Let's get the cellular modem working! (presenting various stacks, general discussion)
- #1054 Get qualcomm modems working (at the end of the thread scintill wrote a few wrappers and made SMS on a QC modem work with a downstream kernel without userspace blobs!)
- #1314 i9195/Qualcomm modem support (scintill's work integrated)
- pmaports#251 xiaomi-santoni: gets modem to work on the device
- Maemo Leste bugtracker#27 Call/Phone support