Age | Commit message (Collapse) | Author |
|
MMBroadbandModem class
This commit moves creation of the MMBaseSms objects out of MMSmsList and up
into MMIfaceModemMessaging (which is already a MMBroadbandModem) and
the MMBroadbandModem subclasses themselves.
This flattens the creation of MMBaseSms objects by passing them down
from the object that creates the SMS parts, rather than having a
convoluted callback scheme relying on MMSmsList and MMBaseSms having
direct knowledge of their owning modem.
The goal is to eventually remove usage of MMBaseModem from MMBaseSms
and MMSmsList so that we can test them more easily.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Simplify MMBaseSms (making it easier to use from testcases) by
splitting the AT-specific code into MMSmsAt rather than keeping
it in the base class.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Allows us to test things that rely on MMBaseSms more easily..
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
It won't ever change over the lifetime of the BaseSMS.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
CBM isn't as complicated as SMS, and the CBM class itself doesn't
need to be overridden by QMI/MBIM/etc. Now that the log parent
and connection binding no longer require MMBaseModem we can flatten
the CBM object creation and remove usage of MMBaseModem.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Continues removing usage of MMBaseModem in a bunch of files
by splitting out bits of its usage to separate interfaces.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Rather than make all of them rely on MMBaseModem for it. This
lets us disentangle dependencies for easier unit testing.
For interfaces, rather than casting directly to MMBaseModem
use intermediate interfaces (MMIfaceAuth and MMIfaceOpLock)
that tests can fake out.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
The bypass when in testcase mode has nothing to do with the base modem
class; so make it generic.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
AT docs for many (most?) device state a max timeout of 15 seconds.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
AT docs for many (most?) Quectel devices state that QPOWD=1 receives
the OK response very quickly but the caller must wait for the
POWERED DOWN URC to avoid data loss. Do that.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
When matching profiles ignore disabled ones. When activating a
specific profile index, return an error if that profile is marked
as disabled.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Instead of using the loop index, use the actual profile index
because they aren't always the same.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Previously, a disabled profile would cause Profile Manager interface
enabling to fail because get_profile_settings_ready() returned an
error for disabled profiles.
But 3GPP profile objects already have support for the enable/disabled
setting, so just hook that up and stop returning an error for disabled
ones.
This allows successful initialization of the 3GPP Profile Manager
on devices that contain disabled profiles.
While we're at it, allow creating disabled profiles, and changing
profiles back and forth from enabled<->disabled.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
We want ports to be closed as early as possible; so make sure they
are closed in dispose() which is run explicitly by MMDevice when
cleaning up and removing the modem. Otherwise they could stay
open longer than we want, causing problems for suspend/resume.
This caused problems with suspend because cancelling the
MMBaseModem's cancellable triggered an idle handler that held
a reference to the modem, preventing finalize() from running
until after the suspend code was finished, thus preventing
ports from being closed and cleaned up. Closing them in
dispose() handles this.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
base_modem_invalid_idle() needs to keep a reference to the
MMBaseModem until its done. But if the modem is cancelled during
removal right before we're trying to forget about it, keeping
that reference can prevent everything getting cleaned up by
MMBaseModem's dispose() until after the mainloop has run again
and all our removal operations are supposedly complete.
MMDevice uses an explicit dispose() trigger that mitigates
most of this (and requires it for other reasons, like breaking
reference cycles between the modem and it's various child
classes) but it's somewhat error-prone to keep the modem
around if we don't really need to.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
This will just be done immediately after by MMBaseModem's
dispose() handler.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Make the call flow clearer.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Every use of mm_device_remove_modem() was already trying to cancel the
modem's canellable, so let's just put it there and simplify the callers.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
This refreshes operator information after manual registration. QMI and
MBIM implementations return operator info along with registration info
so they handle this easily, while with AT-based devices we must run
additional commands to retrieve that after the manual registration has
finished.
Suggested by: Kirill Buksha <kirill.buksha@axians.rs>
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/971
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
|
|
Expose a new list of 'IgnoredPorts' via D-Bus and therefore remove the use of `MM_MODEM_PORT_TYPE_IGNORED`
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
|
|
They don't necessarily reply to +WS46 but like old Motorola ESX
devices they reply to +CGMM with a known string.
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/980
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
When an outgoing call is created and added to the call list its state
is UNKNOWN. The call list emits the ADDED signal which MMIfaceModemVoice
listens for to check whether to begin polling call state.
But since UNKNOWN is not an in-progress call state polling isn't started.
And nothing was rechecking whether to start polling when the call state
changed to something other than UNKNOWN.
Do that so that we can track call progress as it dials out and is
answered.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
^SXRAT: (0-6), (0,2,3), (0,2,3)
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/974
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
MMBroadbandModemMbimMtkFibocom doesn't, so don't assert it.
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/975
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
For QMI we have an extra QMI request so use that to make sure receiving
messages is actually enabled.
Closes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
This allows to retrive the list of configured Cell Broadcast channels.
Closes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
This allows to receive Cell Broadcast messages in the specified channel
range on SDM670 based devices (X12 modem) and SDM845 (X20 modem) without
any AT ports (like the OnePlus 6/6T and Google Pixel 3a).
Helps: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
This allows to receive Cell Broadcast messages.
Tested with single part CBMs only as my setup currently only allows for
these.
Helps: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
Missing ! for strncmp() meant the test was backwards and would
erroneously report 1xRTT and EVDOr0 when those access technologies
were not in use.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Dell Snapdragon X62 before FCC Unlock reports no radio interfaces
from QMI and no device capabilities from MBIM. Instead of asserting
in mm_filter_supported_modes() when called from
mm_supported_modes_from_qmi_supported_modes_context() gracefully
handle the lack of supported modes.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Do it in a function instead of the same thing in a bunch of places.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Consistently interpret the modem's reported custom data class when
loading current mode, supported mode, supported capabilities,
setting current mode, and current access technology.
Normalize the data class to include any custom data class immediately
after reading it from any MBIM message. De-normalize it when sending
back to the modem when setting current modes so the modem receives
MBIM_DATA_CLASS_CUSTOM for the custom mode.
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/937
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
This adds support for setting the channels to override the boot up modem
defaults:
```
busctl --system call org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modem/0 org.freedesktop.ModemManager1.Modem.CellBroadcast SetChannels 'a(uu)' 1 0 9999
busctl --system get-property org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modem/0 org.freedesktop.ModemManager1.Modem.CellBroadcast Channels
a(uu) 1 0 9999
```
Closes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/934
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
`CSCB` has the form
```
CSCB: [0|1],"<channel-list>","<data-coding-scheme>"
```
If the first parameter is `0` this specifies the accepted types if `1`
it specifies rejected.
So far seen in the wild were CSCB strings with accepted types only and a
coding scheme of "" so this is what we handle for the moment.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
Some AT-based modems like the Quectel Unisoc-based RM500U don't
support the older AT commands we used to detect modes like
AT*CNTI=2 and AT+WS46. Add support for detecting 4G and 5G
with generic commands too.
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/786
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Use the new early port probe logic to do AT probes before the custom
init hook actually starts.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
AT probes
For modems that need more time to respond to AT port probes (like some Telit devices,
and Cinterion-based Telit MV31/MV32) allow a custom number of AT probe tries on a
per-port basis for generic probing, or plugins that opt into this functionality.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
If the old IMSI was unavailable because the SIM was locked, but now
is available because the SIM was unlocked, don't treat the SIM
properties change as a hotswap that may trigger dropping and re-probing
the modem.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|