Commit Graph
42 Commits
Author SHA1 Message Date
Ben Chan 5f1a1cf834 icera: increase timeout for +CFUN=4 2012-09-08 10:21:56 +02:00
Ben Chan e3152772e5 icera: properly specify MM_BROADBAND_BEARER_ICERA_DEFAULT_IP_METHOD property 2012-09-06 08:45:31 +02:00
Dan Williams 61d41978c1 icera: fix parsing of IP config options
Some of the IP address items will be 0.0.0.0 depending on what the
other items are, like when the duplicate gateway is set on newer
devices, the first gateway address may be 0.0.0.0.  Since that's
not a valid IP address, just don't set that member of the config.

Second, the intent with the duplicate gateway is only to use that
when the first gateway was not given (ie, was 0.0.0.0) so fix the
check for that.
2012-08-31 10:41:57 -05:00
Aleksander Morgado a195dabc93 icera: handle additional IPv4 configuration options
This is the port to git master of the following commit:

commit c8153b1ecdec1995258b114c90b575af1e721d3d
Author: Dan Williams <dcbw@redhat.com>
Date:   Tue Aug 28 12:16:26 2012 -0500

    icera: handle additional IPv4 configuration options

    Newer devices like the ZTE/Vodafone K3805-z have an enhanced
    %IPDPADDR command that includes a netmask and gateway, and
    these are necessary to configure the device since it uses /24
    instead of a /32.  Since the device is nice enough to tell
    us that, we should probably use that information.

    Unfortunately the MM API doens't expose the netmask and gateway
    yet, so we'll have to add a GetIP4ConfigEx() method or something
    like that, but this commit sets us up to do that.
2012-08-31 15:11:30 +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
Aleksander Morgado b288b26718 icera: fix error handling in loading supported/current bands 2012-08-30 23:46:58 +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 0436b3e457 api,introspection: report list of drivers, not just one
Different ports of the same modem may get handled by different drivers. We
therefore need to provide a list of drivers (new `Modem.Drivers' property with
signature 'as') instead of just one (removed `Modem.Driver' property with
signature 's').

$ sudo mmcli -m 0 | grep drivers
           |        drivers: 'qcserial, qmi_wwan'
2012-08-24 13:34:51 +02:00
Aleksander Morgado d18dbb869a base-modem-at: add 'raw' handling to `mm_base_modem_at_command_full()' 2012-08-24 12:32:29 +02:00
Aleksander Morgado d091344da2 broadband-bearer: pass down the data port to the 3GPP dialling step
Plugins may require specific dialling commands depending on the port type.
2012-08-23 18:56:22 +02:00
Ben Chan 7b13b5e1c0 broadband-bearer,icera: fix CID matching for unsolicited IPDPACT responses 2012-08-20 09:17:34 +02:00
Ben Chan 2b5fb682c6 icera: fix modem_load_current_bands and modem_set_bands
This patch modifies MMBroadbandModemIcera as follows:
- Change modem_load_current_bands to report only bands that are
  currently enabled
- Change modem_set_bands to handle setting ANY band in a way that no
  forbidden bands are activated.
2012-08-20 09:17:00 +02:00
Ben Chan 3955aab25b icera: add missing break statement in MMBroadbandBearerIcera set_property 2012-08-17 18:23:13 +02:00
Aleksander Morgado 53707357f3 icera: use +CFUN=4 for power down in all Icera modems 2012-08-06 20:07:27 +02:00
Aleksander Morgado e9a367eb21 icera: remove `MMIfaceIcera' 2012-08-06 20:07:27 +02:00
Aleksander Morgado 4f1269344f icera: create a generic broadband bearer when no net ports available 2012-08-06 20:07:27 +02:00
Aleksander Morgado fa8bcb0a7f icera: allow specifying at modem/bearer level whether we want DHCP or STATIC 2012-08-06 20:07:27 +02:00
Aleksander Morgado ef4de86b42 icera: new `MMBroadbandModemIcera'
We'll get rid of the `MMIfaceIcera'.
2012-08-06 20:07:27 +02:00
Dan Williams e0c17f936f icera: implement dynamic band support checking
Turns out we can check supported bands by asking the modem what
the enabled state is for the bands it says it supports, and then
setting the enabled state to what it currently is.  For bands the
modem actually doesn't support, it'll return an error.  Use that
to build up the modem's actual supported band list.
2012-08-06 20:07:27 +02:00
Dan Williams a532c081d1 icera: add generic band handling functions 2012-08-06 20:07:27 +02:00
Dan Williams abfce5493c icera: add generic unlock retries checking 2012-08-06 20:07:27 +02:00
Aleksander Morgado 93252f39ef icera: avoid highly unlikely use of already unref-ed bearer
In the connection and disconnection sequences, we make sure that the Bearer
object is valid by keeping a reference in the Dial3gppContext and
Disconnect3gppContext (actually, another one kept by the GSimpleAsyncResult as
well). But we are considering here the case where the context is completed and
freed by an unsolicited message handler before we get the reply to the AT
command, so to properly ensure that the bearer object is still valid when we try
to check if the context is in the priv struct, we need to keep an extra ref
around.
2012-08-06 20:07:26 +02:00
Aleksander Morgado d065dd572b icera: avoid trying to use an already freed context
In both the connection and disconnection sequences, we keep the context in the
private info of the Bearer object, so that we can complete and free it when we
receive %IPDPACT unsolicited messages. Now, the reply of the %IPDPACT itself may
get processed as an unsolicited message, so effectively we're processing and
finishing the connection/disconnection context *before* we process the reply of
the AT command.

This patch ensures that we do not try to re-use the connection/disconnection
context after it has been processed by the unsolicited messages handler.
2012-08-06 20:07:26 +02:00
Dan Williams 3a28f660c5 icera: fix timezone request AT command
Actual command uses a *, not a %.  Must have been a typo when
porting to the new MM since 0.6 uses a * too.
2012-08-06 20:07:26 +02:00
Aleksander Morgado e70fea145e samsung: user Icera-based timezone loading 2012-08-06 20:07:26 +02:00
Aleksander Morgado 89834810ae icera: provide method to check Icera support 2012-08-06 20:07:25 +02:00
Aleksander Morgado 6c0f14132b icera: implement network time retrieval 2012-08-06 20:07:25 +02:00
Aleksander Morgado a105ffa7b7 icera: implement timezone loading 2012-08-06 20:07:25 +02:00
Aleksander Morgado 051b79cba3 icera: try to gather extended connection failed reasons when reporting error 2012-08-06 20:07:25 +02:00
Aleksander Morgado 7209a09033 icera: implement IP config retrieval in the bearer 2012-08-06 20:07:25 +02:00
Aleksander Morgado 4dbc213184 icera: implement modem reset 2012-08-06 20:07:25 +02:00
Aleksander Morgado 5246a842ca icera: implement 3GPP disconnection 2012-08-06 20:07:25 +02:00
Aleksander Morgado 4dc9d674d1 icera: listen for %IPDPACT unsolicited messages and report connection status 2012-08-06 20:07:25 +02:00
Aleksander Morgado 35df0bfc74 icera: implement 3GPP dialling
The modem object needs to listen to unsolicited messages and report bearer
connection status itself.
2012-08-06 20:07:25 +02:00
Aleksander Morgado fa6ea4258a icera: new `MMBroadbandBearerIcera' 2012-08-06 20:07:25 +02:00
Aleksander Morgado e8aa5d0f72 icera: ignore +PACSP unsolicited messages 2012-08-06 20:07:25 +02:00
Aleksander Morgado b4f20bfaca icera: implement 3GPP unsolicited messages enabling/disabling 2012-08-06 20:07:25 +02:00
Aleksander Morgado 7163f4fe5f icera: implement loading access technologies 2012-08-06 20:07:25 +02:00
Aleksander Morgado 8ddd6e097d icera: implement %NWSTATE unsolicited messages handling 2012-08-06 20:07:24 +02:00
Aleksander Morgado a47cbae678 icera: implement allowed mode setting 2012-08-06 20:07:24 +02:00
Aleksander Morgado b8310729ad icera: implement initial allowed mode loading 2012-08-06 20:07:24 +02:00
Aleksander Morgado 2e8ede1a29 icera: add initial skeleton of the `MMIfaceIcera' interface 2012-08-06 20:07:24 +02:00