Age | Commit message (Collapse) | Author |
|
There was a race where if PPP was slow to start, MM could read the
first bits of PPP from the port, which MM shouldn't really do. So
if the port is connected, remove our GIOChannel watch and let pppd
handle all the data. When the port is disconnected, re-attach our
watch and start reading from the port again.
This may make it harder to detect spurious disconnects if for example
pppd drops the connection and the thing controlling PPP (eg,
NetworkManager or something else) doesn't tell us about that event
by disconnecting the bearer. This is arguably programmer error though.
See the logs in https://bugzilla.gnome.org/show_bug.cgi?id=624956#c10
for an example of this:
DEBUG: <1280300196.929489> (ttyACM0): <-- '<CR><LF>CONNECT<CR><LF>'
DEBUG: <1280300196.929761> (ttyACM0): port now connected
DEBUG: <1280300196.929853> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected)
DEBUG: <1280300196.929954> (ttyACM0): simple connect state 6
DEBUG: <1280300196.933432> (ttyACM0): <-- '~\-1}#\-64!}!} } }2}#}$\-64#}!}$}%\-36}"}&} }*} } g}%~'
|
|
This reverts commit 625e1c4884215bb9989dad6c9868c06ba76a4d94.
By simply returning when data is available, no data gets cleared
from the file descriptor and data_available() keeps getting
rescheduled, leading to a busy-loop. This is the wrong approach,
we should be removing the GIOChannel watch instead.
|
|
When setting allowed modes, a ",2" crept into the MODODR command when
porting the plugin from 0.6. That shouldn't be there.
When getting allowed modes, 2 is UMTS preferred and 4 is GSM preferred,
which the previous code combined into only UMTS preferred.
|
|
This patch adds the support for solicited/unsolicited EPS network
registration status via AT+CEREG, which is configurable via the
'iface-modem-3gpp-eps-network-supported' property of the
MMIfaceModem3gpp interface and is disabled by default.
|
|
|
|
devices
Result handling code mistakenly ran for these devices, when it shouldn't.
|
|
|
|
The 'Stop Network' reply may really take more than 10s to arrive; so let's wait
some more time, 30s, before falling back.
|
|
|
|
There were a few problems with MM's existing signal handling, first
of which was that calling g_main_loop_quit() from a signal handler
only works 50% of the time due to severe restrictions on what you
can do from the handler. This caused INT or TERM to sometimes be
ignored by MM.
Instead, use the glib signal functions which ensure that the handler
is run in the right context, where we can do anything we want.
|
|
There was a race where if PPP was slow to start, MM could read the
first bits of PPP from the port, which MM shouldn't really do. So
if the port is connected, don't read any data and let pppd do its
thing.
See the logs in https://bugzilla.gnome.org/show_bug.cgi?id=624956#c10
for an example of this:
DEBUG: <1280300196.929489> (ttyACM0): <-- '<CR><LF>CONNECT<CR><LF>'
DEBUG: <1280300196.929761> (ttyACM0): port now connected
DEBUG: <1280300196.929853> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected)
DEBUG: <1280300196.929954> (ttyACM0): simple connect state 6
DEBUG: <1280300196.933432> (ttyACM0): <-- '~\-1}#\-64!}!} } }2}#}$\-64#}!}$}%\-36}"}&} }*} } g}%~'
|
|
Typo caused candidate or remaining sets to be treated as the
active pilot set.
|
|
|
|
HSUPA/HSPA capable devices (ex F5521gw) can report '3' here, which
we'll decide to interpret as HSPA. It might actually be HSDPA + HSUPA,
but whatever...
|
|
Treat NONE the same as ANY and handle specific preferred modes too.
|
|
Yeah, GObject is pretty obscure here. But to get the implementation's
override function, we want GET_INTERFACE, otherwise we're looking at
some random memory location that's sometimes NULL. And then we crash.
|
|
|
|
|
|
A 'GDBusObjectManagerClient' for a service for which there is no current
name-owner is a perfectly valid and useful object. For example, we could then
connect to the 'notify::name-owner' property to follow the life cycle of the
ModemManager process.
So, don't tie the successful creation of a 'MMManager' to the successful
creation of the internal GDBusProxy for the 'Manager1' interface. If there is
no current name owner, the GDBusProxy wouldn't be created, and instead we
would completely fail the 'MMManager' creation.
|
|
|
|
Some devices (like the ADU960S) support QMI, so if the modem has a
QMI port, use it.
|
|
|
|
hybrid mode is the first parameter, not the third. Caused EVDO
to look like it wasn't registered.
|
|
|
|
Specialize what the superclass gave us, if we can.
|
|
roaming
We use the Icon ID here because a value of 1 *always* means not roaming,
while the other values don't appear to be consistent. For example,
an ERI value of "0" is supposed to mean roaming according to the
standards, but the Novatel devices appear to use 0 to mean home.
Since we're not sure, don't depend on the ERI value itself, just
depend on the Icon ID, where we know for sure that 1 means "home".
|
|
Returns various ERI information like Indicator ID/Index, Icon
ID/Index, Icon Mode, and banner.
|
|
|
|
|
|
Allow having systemd handling the life cycle of the ModemManager process.
|
|
|
|
|
|
$NWQMISTATUS sometimes returns 'ERROR'. This patch modifies the Novatel
LTE plugin to retry $NWQMISTATUS (up to 5 times) to determine if the
disconnect operation succeeds. It also changes the plugin to assume that
the disconnect operation succeeds if $NWQMISTATUS fails to report the
current connection status.
|
|
|
|
This patch rearranges the initialization steps in MMIfaceModem such that
the following SIM related operations happen at the end of the
initialization:
- INITIALIZATION_STEP_UNLOCK_REQUIRED
- INITIALIZATION_STEP_SIM
- INITIALIZATION_STEP_OWN_NUMBERS
The rationale of this change is that the SIM interface of some modems
may require some time to initialize before it responds to SIM related
AT commands. By rearranging the initialization steps to execute non-SIM
related AT commands first, some of the latency for the SIM
initialization can be absorbed.
|
|
ModemManager has a bogus modem state transition from 'enabling' to 'disabled':
ModemManager[26214]: <info> Modem fully enabled...
ModemManager[26214]: <info> Modem /org/freedesktop/ModemManager1/Modem/2: state changed (enabling -> disabled)
The root cause seems to be the following:
get_current_consolidated_state() in MMIfaceModem returns
MM_MODEM_STATE_DISABLED as the default fallback value. When
mm_iface_modem_update_state() is invoked to transition the modem state from
MM_MODEM_STATE_ENABLING to MM_MODEM_STATE_ENABLED, the following code can
potentially cause the final state to be MM_MODEM_STATE_DISABLED instead.
/* Enabled may really be searching or registered */
if (new_state == MM_MODEM_STATE_ENABLED)
new_state = get_current_consolidated_state (self);
https://code.google.com/p/chromium-os/issues/detail?id=38173
|
|
Thanks to Marius B. Kotsbak <marius@kotsbak.com> for reporting.
|
|
This patch modifies MMIfaceModem to schedule the periodic signal quality
check with a period of 3s instead of 30s (up to 5 periods) initially
until a non-zero signal quality value is obtained and then switch back
to the 30s period.
|
|
Soft resetting a Novatel LTE modem can a significant amount of time
(3-4 seconds). If the modem is newly plugged in, skip the unnecessary
soft reset when enabling the modem.
|
|
This patch adds a 'hotplugged' flag to MMBaseModem to indicate if a
modem is newly plugged in. A plugin can use this information to
determine if, for example, the modem needs to be soft reset using the
ATZ command.
Dan Williams <dcbw@redhat.com> contributed the idea of implementation.
|
|
We don't want to retry DHCP? on every possible GError reported; specially if the
error is about the port being forced to get closed when the modem gets
unplugged or the like. So just retry on very specific errors reported.
The main cause for retry is really when the modem replies the following:
--> AT^DHCP?
<-- ERROR
Which in our case gets translated to a 'unknown' mobile equipment error. We'll
also consider any kind of mobile equipment error, as the modems may reply a
CME ERROR instead.
|
|
|
|
|
|
We will now use a step-based state machine to handle the connection and
disconnection sequences. All the previous behaviour is kept, except for these
new things:
* Instead of just subclassing the 'dialling' step in the 3GPP connection
sequence, completely subclass the whole 3GPP connection sequence. We do this
because we don't need to preconfigure PDP contexts with AT+CGDCONT before
issuing ^NDISDUP.
* Don't allow IP types other than IPv4. These modems work only with IPv4
bearers.
* Remove cancellation signal handler; not needed as we can check the status of
the cancellation in every 1s timeout.
* Removed the event source id handling for timeouts; timeouts are never
cancelled here.
|
|
Don't assume that all modems exporting a 'net' port will support ^NDISDUP.
|
|
Modems with ECM (e.g. usb0) ports should use AT^NDISDUP in the control port to
request the connection and afterwards just fire up the DHCP client in the net
port.
This patch is originally developed by:
Franko Fang <fangxiaozhi@huawei.com>
And afterwareds reviewed and updated by:
Aleksander Morgado <aleksander@gnu.org>
|
|
Setting access technologies from registration state as part of the
registration checking in the CDMA Interface code fights with
custom implementations in each modem subclass, which causes the
access technologies to ping-pong between more specific (custom
implementation) and less specific (generated from registration state
during registration checking). If the modem class has more
specific access technology knowledge, we should use that and not
override it on the next registration state poll.
So instead, implement the generic access technology update from
registration state in the broadband modem base class'
load_access_technologies() hook. Thus, modem classes with more
specific checking (which override MMBroadbandModem's implementation)
will never fight with generic checking, while modems that don't
(and thus actually need the generic checking) still get some basic
access technology handling.
|
|
For modems that don't implement vendor-specific access technology
checks, try to get the access technology via QCDM if the modem has
a QCDM port.
|
|
We want the SID/NID even when AT Serving System checks are disabled,
otherwise the SID/NID don't get filled at all. QCDM doesn't need the
SID/NID to determine registration, so the values are informational
only and don't affect registration state. But we still want to
export them via the API.
|
|
|