Novatel E362 firmware doesn't notify us by unsolicited message if the
connection goes away, so set up a polling loop to check.
While here, inline a method that's only used in one place so that the
containing function is single-exit and single-cleanup.
Change-Id: If72f7c6ef06de3fb22530d42f62a8dddc6fecfda
The $NWBAND command seems to disturb the internal state of the modem
such that it is unlikely to connect to the network, and produces
widely varying error codes. We don't actively use this functionality,
it's just that setting "use all bands" is part of the normal
ModemManager simple-connect sequence. Remove it so it doesn't get
triggered.
Change-Id: I9b5914291a88a59015fb51906af6fd1c78f3952b
This permits matching a response such as '"Line 1","+19999999999",145',
which previously did not match.
Change-Id: I666af8774507c6c3b3e214b820449542065dd8b4
The string vector test was reversed, causing valid vectors not to be
returned, and commands like mmcli to not display own numbers from a
modem.
Change-Id: Ia889f49f18511a2dfcdbc71a80ee0239a6c912e0
The new `mm_bearer_report_disconnection()' allows subclasses to notify about
being disconnected, so that every layer of inheritance can chain its own code
to reset the connection status.
This commit partially disables the logic included in commit 981222. Now
subclasses (actually, no one) are not allowed to g_object_set() the
MM_BEARER_STATUS property.
If we base our supported modes default guessing only on capabilities listed by
AT+GCAP, we find that we don't know how to differenciate between 2G and 3G 3GPP
modems. So, if supported, we will try to query the list of supported networks
with AT+WS46=?, which explicitly tells us if the modem supports GERAN and/or
UTRAN and/or E-UTRAN. Note that plugins need to request this new behaviour by
setting the `MM_BROADBAND_MODEM_USE_WS46' property to TRUE when creating the
modem object.
Custom bearer implementations in Plugins are allowed to g_object_set() the
MM_BEARER_STATUS property to DISCONNECTED in order to notify that the bearer got
disconnected. We need to always reset the interface state (remove IP config, set
connected=FALSE,...) also in that case.
Also consolidated in some helper private functions the way the bearer status is
updated.
Modems which end up being found unusable (e.g. no SIM, fatal SIM error, no
capabilities) will be exposed in DBus, but just with the Modem interface and
in a FAILED state which allows no actions.