Commit Graph
2980 Commits
Author SHA1 Message Date
Ben Chan 3c17065636 broadband-modem-qmi: port modem_load_model to use GTask 2018-06-02 17:56:59 +02:00
Ben Chan 0bf2800d05 broadband-modem-qmi: port modem_load_manufacturer to use GTask 2018-06-02 17:56:59 +02:00
Ben Chan dba8702952 broadband-modem-qmi: port modem_load_supported_capabilities to use GTask 2018-06-02 17:56:59 +02:00
Ben Chan 3e374e228a broadband-modem-qmi: port modem_load_current_capabilities to use GTask 2018-06-02 17:56:59 +02:00
Ben Chan 31c0da2825 broadband-modem-qmi: port common_power_up_down_off to use GTask 2018-06-02 17:56:59 +02:00
Ben Chan 71d21cba02 broadband-modem-qmi: port power_cycle to use GTask 2018-06-02 17:56:59 +02:00
Ben Chan f52264d78a broadband-modem-qmi: port modem_reset to use GTask 2018-06-02 17:56:59 +02:00
Ben Chan 15ffa69d72 broadband-modem-qmi: port modem_factory_reset to use GTask 2018-06-02 17:56:59 +02:00
Ben Chan 641e1b8a43 broadband-modem-qmi: add a temporary assure_qmi_client() helper
ensure_qmi_client() uses g_simple_async_report_take_gerror_in_idle(),
which can't be mixed with GTask. To allow migrating remaining
MMBroadbandModemQmi code to use GTask in a series of smaller patches,
this patch adds a temporary assure_qmi_client() helper, which mimics
ensure_qmi_client() but uses g_task_report_new_error(). Once all the
MMBroadbandModemQmi code is migrated to use GTask, we will drop the old
ensure_qmi_client() and renames assure_qmi_client() back to
ensure_qmi_client().
2018-06-02 17:56:59 +02:00
Aleksander Morgado 0e770b13f8 base-modem: setup a maximum number of timeouts also for USB modems
We have a maximum number of timeouts that could be enabled for TTY
modems, e.g. to detect whether the modem is available in the RS232
port or has been unplugged. This was required because RS232 modems
aren't notified via udev, so there was no other way to check presence
of the modem.

But, the same kind of checks may be used in order to detect failed
broken modems. If we have a modem that gets into an unstable state
where no AT port command goes through and all get timed out, we can
definitely flag the modem as invalid and get rid of it. If we don't do
this, we would end up leaving the modem exposed and available for
users of the API, but in a non-working state.

    ....
    <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
    <debug> Launching 3GPP connection attempt with APN 'telefonica.es'
    <debug> Looking for best CID...
    <debug> (ttyACM2) device open count is 2 (open)
    <debug> (ttyACM2): --> 'AT+CGDCONT?<CR>'
    <debug> Unexpected +CGDCONT? error: 'Serial command timed out'
    <warn>  (tty/ttyACM2) at port timed out 9 consecutive times
    <debug> Using empty CID 1 with PDP type 'ipv4'
    <debug> (ttyACM2) device open count is 3 (open)
    <debug> (ttyACM2) device open count is 2 (close)
    <debug> (ttyACM2): --> 'AT+CGDCONT=1,"IP","telefonica.es"<CR>'
    <warn>  Couldn't initialize PDP context with our APN: 'Serial command timed out'
    <debug> Couldn't connect bearer '/org/freedesktop/ModemManager1/Bearer/0': 'Serial command timed out'
    <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> registered)
    <debug> Couldn't connect bearer: 'Serial command timed out'
    <debug> (ttyACM2) device open count is 1 (close)
    <error> (tty/ttyACM2) at port timed out 10 consecutive times, marking modem '/org/freedesktop/ModemManager1/Modem/0' as invalid
    <debug> Removing from DBus bearer at '/org/freedesktop/ModemManager1/Bearer/0'
    <debug> [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.5] unexported modem from path '/org/freedesktop/ModemManager1/Modem/0'
    <debug> Periodic signal checks disabled
    <debug> (ttyACM2) device open count is 0 (close)
    <debug> (ttyACM2) closing serial port...
    <debug> (ttyACM2) serial port closed
    <debug> (ttyACM2) forced to close port
    <debug> Modem (u-blox) '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.5' completely disposed
2018-06-02 17:54:54 +02:00
Aleksander Morgado c07382a486 udev: add tags also on bind action
When a new USB device is hotplugged, e.g. a USB<->RS232 converter that
exposes a single ttyUSB0, these udev events happen:

  add  /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device)
  add  /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface)
  add  /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial)
  add  /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0/tty/ttyUSB0 (tty)
  bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial)
  bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface)
  bind /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device)

Our udev rules in MM only added tags in the 'add' events, and it looks
like the only ones 'persistent' after this sequence are those of the
last event happening on the specific path.

This meant that all TTY subsystem rules (e.g. ID_MM_CANDIDATE) would
be stored for later check (e.g. if ModemManager is started after these
rules have been applied), which was ok. "udevadm info -p ..." would
show these tags correctly always.

But this also meant that the 'bind' udev event happening for the USB
device didn't get any of our device-specific tags, and so we would be
missing them (e.g. ID_MM_DEVICE_MANUAL_SCAN_ONLY) if MM is started
after the last event has happened. "udevadm info -p ..." would
not show these tags.

Modify all our rules to also run at the 'bind' events.

See, for context:
  https://github.com/systemd/systemd/issues/8221
2018-06-02 16:54:37 +02:00
Aleksander Morgado 6c37488d4e broadband-modem-mbim: minor function renames for SMS read logic
There are two ways to report new received SMS messages:
  * For class 0 (flash) messages, MBIM_CID_SMS_READ are sent. The SMS
  comes in the MBIM indication itself.
  * For non-class 0 (standard) messages, a
  MBIM_CID_SMS_MESSAGE_STORE_STATUS notifications are sent, the SMS is
  stored and must be read with an additional MBIM request specifying
  storage index.

The names of the functions we had implied the opposite, we were
assuming flash/alert messages were reported via
MBIM_CID_SMS_MESSAGE_STORE_STATUS, not via MBIM_CID_SMS_READ.
2018-05-27 11:23:56 +02:00
Aleksander Morgado fd3a4d8d8b filter: pci and sdio ports under the platform driver filter
Do not automatically probe serial ports under the 'pci' or 'sdio'
platform drivers unless explicitly tagged with
ID_MM_PLATFORM_DRIVER_PROBE.

  $ realpath /sys/class/tty/ttyS0/
  /sys/devices/pci0000:00/0000:00:16.3/tty/ttyS0
  $ basename $(realpath /sys/devices/pci0000:00/0000:00:16.3/subsystem)
  pci
2018-05-27 11:06:00 +02:00
Aleksander Morgado 38f9510a98 iface-modem-time: don't hold a ref while waiting to be registered
The logic implementing the network timezone loading was holding a
strong reference to the modem (inside the GTask) while waiting to
be registered.

This was triggering some possible memory leaks as the modem object
could have been left around even after the modem was disconnected.
E.g. if the modem booted without antennas plugged in, it was never
getting registered, and if we unplugged it right away in that state,
the network timezone logic would have left a modem reference around
without disposing it.

This issue, combined with e.g. other interfaces relying on disposing
its own logic with the last object reference (e.g. Signal interface
sets up its logic in a context bound to the lifetime of the object)
would mean that a lot of different logic blocks were kept running even
after the modem device was unplugged from the system.

We avoid this issue by making sure that no new additional reference is
taken by the logic in charge of updating the network timezone. We just
make the timezone update context be bound to the lifetime of the
object, as other interfaces do.

While doing this, we also remove the logic in charge of "cancelling"
the context, as it isn't needed. If the logic needs to be cancelled,
we would just remove any configured timeout, which is enough.

As part of the changes, the logic has also been improved so that the
network timezone isn't only updated the first time the modem gets
registered. If the modem gets unregistered and re-registered, we would
reload the network timezone information.
2018-05-27 11:01:42 +02:00
Dan Williams 67ecad51e1 filter: add 'nozomi' and 'qcaux' drivers to MM_FILTER_RULE_TTY_DRIVER
nozomi and qcaux only drive modems and thus should be included
in this filter rule.  Allows nozomi/qcaux devices to work
automatically with strict filter mode.
2018-05-24 10:00:10 -05:00
Matthew Stanger ac5d068e37 broadband-modem: increase signal_quality_cind() poll CIND timeout
Gemalto's PLS8 may timeout on 3 second CIND query. Debug log shows
5 seconds should suffice.
2018-05-20 08:44:09 +02:00
Ben Chan 051b15cca8 iface-modem-3gpp: ignore initial registration check result when enabling
This patch extends commit c9e85b671 ("iface-modem-3gpp: ignore initial
registration check result when appropriate") to handle the situation
where a registration check update may prematurely transition the modem
to the 'enabled' state while the modem is still being enabled.

The issue is identified by Dan Williams <dcbw@redhat.com>. More details
can be found in https://bugs.freedesktop.org/show_bug.cgi?id=106468
2018-05-18 22:10:34 +02:00
Aleksander Morgado 6be6aa474f filter: fix option1 driver name
This was preventing TTY-only ZTE and Huawei modules from being grabbed
in STRICT mode.

https://bugs.freedesktop.org/show_bug.cgi?id=106253
https://bugs.freedesktop.org/show_bug.cgi?id=106234
2018-05-07 18:27:26 +02:00
Aleksander Morgado e17d5a51a2 broadband-bearer: allow matching empty APN when looking for PDP CID
The PDP contexts that are found with an empty APN configured are right
now used as placeholders that can be overwritten with the user
provided APN if no direct match is found.

We want to keep that logic in place, but for the case where we do get
an empty APN requested by the user, we need to perform the full
context match, so that the first PDP context matching the empty APN is
used.

Right now we're overwriting with the empty APN again the last PDP
context found with an empty APN, which doesn't make much sense:

    Apr 27 08:15:21 ModemManager[4251]: <debug> Found '3' PDP contexts
    Apr 27 08:15:21 ModemManager[4251]: <debug>   PDP context [cid=1] [type='ipv4'] [apn='']
    Apr 27 08:15:21 ModemManager[4251]: <debug>   PDP context [cid=2] [type='ipv4'] [apn='broadband']
    Apr 27 08:15:21 ModemManager[4251]: <debug>   PDP context [cid=15] [type='ipv4'] [apn='']
    Apr 27 08:15:21 ModemManager[4251]: <debug> Found PDP context with CID 1 and no APN
    Apr 27 08:15:21 ModemManager[4251]: <debug> Found PDP context with CID 15 and no APN
    Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3) device open count is 3 (open)
    Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3) device open count is 2 (close)
    Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3): --> 'AT+CGDCONT=15,"IP",""<CR>'
    Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
2018-04-30 18:25:49 +02:00
Aleksander Morgado 43d0bd0f91 base-modem: improve broken modem detection logic
If the serial port timeout detection logic is enabled, warn whenever
more than one consecutive command timeout happens, not just when the
limit is reached.
2018-04-30 18:23:39 +02:00
Ben Chan 21c9a239ec broadband-modem-qmi: fix memory leak in dms_set_operating_mode_ready 2018-04-30 09:44:58 +02:00
Ben Chan f9a0b945bc iface-modem: allow initial signal check after the modem is re-enabled
Commit 708b00ae3 "modem: allow periodic signal check to be disabled"
added a "iface-modem-periodic-signal-check-disabled" property in
MMIfaceModem/MMBroadbandModem to indicate if the periodic signal check
should be disabled. If the property is set to TRUE, the
signal_quality_polling_supported field of SignalCheckContext is set to
FALSE, which is sticky across modem disable/enable operations. However,
that is undesirable as we would like to issue an initial signal check to
refresh the signal quality value after the modem is re-enabled from a
state when the RF may have been previously turned off.
2018-04-25 10:34:35 +02:00
Ben Chan 5e5160c46a broadband-modem-mbim: implement initial signal quality loading
ModemManager currently relies on unsolicited MBIM_CID_SIGNAL_STATE
notifications to obtain signal quality updates, and it doesn't query the
initial signal quality. It's been observed that some MBIM modems issue a
MBIM_CID_SIGNAL_STATE notification only when there is a notable change
in RSSI. The signal quality may remain at 0 for quite some time. It's
more noticeable when simply restarting ModemManager after the modem has
been initialized and enabled once.

We could simply enable periodic signal check on an MBIM modem, but
that's less ideal as it may unnecessarily wake the modem up from USB
selective suspend (unless we use a much longer polling period).

To address the issue, this patch adds the implementation of
load_signal_quality to MMBroadbandModemMbim so that the signal quality
is initially polled via a solicited MBIM_CID_SIGNAL_STATE query. To
avoid the periodic signal check, we set the
MM_IFACE_MODEM_PERIODIC_SIGNAL_CHECK_DISABLED property to TRUE for
MMBroadbandModemMbim.
2018-04-24 18:22:03 +02:00
Ben Chan 708b00ae3b modem: allow periodic signal check to be disabled
ModemManager decides to disable periodic signal check if either
load_signal_quality is not implemented or load_signal_quality returns an
unsupported error. However, in some cases, we want to use
load_signal_quality to query the initial signal quality but rely on
unsolicited signal quality updates from the modem afterwards without
periodically polling for signal quality. To support that, this patch
introduces a property in MMIfaceModem/MMBroadbandModem to indicate if
the periodic signal check should be disabled.
2018-04-24 18:21:58 +02:00
Lubomir Rintel b39dd2ec05 all: drop unused variables
Keeps build with GCC 8 happy.

mm-base-call.c:758:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-base-call.c:822:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-base-sms.c:908:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
mm-sms-list.c:331:25: warning: variable 'ctx' set but not used [-Wunused-but-set-variable]
mm-iface-modem-messaging.c:1210:21: warning: variable 'storage_ctx' set but not used [-Wunused-but-set-variable]
huawei/mm-plugin-huawei.c:183:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
ublox/mm-plugin-ublox.c:161:24: warning: variable 'response' set but not used [-Wunused-but-set-variable]
ublox/mm-plugin-ublox.c:159:24: warning: variable 'ctx' set but not used [-Wunused-but-set-variable]
icera/mm-modem-helpers-icera.c:218:25: warning: variable 'first_free' set but not used [-Wunused-but-set-variable]
novatel/mm-common-novatel.c:50:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
2018-04-24 18:11:15 +02:00
Aleksander Morgado dc678bfef2 base-manager: additional indentation for the block covered by ref/unref 2018-02-23 12:43:22 +01:00
Eric Caruso 402559bb62 mm-base-manager: ref MMDevice before releasing port
Releasing the port on the device looks benign but because it emits
a signal, it could call device_context_port_released and unref the
MMDevice in port_context_unref. This means the MMDevice might be
disposed before we get to the g_object_ref and the subsequent call
to g_hash_table_remove will try to hash a null string, which makes
MM crash.
2018-02-23 12:33:37 +01:00
Eric Caruso d416ea491d mm-base-manager: remove element from hastable by key, not value
The hashtable is keyed on the UID of the MMDevice, and its hash
function is g_str_hash. We shouldn't be passing a GObject into
g_hash_table_remove because calling g_str_hash on an MMDevice is
wrong.
2018-02-21 12:41:20 +01:00
Alfonso Sánchez-Beato 10cb61f399 broadband-modem-qmi: update EPS registration state for LTE qmi modems
MM was not updating the EPS registration status for qmi modems. This
led to LTE-only modems never having 'registered' status. This was
happening for Quectel EC21-V modem.
2018-02-13 10:07:25 -06:00
Dan Williams dce0752743 iface-modem-3gpp: don't force auto registration if already registered
In mm_iface_modem_3gpp_register_in_network() when deciding whether to
force automatic registration or not, check whether the modem is already
registered in a network.  Just checking whether we have a valid operator
code is not sufficient, as some modems (ublox Toby R2xx) don't always
return an operator name/code even when registered.
2018-02-08 11:54:32 -06:00
Aleksander Morgado 1817746f51 broadband-modem: fix reloading of detailed signal quality status
We should not cache the AT command response otherwise we will never
re-run the same command again. The cache is needed only for AT test
commands (e.g. AT+CESQ=?).
2018-02-06 14:01:04 +01:00
Ben Chan b0b405858f broadband-modem: remove unused GError field in SetupRegistrationChecksContext 2018-02-06 11:26:33 +01:00
Ben Chan 636c245cd3 bearer-mbim: check if IP session is activated before deactivating it
It may be undesirable to issue a MBIM_CID_CONNECT
(MBIMActivationCommandDeactivate) command to deactivate an IP session
when the session isn't activated. For instance, it's been observed on
Huawei ME936 that it takes more than 30s for the modem to deactivate a
not-yet-activated session. This patch modifies MMBearerMbim to query if
a session is activated before trying to deactivate the session during a
connection attempt.
2018-02-02 09:32:53 -06:00
Ben Chan 785dfd3edd bearer-mbim: increase timeout for deactivating IP session to 60s
Since commit 0c7f3380a ("bearer-mbim: ensure session is disconnected
before trying to connect"), MMBearerMbim always issues a
MBIM_CID_CONNECT (MBIMActivationCommandDeactivate) command before a
MBIM_CID_CONNECT (MBIMActivationCommandActivate) command during a
connection attempt. That is to ensure that an IP session is actually
deactivated before we try to activate a new IP session.

Unfortunately, it's been observed on Huawei ME936 that it takes more
than 30s for the modem to respond to a MBIM_CID_CONNECT
(MBIMActivationCommandDeactivate) command when trying to deactivate a
session that hasn't been activated.

When the signal is weak, it's also possible that a modem takes more than
30s to deactivate an IP session during a disconnection attempt.

This patch increases the timeout for deactivating an IP session from 30s
to 60s in both connection and disconnection attempt.
2018-02-02 09:32:51 -06:00
Ben Chan 3de58d4137 bearer-mbim: remove a unnecessary MbimMessage variable 2018-02-02 09:32:49 -06:00
Ville Skyttä 90b89bb9f4 *: Spelling fixes 2018-01-25 09:52:12 +01:00
Aleksander Morgado 22ffd3f3aa broadband-modem: implement support for the +CEMODE command
The +CEMODE command is defined in 3GPP TS 27.007 (e.g. in section
10.1.28 in v11.0.0). This command allows querying or updating the
current UE mode, as well as checking the supported modes.

We implement support for loading the current mode and updating it. It
is assumed that the device does any additional operation needed by the
setting update, e.g. un-registering from CS when selecting an EPS-only
mode.
2018-01-20 15:41:07 +01:00
Aleksander Morgado d4aaa436d9 modem-3gpp: allow loading and changing EPS UE mode of operation
The UE modes of operation for LTE are defined in 3GPP TS 24.301 (e.g.
section 4.3 in v10.3.0):
  * PS mode 1: EPS only, 'voice centric'
  * PS mode 2: EPS only, 'data centric'
  * CS/PS mode 1: EPS and non-EPS, 'voice centric'
  * CS/PS mode 2: EPS and non-EPS, 'data centric'

The mode specifies, among other things, how the UE should behave w.r.t
CS fallback depending on the capabilities reported by the network.
2018-01-20 15:41:07 +01:00
Aleksander Morgado c4ea37fa02 filter: cdc-acm protocols 1 through 6 are all AT-capable
As per USB-IF "Class definitions for Communication Devices 1.2" docs.

Reported-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-01-18 16:32:32 +01:00
Ben Chan c9e85b6716 iface-modem-3gpp: ignore initial registration check result when appropriate
When a modem is being enabled, an initial registration check is
scheduled to determine the current registration state and access
technology. The initial registration check is performed asynchronously
and may not complete before the modem state is transitioned to
'enabled'. When the modem is disabled shortly afterwards, the
registration state is transitioned to 'unknown' and the modem state is
transitioned to 'disabled'. But the completion of the initial
registration check after that can transition the registration state and
modem state to a wrong state. This patch addresses the issue by ignoring
a registration state update if the modem isn't already enabled or being
enabled.
2018-01-12 12:24:13 +01:00
Colin Helliwell c97b9d99e3 broadband-modem: implement generic unlock retries loading 2018-01-01 18:42:28 +01:00
Colin Helliwell 8f26848ef0 helpers: move generic load_unlock_retries from Telit plugin
As a precursor to a generic load_unlock_retries method, move the
CSIM Response parser from the Telit plugin into the core code.
2018-01-01 18:37:10 +01:00
Aleksander Morgado 850107acbf bearer-qmi: fix logic if error setting up WDS event report indications
If we get an error when setting up the WDS event report indications,
make sure we run connect_context_step() after having set the next step
as CONNECT_STEP_LAST.
2017-12-21 14:43:08 +01:00
Aleksander Morgado c2b956aefc blacklist: Pycom uses Microchip's vid, so blacklist also by pid
The Microchip VID is added to the USB serial adapters greylist
instead, as it is very generic.

https://bugs.freedesktop.org/show_bug.cgi?id=104320
2017-12-18 22:55:36 +01:00
Aleksander Morgado 838b82b71b blacklist: include all Pycom devices
https://bugs.freedesktop.org/show_bug.cgi?id=104320
2017-12-18 15:34:48 +01:00
Aleksander Morgado 8f6e5bfefa sms-part-3gpp: improve warnings when decoding fails 2017-12-18 11:47:44 +01:00
Aleksander Morgado 332cf9dc01 libhelpers: include MMSmsEncoding in helper enums generation 2017-12-18 10:33:46 +01:00
Ben Chan e8bac6cb92 sms-part-3gpp: decode Unicode SMS with non-BMP code points
Depsite 3GPP TS 23.038 specifies that Unicode SMS messages are encoded in
UCS-2, UTF-16 encoding is commonly used instead on many modern platforms to
allow encoding code points that fall outside the Basic Multilingual Plane
(BMP), such as Emoji. Most of the UCS-2 code points are identical to their
equivalent UTF-16 code points.  In UTF-16, non-BMP code points are encoded in a
pair of surrogate code points (i.e. a high surrogate in 0xD800..0xDBFF,
followed by a low surrogate in 0xDC00..0xDFFF). An isolated surrogate code
point has no general interpretation in UTF-16, but could be a valid (though
unmapped) code point in UCS-2.

This patch modifies the 3GPP SMS decoding to first try UTF-16BE and then fall
back to UCS-2BE on failure. If both fail, an empty string is returned
instead of a NULL pointer.
2017-12-18 10:21:29 +01:00
Eric Caruso c44b928206 mm-iface-modem: add check_for_sim_swap method and enable steps
When in low-power mode, some modems will not dispatch unsolicited
notifications, such as for SIM hot swapping. There is code in
MMBroadbandModemTelit to handle this by checking the SIM identifier
during modem power up against the identifier cached in the SIM
D-Bus object. If they're different, the SIM has likely been
swapped while we were powered down.

We can move this code out to MMBroadbandModem because it doesn't
actually rely on any Telit-specific details, and invoke it from
MMIfaceModem via a new method.
2017-12-18 10:16:18 +01:00
Aleksander Morgado 66dce6dacc broadband-modem: use several SIM errors to flag the modem as GSM/UMTS
When using CPIN? to detect capabilities, use several possible +CME
errors as indication that the modem is at least GSM/UMTS.

E.g. to avoid situations like this one where the modem doesn't even
get into Failed state as we cannot gather capabilities:

  debug_log(): (ttyMux1): --> 'AT+GCAP<CR>'
  debug_log(): (ttyMux1): <-- '<CR><LF>+CME ERROR: 100<CR><LF>'
  mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
  debug_log(): (ttyMux1): --> 'ATI<CR>'
  debug_log(): (ttyMux1): <-- '<CR><LF>Cinterion<CR><LF>EHS5-E<CR><LF>REVISION 03.001<CR><LF><CR><LF>OK<CR><LF>'
  debug_log(): (ttyMux1): --> 'AT+CPIN?<CR>'
  debug_log(): (ttyMux1): <-- '<CR><LF>+CME ERROR: 10<CR><LF>'
  mm_serial_parser_v1_parse(): Got failure code 10: SIM not inserted
  debug_log(): (ttyMux1): --> 'AT+CGMM<CR>'
  debug_log(): (ttyMux1): <-- '<CR><LF>EHS5-E<CR><LF>'
  debug_log(): (ttyMux1): <-- '<CR><LF>OK<CR><LF>'
  iface_modem_initialize_ready(): Modem couldn't be initialized: couldn't load current capabilities: Failed to determine modem capabilities.
2017-12-05 19:10:14 +01:00