Commit Graph

3366 Commits

Author SHA1 Message Date
Aleksander Morgado
19e91c5c79 sim: better handling of IMSI response
This is a port to git master of the following commit:

commit 0b051f9c7033143c56f59267794d1cadf4bd3416
Author: Dan Williams <dcbw@redhat.com>
Date:   Mon Aug 27 10:24:50 2012 -0500

    gsm: better handling of IMSI response

    Moto EZX devices prefix the response with "+CIMI:" while most
    devices do not.
2012-08-31 10:08:11 +02:00
Aleksander Morgado
f53e53ba37 novatel: fix checking ERI for roaming/home decision
This is a port to git master of the following commit:

commit c21e29c50b5661308fb3b223c05f6942c06dc15d
Author: Dan Williams <dcbw@redhat.com>
Date:   Fri Aug 24 13:31:04 2012 -0500

    novatel: fix checking ERI for roaming/home decision

    More fallout from b22b2d99db
    which changed the return type of the qcdm_result_get_*() functions.
2012-08-31 10:04:37 +02:00
Aleksander Morgado
04d50e2db7 icera: retry configuring PDP context if it fails.
This is the port to git master of the following commit:

commit fb3187847b9c62d5205962c3c707ac1f44eaddcc
Author: Eric Shienbrood <ers@chromium.org>
Date:   Thu Aug 11 16:58:34 2011 -0400

    icera: retry configuring PDP context if it fails.

    If a connect operation is attempted immediately after a disconnect,
    it sometimes fails with CME error 583 - "a profile (CID) is currently
    active". Apparently, even though the preceding operation (%IPDPACT)
    to deactivate the PDP context returned an OK response, the context
    is not really completely available until a fraction of a second
    later. This causes the %IPDPCFG operation that is part of the
    subsequent connect attempt to fail with error 583. This change
    retries the %IPDPCFG after a one second delay.

    BUG=chrome-os-partner:4936
    TEST=This can be tested from the UI, but I found it easier to produce
    the timing needed to trigger the bug by running mm-disconnect and
    mm-connect from a shell.

    Start out with the modem in the connected state. In the shell, run

      sudo /usr/local/lib/flimflam/test/mm-disconnect; sudo /usr/local/lib/flimflam/test/mm-connect --number='*99#' --apn=wap.cingular

    modem-manager should emit the log line "Invalid error code: 583".
    Prior to this change, the connect operation would fail. Now it should
    succeed.

    Change-Id: I6ae0e6a9f5405b54b0b465fe91d9542529f365c2
    Reviewed-on: http://gerrit.chromium.org/gerrit/5781
    Tested-by: Eric Shienbrood <ers@chromium.org>
    Reviewed-by: Nathan J. Williams <njw@chromium.org>
2012-08-31 10:01:11 +02:00
Dan Williams
31d98a43c8 test: add utility to force a modem disconnect 2012-08-31 09:24:01 +02:00
Aleksander Morgado
a2c7cacb69 sierra: fix detection of APP1 port
This is the port to git master of the following commit:

commit e0242b4db7fb1556e79f6829d22edf411f9f6ba4
Author: Dan Williams <dcbw@redhat.com>
Date:   Thu Aug 23 21:14:38 2012 -0500

    sierra: fix detection of APP1 port

    The APP1 port (which has a limited AT parser) doesn't prefix
    its replies with <CR><LF> like nice modems do, and that means
    it runs afoul of the echo removal bits of the AT serial port
    code.  We need to parse the whole string even though it's not
    prefixed properly to find the APP1 string in the response.
2012-08-31 09:22:45 +02:00
Aleksander Morgado
1e5b00e33b plugin: let plugins decide if they want echo removal during AT probing
This is the port to git master of the following patch:

commit 21e66dfa1774ac2ee037ac8b6e8bb4d71a6f7931
Author: Dan Williams <dcbw@redhat.com>
Date:   Thu Aug 23 21:13:35 2012 -0500

    core: add function to open probe ports without removing echo

    Some devices (Sierra GSM ones) return stuff we need but don't
    bother to prefix it with <CR><LF>, so we need to optionally turn
    off the echo removal at probe time.
2012-08-31 09:20:43 +02:00
Aleksander Morgado
9faba58226 bearer: check only roaming allowance when launching a connection
Don't abort the connection if the modem reports unregistered in either
3GPP or CDMA, as mixed CDMA+3GPP modems may connect even if not registered
in both technologies.
2012-08-31 00:22:27 +02:00
Aleksander Morgado
6c94741e04 sierra: fix dialling context deallocation
We were using the slice allocator, not plain g_malloc().
2012-08-31 00:05:21 +02:00
Aleksander Morgado
6c1e005b54 hso: fix error handling in PIN retry counts 2012-08-30 23:47:30 +02:00
Aleksander Morgado
8be5ecf186 longcheer: fix error handling in PIN retry counts 2012-08-30 23:47:21 +02:00
Aleksander Morgado
b288b26718 icera: fix error handling in loading supported/current bands 2012-08-30 23:46:58 +02:00
Aleksander Morgado
ff1a175035 sierra: detect stupid secondary ports
Some sierra modems (e.g. MC7710) have a secondary port that likes to reply OK
to any AT command passed. Detect that as soon as possible, and don't consider
the Icera port probing result from that secondary port.
2012-08-30 22:46:56 +02:00
Aleksander Morgado
57f56f0f16 icera: fix error handling in PIN retry counts
GErrors need to be always NULL initialized.
2012-08-30 19:22:16 +02:00
Aleksander Morgado
f61db0fc4b broadband-modem-qmi: implement current bands loading
Also, sync with libqmi:

commit b03ca502f45f75541c2b2ccebf44e712ab925456
Author: Aleksander Morgado <aleksander@lanedo.com>
Date:   Thu Aug 30 19:17:19 2012 +0200

    nas: consolidate `QmiNasActiveBand' names
2012-08-30 19:18:05 +02:00
Aleksander Morgado
4f406b2c38 broadband-modem-qmi: move common enum translators to new -helpers-qmi.[ch] files 2012-08-30 18:36:11 +02:00
Aleksander Morgado
5e448cf5d3 bearer-qmi: try to use proper QMI port to connect a given net interface 2012-08-30 17:08:29 +02:00
Aleksander Morgado
36733aa4de base-modem: allow looking for the QMI port associated to a given data port
QMI and wwan ports come in pairs. Each wwan port has an associated control QMI
port, which is the only port allowed to send the Start|Stop Network QMI requests
to start|stop the connection in the given wwan interface.

Paired QMI and wwan interfaces (should) share the same parent udev device,
quoting Bjørn:

    "If we ignore the unfortunate 3.4 and 3.5 kernels, then a matching wwanX
     and cdc-wdmY set will always share the same parent USB interface on QMI
     devices.

     Having the same parent USB device is *not* sufficient.  You cannot control
     wwan0 using cdc-wdm1 in the above example."
2012-08-30 17:08:23 +02:00
Aleksander Morgado
3132e34dc1 iface-mode-simple: when setting bands or modes, wait some time to settle down
When bands or allowed modes are changed, the modem will very likely reset its
current registration and start from scratch. We will now give it some seconds
to settle down before going on with the connection request, so that the modem
has enough time to report being unregistered. Without this sleep time, the
unsolicited message reporting being unregistered may arrive *after* having
checked registration status in the Simple connect sequence, and therefore we
end up failing the connection request.
2012-08-30 16:36:38 +02:00
Aleksander Morgado
aa51a16f70 port-probe: fix generic icera support check during probing 2012-08-30 14:24:16 +02:00
Aleksander Morgado
35a69d6b8e huawei: enable QMI-powered Huawei modems 2012-08-30 14:18:03 +02:00
Aleksander Morgado
35bece0af3 sierra: enable QMI-powered Sierra modems 2012-08-30 14:17:51 +02:00
Aleksander Morgado
1ca46bb4a7 port-probe: easier check for Icera support over a list of port probes 2012-08-30 13:57:56 +02:00
Aleksander Morgado
a4e5964506 bearer: add roaming connection allowance rules from the broadband bearer
Connection allowance rules need to be applied to every kind of bearer,
regardless of whether it's based on the generic broadband bearer or not.
2012-08-30 13:35:37 +02:00
Aleksander Morgado
58553df9bb bearer-qmi: 'no-effect' errors while disconnecting aren't fatal 2012-08-30 11:26:28 +02:00
Aleksander Morgado
2edbf674e0 bearer-qmi: assume we need the global packet data handle on no-effect errors 2012-08-30 11:26:22 +02:00
Ben Chan
b060bcfc74 novatel-lte: use 'AT+CRSM=176,28423,0,0,9' instead of 'AT+CIMI' to read IMSI
Based on empirical results, 'AT+CRSM=176,28423,0,0,9' is found more reliable
than 'AT+CIMI' for reading IMSI.
2012-08-30 09:29:39 +02:00
Ben Chan
a2aad7d293 novatel-lte: add a 2-second wait after SIM unlock 2012-08-30 09:18:00 +02:00
Aleksander Morgado
1c49e35a8e iface-modem: run after-sim-unlock also when PIN request is not enabled
Whenever we query current unlock required status and we get that we're unlocked,
we'll launch the after-sim-unlock step so that we try to ensure that the SIM is
ready.
2012-08-30 09:17:43 +02:00
Aleksander Morgado
4114eabaa3 plugin-manager: never suggest result to the probe which generated the suggestion 2012-08-30 00:33:30 +02:00
Aleksander Morgado
72602a3951 qmi-bearer: use new enum types for call end reasons
Sync with libqmi:

commit d473f9ab35b85b76ebd6510a69a49ffa141d85f1
Author: Aleksander Morgado <aleksander@lanedo.com>
Date:   Tue Aug 28 13:18:44 2012 +0200

    wds: implement "Verbose Call End Reason" types

commit d39c997771da9a8037e61f1b4fc5ccfbb34be952
Author: Aleksander Morgado <aleksander@lanedo.com>
Date:   Mon Aug 27 20:29:16 2012 +0200

    wds: implement "Call End Reason" type
2012-08-29 17:26:47 +02:00
Aleksander Morgado
4cb6c42d6c qmi-bearer: fix IPv6 disconnection logic 2012-08-29 17:26:47 +02:00
Aleksander Morgado
84e69a1abb bearer-qmi: only keep internal state if IP type specific connection succeeds 2012-08-29 17:26:47 +02:00
Aleksander Morgado
c468e5b352 bearer-qmi: if possible, use "WDS Set IP Family" to select IP family preference 2012-08-29 17:26:47 +02:00
Aleksander Morgado
ea7edbbf9e bearer-qmi: only specify IP family preference TLV if one explicitly requested 2012-08-29 17:26:47 +02:00
Aleksander Morgado
fb93226858 bearer-qmi: allocate different WDS clients for IPv4 and IPv6 setups 2012-08-29 17:26:47 +02:00
Aleksander Morgado
28eb5df342 qmi-port: allow allocating more than one client of a given service
We'll uniquely identify each client generated by the service ID and a user
defined flag, so that we then allow to peek/get the specific client.
2012-08-29 17:26:47 +02:00
Aleksander Morgado
a8cf6f6278 bearer-qmi: enable dual IPv4/IPv6 connections
We provide separate steps to connect/disconnect IPv4 and IPv6.
2012-08-29 17:26:47 +02:00
Aleksander Morgado
7c291ab7a3 bearer-qmi: make compiler happy 2012-08-29 17:26:47 +02:00
Aleksander Morgado
26d9538104 bearer-qmi: 'no-effect' errors while starting network aren't fatal 2012-08-29 17:26:47 +02:00
Aleksander Morgado
5fdb820f28 bearer-qmi: pass down APN/username/password/IP-type to `WDS Start Network' 2012-08-29 17:26:47 +02:00
Aleksander Morgado
60b0812d3a bearer-qmi: implement connection/disconnection sequences 2012-08-29 17:26:47 +02:00
Aleksander Morgado
02c049ce7d broadband-modem-qmi: create a `MMBearerQmi' always by default
We still don't consider the case of having all net ports already connected and
falling back to PPP over a serial port.
2012-08-29 17:26:47 +02:00
Aleksander Morgado
b29fcde7e2 bearer-qmi: new `MMBearerQmi' object
This bearer type does not inherit from `MMBroadbandBearer', and therefore it
doesn't need to be async-initable.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
1525c6a154 build: minor reorder of files to build 2012-08-29 17:26:46 +02:00
Aleksander Morgado
c07490887a broadband-bearer: remove obsolete property names 2012-08-29 17:26:46 +02:00
Aleksander Morgado
e2a6be368e iface-modem: max number of bearers equal to the number of available data ports 2012-08-29 17:26:46 +02:00
Aleksander Morgado
14bd267e8e base-modem: allow getting/peeking all data ports 2012-08-29 17:26:46 +02:00
Aleksander Morgado
bc3e77dadf broadband-modem-qmi: assume we don't have messaging support
Just to cleanup the sequence for now, we can develop it later.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
877fbba595 broadband-modem-qmi: assume we don't have USSD support
Just to cleanup the sequence for now, we can develop it later.
2012-08-29 17:26:46 +02:00
Aleksander Morgado
494a70a8ff core: handle the 'usb'->'usbmisc' subsystem rename in the kernel
We'll try to cope with getting devices being reported in either 'usb' or
'usbmisc', trying to avoid the need of checking kernel version during runtime.
2012-08-29 17:26:46 +02:00