aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-02-15serial-port: don't steal data from PPP when connectedDan Williams
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}%~'
2013-02-15Revert "serial-port: don't steal data from PPP when connected"Dan Williams
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.
2013-02-15broadband-modem-longcheer: fix getting and setting of allowed modesDan Williams
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.
2013-02-15modem: use +CEREG to determine EPS network registration statusBen Chan
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.
2013-02-14vl600: update AT com tool and RE notesDan Williams
2013-02-14broadband-modem: don't try QCDM access technology checks for non-QCDM 3GPP ↵Dan Williams
devices Result handling code mistakenly ran for these devices, when it shouldn't.
2013-02-14broadband-modem-qmi: don't try to load access technologies using QCDMAleksander Morgado
2013-02-14bearer-qmi: wait longer for the 'Stop Network' replyAleksander Morgado
The 'Stop Network' reply may really take more than 10s to arrive; so let's wait some more time, 30s, before falling back.
2013-02-13libmm-glib,simple-connect-properties: avoid using an uninitialized variableAleksander Morgado
2013-02-12core: use g_unix_signal_add() for more reliable Unix signal handlingDan Williams
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.
2013-02-12serial-port: don't steal data from PPP when connectedDan Williams
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}%~'
2013-02-08qcdm: fix handling of active pilot setDan Williams
Typo caused candidate or remaining sets to be treated as the active pilot set.
2013-02-08sierra: fix access tech reporting logicAleksander Morgado
2013-02-07broadband-modem-mbm: handle HSPA access technology in ERINFO responseDan Williams
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...
2013-02-06broadband-modem-longcheer: fix handling of preferred modesDan Williams
Treat NONE the same as ANY and handle specific preferred modes too.
2013-02-06iface-modem-messaging: fix INSTANCE_CAST() vs. GET_INTERFACE() confusionDan Williams
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.
2013-02-06libmm-glib,manager: add missing logic to ensure the proxy is createdAleksander Morgado
2013-02-06cli: don't autostart the ModemManager serviceAleksander Morgado
2013-02-06libmm-glib,manager: don't fail creation if the ModemManager process is not foundAleksander Morgado
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.
2013-02-06libmm-glib: fix error reporting when 'MMManager' is createdAleksander Morgado
2013-02-06anydata: support QMI-based devicesDan Williams
Some devices (like the ADU960S) support QMI, so if the modem has a QMI port, use it.
2013-02-06trivial: fix typoDan Williams
2013-02-06iface-modem-cdma: fix handling of HDR registration stateDan Williams
hybrid mode is the first parameter, not the third. Caused EVDO to look like it wasn't registered.
2013-02-06trivial: add debugging to generic QCDM registration parsingDan Williams
2013-02-06broadband-modem-novatel: read HDR revision for access technologyDan Williams
Specialize what the superclass gave us, if we can.
2013-02-06broadband-modem-novatel: use ERI subsystem information to better determine ↵Dan Williams
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".
2013-02-06qcdm: add Novatel ERI subsystem supportDan Williams
Returns various ERI information like Indicator ID/Index, Icon ID/Index, Icon Mode, and banner.
2013-02-06qcdm: rename Novatel subsystem definesDan Williams
2013-02-06trivial: debug print CDMA1x State resultsDan Williams
2013-02-06systemd: include systemd unit file supportAleksander Morgado
Allow having systemd handling the life cycle of the ModemManager process.
2013-02-06build: polish configure.ac a bitAleksander Morgado
2013-01-30novatel-lte: use +CFUN=4 for power downBen Chan
2013-01-30novatel-lte: retry $NWQMISTATUS check upon error during disconnectBen Chan
$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.
2013-01-30iface-modem: add a missing step increment in interface_initialization_stepBen Chan
2013-01-24iface-modem: rearrange initialization stepsBen Chan
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.
2013-01-24iface-modem: fix invalid modem state consolidationBen Chan
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
2013-01-21iface-modem: print power state as stringAleksander Morgado
Thanks to Marius B. Kotsbak <marius@kotsbak.com> for reporting.
2013-01-18iface-modem: schedule signal quality check more often initiallyBen Chan
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.
2013-01-18novatel-lte: skip soft reset if modem is newly plugged inBen Chan
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.
2013-01-18core: add 'hotplugged' flag to indicate if modem is newly plugged inBen Chan
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.
2013-01-16huawei: only retry DHCP? check on specific errorsAleksander Morgado
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.
2013-01-16huawei: check NDISDUP support only onceAleksander Morgado
2013-01-16huawei: use NDISDUP only if net port from cdc_ncm or cdc_etherAleksander Morgado
2013-01-16huawei: refactor the connection and disconnection sequences in the bearerAleksander Morgado
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.
2013-01-16huawei: explicitly check for the ^NDISDUP command supportAleksander Morgado
Don't assume that all modems exporting a 'net' port will support ^NDISDUP.
2013-01-16huawei: handle modems exposing 'net' ports with AT^NDISDUPFranko Fang
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>
2013-01-14broadband-modem: guess CDMA access technologies from registration stateDan Williams
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.
2013-01-14broadband-modem: implement generic QCDM access technology checksDan Williams
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.
2013-01-14iface-modem-cdma: get CDMA1x Serving System during QCDM registrationDan Williams
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.
2013-01-14trivial: fix commentDan Williams