chromiumos/third_party/modemmanager-next.git
15 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master' master
Ben Chan [Mon, 26 Aug 2013 15:12:35 +0000 (08:12 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: I2b414652679544adec94286fdcce5fc34397fb77

15 months agoat-serial-port: avoid 'enable_disable', use just 'enable' in method name upstream
Aleksander Morgado [Mon, 26 Aug 2013 14:21:27 +0000 (16:21 +0200)]
at-serial-port: avoid 'enable_disable', use just 'enable' in method name

15 months agohuawei: ignore ^RFSWITCH unsolicited messages
Ben Chan [Thu, 22 Aug 2013 00:32:59 +0000 (17:32 -0700)]
huawei: ignore ^RFSWITCH unsolicited messages

This patch ignores the ^RFSWITCH unsolicited messages in order to avoid
them being mixed with other unsolicited messages. The modem power state
is explicitly determined by the ^RFSWITCH? command, if supported, so we
don't need to depend on the ^RFSWITCH unsolicited messages.

15 months agoat-serial-port: allow enabling/disabling unsolicited message handlers
Ben Chan [Thu, 22 Aug 2013 00:32:23 +0000 (17:32 -0700)]
at-serial-port: allow enabling/disabling unsolicited message handlers

This patch adds an 'enable' flag in MMAtUnsolicitedMsgHandler and
mm_at_serial_port_enable_disable_unsolicited_msg_handler() to allow
enabling and disabling of unsolicited message handlers. The enable flag
is set to TRUE by mm_at_serial_port_add_unsolicited_msg_handler().

15 months agohuawei: ignore +CUSATP and +CUSATEND unsolicited messages
Ben Chan [Thu, 22 Aug 2013 06:00:09 +0000 (23:00 -0700)]
huawei: ignore +CUSATP and +CUSATEND unsolicited messages

15 months agohuawei: always parse operator name in +COPS responses as ASCII
Ben Chan [Fri, 23 Aug 2013 07:05:31 +0000 (00:05 -0700)]
huawei: always parse operator name in +COPS responses as ASCII

Despite +CSCS? may claim supporting UCS2, Huawei modems always report
the oerator name in ASCII in a +COPS response. This patch addresses that
by always assuming the charset is IRA when parsing the operator name in a
+COPS response.

15 months agoaltair-lte: increase timeout for %APNN, %DPDNACT, and %STATCM
Ben Chan [Fri, 23 Aug 2013 07:05:56 +0000 (00:05 -0700)]
altair-lte: increase timeout for %APNN, %DPDNACT, and %STATCM

15 months agohuawei: always parse operator name in +COPS responses as ASCII 25/66825/2
Ben Chan [Fri, 23 Aug 2013 03:46:44 +0000 (20:46 -0700)]
huawei: always parse operator name in +COPS responses as ASCII

Despite +CSCS? may claim supporting UCS2, Huawei modems always report
the oerator name in ASCII in a +COPS response. This patch addresses that
by always assuming the charset is IRA when parsing the operator name in a
+COPS response.

BUG=chrome-os-partner:22012
TEST=Verified operator name loading on a few Huawei modems.

Change-Id: Ie6b98f7369386447ca13707ad58650d3eadd9eeb
Reviewed-on: https://gerrit.chromium.org/gerrit/66825
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

15 months agoaltair-lte: increase timeout for %APNN, %DPDNACT, and %STATCM 24/66824/2
Ben Chan [Fri, 23 Aug 2013 05:33:45 +0000 (22:33 -0700)]
altair-lte: increase timeout for %APNN, %DPDNACT, and %STATCM

BUG=chrome-os-partner:22160
TEST=Run network3g test suites.

Change-Id: Ibcd4cfab7e57b0b5539d8d5f2fea5d37e114a5c1
Reviewed-on: https://gerrit.chromium.org/gerrit/66824
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

15 months agohuawei: ignore +CUSATP and +CUSATEND unsolicited messages 19/66619/3
Ben Chan [Thu, 22 Aug 2013 01:53:19 +0000 (18:53 -0700)]
huawei: ignore +CUSATP and +CUSATEND unsolicited messages

BUG=chrome-os-partner:22106
TEST=Run network_3GSmokeTest and network_3GIdentifiers tests.

Change-Id: I73980f1119b0d624f981b395f1a730803e659eae
Reviewed-on: https://gerrit.chromium.org/gerrit/66619
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
15 months agohuawei: ignore ^RFSWITCH unsolicited messages 87/66587/3
Ben Chan [Fri, 16 Aug 2013 05:11:57 +0000 (22:11 -0700)]
huawei: ignore ^RFSWITCH unsolicited messages

This patch ignores the ^RFSWITCH unsolicited messages in order to avoid
them being mixed with other unsolicited messages. The modem power state
is explicitly determined by the ^RFSWITCH? command, if supported, so we
don't need to depend on the ^RFSWITCH unsolicited messages.

BUG=chrome-os-partner:21972
TEST=Run network_3GSmokeTest and network_3GIdentifiers tests.

Change-Id: Ifd81eaa236741eaf22f9f8cd2aa2a560f8177c1b
Reviewed-on: https://gerrit.chromium.org/gerrit/66587
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
15 months agoat-serial-port: allow enabling/disabling unsolicited message handlers 86/66586/3
Ben Chan [Mon, 19 Aug 2013 18:13:42 +0000 (11:13 -0700)]
at-serial-port: allow enabling/disabling unsolicited message handlers

This patch adds an 'enable' flag in MMAtUnsolicitedMsgHandler and
mm_at_serial_port_enable_disable_unsolicited_msg_handler() to allow
enabling and disabling of unsolicited message handlers. The enable flag
is set to TRUE by mm_at_serial_port_add_unsolicited_msg_handler().

BUG=chrome-os-partner:21972
TEST=Run network_3GSmokeTest and network_3GIdentifiers tests.

Change-Id: Ibca5b47245f6232af039a3800ace59e7ab3d9d1a
Reviewed-on: https://gerrit.chromium.org/gerrit/66586
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
15 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master'
Ben Chan [Thu, 22 Aug 2013 00:02:39 +0000 (17:02 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

15 months agobroadband-modem-qmi: avoid processing invalid TLVs in GetSignalStrength response
Aleksander Morgado [Wed, 21 Aug 2013 11:27:41 +0000 (13:27 +0200)]
broadband-modem-qmi: avoid processing invalid TLVs in GetSignalStrength response

E.g. in the GetSignalStrength output we get EV-DO-only TLVs, even if EV-DO is
not the current access technology, what ends up generating the following:

$ sudo mmcli -m 0 --signal-get

/org/freedesktop/ModemManager1/Modem/0
  -------------------------
  Refresh rate: '5' seconds
  -------------------------
  EV-DO  | RSSI: '0.00' dBm
         | EcIo: '0.00' dBm
         | SINR: '9.00' dBm
         |   Io: '-106.00' dB
  -------------------------
  UMTS   | RSSI: '94.00' dBm
         | EcIo: '-6.00' dBm

Instead, we will now assume that the RSSI list always contains the valid access
technologies being reported, and use that list to decide whether we process some
of the per-technology TLVs. We now end up getting:

$ sudo mmcli -m 0 --signal-get

/org/freedesktop/ModemManager1/Modem/0
  -------------------------
  Refresh rate: '5' seconds
  -------------------------
  UMTS   | RSSI: '94.00' dBm
         | EcIo: '-8.00' dBm

15 months agolibmm-glib,time: fix gtk-doc comments
Aleksander Morgado [Wed, 21 Aug 2013 10:56:49 +0000 (12:56 +0200)]
libmm-glib,time: fix gtk-doc comments

15 months agolibmm-glib,signal: fix introspection annotations and gtk-doc comments
Aleksander Morgado [Wed, 21 Aug 2013 10:44:28 +0000 (12:44 +0200)]
libmm-glib,signal: fix introspection annotations and gtk-doc comments

15 months agobroadband-modem-qmi: try with 'NAS Signal Strength' for extended signal info
Aleksander Morgado [Thu, 1 Aug 2013 12:20:39 +0000 (14:20 +0200)]
broadband-modem-qmi: try with 'NAS Signal Strength' for extended signal info

15 months agoiface-modem-signal: use the new 'MMSignal' in the interface implementation
Aleksander Morgado [Thu, 1 Aug 2013 11:37:38 +0000 (13:37 +0200)]
iface-modem-signal: use the new 'MMSignal' in the interface implementation

Also modify the QMI-specific implementation to act as a state machine, as we'll
add more steps afterwards.

15 months agolibmm-glib: distribute the mm-modem-signal.h header
Aleksander Morgado [Wed, 24 Jul 2013 07:33:58 +0000 (09:33 +0200)]
libmm-glib: distribute the mm-modem-signal.h header

15 months agointrospection,api: specify units for the 'rate' value in Setup()
Aleksander Morgado [Wed, 24 Jul 2013 07:32:39 +0000 (09:32 +0200)]
introspection,api: specify units for the 'rate' value in Setup()

15 months agobroadband-modem-qmi: extended signal support only in NAS >= 1.8
Aleksander Morgado [Thu, 18 Jul 2013 21:32:10 +0000 (23:32 +0200)]
broadband-modem-qmi: extended signal support only in NAS >= 1.8

15 months agoiface-modem-signal: explicitly check support for the Signal interface
Aleksander Morgado [Thu, 18 Jul 2013 21:16:45 +0000 (23:16 +0200)]
iface-modem-signal: explicitly check support for the Signal interface

15 months agolibmm-glib,signal: don't create a 'MMSignal' with an empty dictionary
Aleksander Morgado [Thu, 18 Jul 2013 21:03:22 +0000 (23:03 +0200)]
libmm-glib,signal: don't create a 'MMSignal' with an empty dictionary

15 months agoapi,introspection: use per-technology dictionaries in the 'Signal' interface
Aleksander Morgado [Thu, 18 Jul 2013 06:27:20 +0000 (08:27 +0200)]
api,introspection: use per-technology dictionaries in the 'Signal' interface

15 months agobroadband-modem-qmi: implement extended signal quality reporting
Aleksander Morgado [Mon, 8 Jul 2013 19:37:18 +0000 (21:37 +0200)]
broadband-modem-qmi: implement extended signal quality reporting

15 months agobroadband-modem: handle the new 'Signal' interface
Aleksander Morgado [Mon, 8 Jul 2013 19:11:02 +0000 (21:11 +0200)]
broadband-modem: handle the new 'Signal' interface

15 months agoiface-modem-signal: new implementation for the 'Signal' interface
Aleksander Morgado [Mon, 8 Jul 2013 18:50:02 +0000 (20:50 +0200)]
iface-modem-signal: new implementation for the 'Signal' interface

15 months agommcli: new actions to use the 'Signal' interface
Aleksander Morgado [Sun, 7 Jul 2013 19:11:47 +0000 (21:11 +0200)]
mmcli: new actions to use the 'Signal' interface

15 months agolibmm-glib: handle the new 'Signal' interface
Aleksander Morgado [Sun, 7 Jul 2013 18:41:17 +0000 (20:41 +0200)]
libmm-glib: handle the new 'Signal' interface

15 months agoapi,introspection: new 'Signal' interface for extended signal quality
Aleksander Morgado [Sun, 7 Jul 2013 18:17:23 +0000 (20:17 +0200)]
api,introspection: new 'Signal' interface for extended signal quality

15 months agohuawei: ignore ^NDISEND unsolicited messages
Aleksander Morgado [Wed, 21 Aug 2013 09:16:15 +0000 (11:16 +0200)]
huawei: ignore ^NDISEND unsolicited messages

16 months agoiface-modem-messaging: never add UNKNOWN to the lists of supported storages
Aleksander Morgado [Wed, 14 Aug 2013 16:01:53 +0000 (18:01 +0200)]
iface-modem-messaging: never add UNKNOWN to the lists of supported storages

16 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master'
Ben Chan [Thu, 15 Aug 2013 20:45:28 +0000 (13:45 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: I7b01bd1c4ce4801ef7ad88f63626bb85e964cea7

16 months agoaltair-lte: increase timeout for +CFUN=4
Ben Chan [Thu, 15 Aug 2013 18:12:01 +0000 (11:12 -0700)]
altair-lte: increase timeout for +CFUN=4

16 months agobuild: include vapigen.m4 and introspection.m4
Aleksander Morgado [Thu, 15 Aug 2013 17:20:59 +0000 (19:20 +0200)]
build: include vapigen.m4 and introspection.m4

So that we don't require vala or g-i for building even when not wanting them.

16 months agohuawei: improve ^NDISSTATQRY parser for newer firmware
Aleksander Morgado [Thu, 15 Aug 2013 16:57:10 +0000 (18:57 +0200)]
huawei: improve ^NDISSTATQRY parser for newer firmware

Newer firmware for Huawei devices will not split the IPv4 and IPv6 info in
different lines for the ^NDISSTATQRY reply; instead they will be included in the
same line. E.g. instead of

     ^NDISSTATQRY: 1,,,IPV4
     ^NDISSTATQRY: 0,33,,IPV6
     OK

We may have:

     ^NDISSTATQRY:0,,,"IPV4",0,33,,"IPV6"

Also note the optional spaces after the ':', and that in the new version the
strings are enclosed in double quotes.

https://bugzilla.gnome.org/show_bug.cgi?id=705339

16 months agohuawei: implement modem reset via +CFUN=16 for MU736 70/65870/2
Ben Chan [Wed, 14 Aug 2013 07:01:29 +0000 (00:01 -0700)]
huawei: implement modem reset via +CFUN=16 for MU736

(cherry picked from commit 34f6a2b63e9053f2beabb2a5af221221d5a0f791)

BUG=chrome-os-partner:21489
TEST=Tested the following:
1. Verify that running `modem reset` in crosh reboots MU736.
2. Verify that running `modem reset` in crosh reboots other Huawei
   modems.

Change-Id: I9e8fea284a4898a0c97a09df7ea8f4c614ef5c71
Reviewed-on: https://gerrit.chromium.org/gerrit/65870
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

16 months agoiface-modem: add mm_iface_modem_get_model helper to query model 69/65869/2
Ben Chan [Wed, 14 Aug 2013 07:01:28 +0000 (00:01 -0700)]
iface-modem: add mm_iface_modem_get_model helper to query model

(cherry picked from commit f515cd1d903fefbdaec163dea3e3f0da870ff58a)

BUG=chrome-os-partner:21489
TEST=Tested the following:
1. Verify that running `modem reset` in crosh reboots MU736.
2. Verify that running `modem reset` in crosh reboots other Huawei
   modems.

Change-Id: I9d9914c311dca841a11ae81f2a18dd742c32e23f
Reviewed-on: https://gerrit.chromium.org/gerrit/65869
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

16 months agocli: fix help message for --3gpp-ussd-respond
Ben Chan [Wed, 14 Aug 2013 18:52:59 +0000 (11:52 -0700)]
cli: fix help message for --3gpp-ussd-respond

16 months agobuild: An even cleaner srcdir != builddir fix
Colin Walters [Wed, 14 Aug 2013 17:22:27 +0000 (19:22 +0200)]
build: An even cleaner srcdir != builddir fix

Suggested-by: Dan Winship <danw@gnome.org>
16 months agobuild: Various srcdir != builddir fixes for gnome-ostree
Colin Walters [Wed, 14 Aug 2013 16:59:54 +0000 (18:59 +0200)]
build: Various srcdir != builddir fixes for gnome-ostree

The gnome-ostree build system does srcdir != builddir from git, not
quite like autotools does.

16 months agobuild: fix distcheck after Introspection changes
Dan Williams [Wed, 14 Aug 2013 15:37:45 +0000 (10:37 -0500)]
build: fix distcheck after Introspection changes

16 months agolicense: update to latest gplv2 text
Aleksander Morgado [Wed, 14 Aug 2013 13:43:28 +0000 (15:43 +0200)]
license: update to latest gplv2 text

16 months agobuild: Error out if vala bindings are enabled but Makefile.vapigen not found
Christian Persch [Wed, 14 Aug 2013 10:32:17 +0000 (12:32 +0200)]
build: Error out if vala bindings are enabled but Makefile.vapigen not found

Cannot test this for enable_vala=auto since enable_vala has been set to
yes/no by this time.

Bug #705641.

16 months agogitignore: Updated to ignore GIR and VAPI bindings generated files
Christian Persch [Tue, 13 Aug 2013 08:30:13 +0000 (10:30 +0200)]
gitignore: Updated to ignore GIR and VAPI bindings generated files

Bug #705641.

16 months agolibmm-glib: Add vala bindings
Christian Persch [Tue, 6 Aug 2013 21:12:26 +0000 (23:12 +0200)]
libmm-glib: Add vala bindings

Bug #705641.

16 months agolibmm-glib: Generate GObject introspection information
Christian Persch [Sun, 4 Aug 2013 11:51:27 +0000 (13:51 +0200)]
libmm-glib: Generate GObject introspection information

Bug #705641.

16 months agoapi: Change error enum nicks
Aleksander Morgado [Tue, 13 Aug 2013 08:06:25 +0000 (10:06 +0200)]
api: Change error enum nicks

Introspection can't copy with a '.' in the value nicks, so just remove those.

Note: This could be considered an ABI break!

Bug #705641.

Patch based on a previous one from Christian Persch <chpe@gnome.org>.

16 months agolibmm-glib: Fix and add introspection annotations
Christian Persch [Sun, 4 Aug 2013 13:13:17 +0000 (15:13 +0200)]
libmm-glib: Fix and add introspection annotations

Bug #705641.

16 months agohuawei: implement modem reset via +CFUN=16 for MU736
Ben Chan [Wed, 14 Aug 2013 07:01:29 +0000 (00:01 -0700)]
huawei: implement modem reset via +CFUN=16 for MU736

16 months agoiface-modem: add mm_iface_modem_get_model helper to query model
Ben Chan [Wed, 14 Aug 2013 07:01:28 +0000 (00:01 -0700)]
iface-modem: add mm_iface_modem_get_model helper to query model

16 months agodocs: add missing types
Aleksander Morgado [Tue, 13 Aug 2013 14:02:41 +0000 (16:02 +0200)]
docs: add missing types

16 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master'
Ben Chan [Mon, 12 Aug 2013 17:36:17 +0000 (10:36 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: Ia74665b548c91b52d6e6f5b8d11f0023cbce6f01

16 months agohuawei: enlarge the checking times for ndisstatqry in disconnecting
Fangxiaozhi (Franko) [Mon, 12 Aug 2013 07:04:43 +0000 (09:04 +0200)]
huawei: enlarge the checking times for  ndisstatqry in disconnecting

In sometimes, the disconnection of NDISDUP will spend more time than 10s.
So it is better to enlarge the checking times, such as up to 60 times.

16 months agohuawei: implement modem reset
Ben Chan [Sat, 10 Aug 2013 03:56:52 +0000 (20:56 -0700)]
huawei: implement modem reset

16 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master'
Ben Chan [Fri, 9 Aug 2013 20:40:55 +0000 (13:40 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: Iec4d7446c1fc97942185584bf5f9efa93b9210cf

16 months agobuild: install mm-cdma-manual-activation-properties.h to includes dir
Dan Williams [Thu, 8 Aug 2013 14:45:16 +0000 (09:45 -0500)]
build: install mm-cdma-manual-activation-properties.h to includes dir

16 months agobroadband-modem-qmi: check MDN set after manual activation
Aleksander Morgado [Tue, 23 Jul 2013 10:06:52 +0000 (12:06 +0200)]
broadband-modem-qmi: check MDN set after manual activation

16 months agobroadband-modem-qmi: implement manual CDMA activation
Aleksander Morgado [Mon, 15 Jul 2013 09:50:35 +0000 (11:50 +0200)]
broadband-modem-qmi: implement manual CDMA activation

We'll also now require libqmi 1.5 (git master), needed to handle the PRL TLV
in 'DMS Activate Manual'.

TODO: require 1.6 as soon as it is released.

16 months agommcli,cdma: new '--cdma-activate-manual' action
Aleksander Morgado [Mon, 15 Jul 2013 10:31:23 +0000 (12:31 +0200)]
mmcli,cdma: new '--cdma-activate-manual' action

Along with a new '--cdma-activate-manual-with-prl'.

These can be used to request CDMA Manual Activation, like:

$> sudo mmcli \
   -m 0 \
   --cdma-activate-manual="spc=123456,sid=ab,mdn=0123456789abcde,min=0123456789abcde"

Or:

$> sudo mmcli \
   -m 0 \
   --cdma-activate-manual="spc=123456,sid=ab,mdn=0123456789abcde,min=0123456789abcde" \
   --cdma-activate-manual-with-prl=/path/to/my/prl.data

16 months agolibmm-glib,cdma: implement manual activation methods
Aleksander Morgado [Mon, 15 Jul 2013 10:26:57 +0000 (12:26 +0200)]
libmm-glib,cdma: implement manual activation methods

16 months agoiface-modem-cdma: use the new 'MMCdmaManualActivationProperties'
Aleksander Morgado [Fri, 12 Jul 2013 11:35:39 +0000 (13:35 +0200)]
iface-modem-cdma: use the new 'MMCdmaManualActivationProperties'

16 months agolibmm-glib: new 'MMCdmaManualActivationProperties' helper object
Aleksander Morgado [Fri, 12 Jul 2013 10:56:50 +0000 (12:56 +0200)]
libmm-glib: new 'MMCdmaManualActivationProperties' helper object

16 months agointrospection,api: document the expected parameters in Cdma.ActivateManual()
Aleksander Morgado [Fri, 12 Jul 2013 11:10:54 +0000 (13:10 +0200)]
introspection,api: document the expected parameters in Cdma.ActivateManual()

16 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master' stabilize-4512.B
Ben Chan [Tue, 6 Aug 2013 23:03:16 +0000 (16:03 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: I85b502fd9a709381da87b3cc6b2ee1e7e68c0c8c

16 months agomodem-helpers: fix parsing of CREG/CGREG/CEREG responses
Ben Chan [Thu, 1 Aug 2013 06:07:52 +0000 (23:07 -0700)]
modem-helpers: fix parsing of CREG/CGREG/CEREG responses

The format of CREG/CGREG/CEREG responses is not very precisely defined
in or strictly enforced by the 3GPP specifications. That leads to the
fact that some modems put leading zeros in integer type fields (e.g.
<n>, <stat>, <AcT>), and not all modems put double quotes around string
type fields (e.g. <lac>, <ci>) in those C*REG responses.

For example, 0001 can be a valid value for both <stat> and <lac>. The
original C*REG parsing code in ModemManager could potentially interpret
'+CREG: <stat>,<lac>,<ci>,<AcT>' as '+CREG: <n>,<stat>,<lac>,<ci>'. This
patch addresses this issue by refining the regular expressions returned
by mm_3gpp_creg_regex_get() with the following assumptions:

1. If a modem puts leading zeros in integer type fields, it puts double
   quotes around string type fields.
2. If a modem omits double quotes around string type fields, it does not
   put leading zeros in integer type fields.

16 months agohuawei: ignore ^PDPDEACT unsolicited messages
Ben Chan [Tue, 6 Aug 2013 17:10:09 +0000 (10:10 -0700)]
huawei: ignore ^PDPDEACT unsolicited messages

16 months agohuawei: handle whitespace in RSSI responses
Ben Chan [Tue, 6 Aug 2013 17:04:46 +0000 (10:04 -0700)]
huawei: handle whitespace in RSSI responses

This patch modifies the regular expressions for parsing ^RSSI, ^RSSILVL,
and ^HRSSILVL responses to handle any whitespace that is inserted
between the colon and the RSSI value.

The issue is identified by Dan Williams <dcbw@redhat.com>

16 months agohuawei: implement modem power up and down
Ben Chan [Sat, 3 Aug 2013 01:07:11 +0000 (18:07 -0700)]
huawei: implement modem power up and down

This patch is originally developed by:
  Franko Fang <fangxiaozhi@huawei.com>

And then reviewed and updated by:
  Ben Chan <benchan@chromium.org>

(cherry picked from commit f2fd4d8de0feb3d089d5ae950bea753f65a0e384)

16 months agohuawei: implement modem power up and down
Ben Chan [Sat, 3 Aug 2013 01:07:11 +0000 (18:07 -0700)]
huawei: implement modem power up and down

This patch is originally developed by:
  Franko Fang <fangxiaozhi@huawei.com>

And then reviewed and updated by:
  Ben Chan <benchan@chromium.org>

16 months agomodem-helpers: fix parsing of CREG/CGREG/CEREG responses 31/64031/3
Ben Chan [Thu, 1 Aug 2013 00:21:28 +0000 (17:21 -0700)]
modem-helpers: fix parsing of CREG/CGREG/CEREG responses

The format of CREG/CGREG/CEREG responses is not very precisely defined
in or strictly enforced by the 3GPP specifications. That leads to the
fact that some modems put leading zeros in integer type fields (e.g.
<n>, <stat>, <AcT>), and not all modems put double quotes around string
type fields (e.g. <lac>, <ci>) in those C*REG responses.

For example, 0001 can be a valid value for both <stat> and <lac>. The
original C*REG parsing code in ModemManager could potentially interpret
'+CREG: <stat>,<lac>,<ci>,<AcT>' as '+CREG: <n>,<stat>,<lac>,<ci>'. This
patch addresses this issue by refining the regular expressions returned
by mm_3gpp_creg_regex_get() with the following assumptions:

1. If a modem puts leading zeros in integer type fields, it puts double
   quotes around string type fields.
2. If a modem omits double quotes around string type fields, it does not
   put leading zeros in integer type fields.

BUG=chrome-os-partner:21508
TEST=`FEATURES=test emerge-link modemmanager-next`

Change-Id: I39a3a6d081751f410db6c0c973831cd9b30034ed
Reviewed-on: https://gerrit.chromium.org/gerrit/64031
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: ori inbar <ori.inbar@altair-semi.com>
Reviewed-by: ori inbar <ori.inbar@altair-semi.com>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
16 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master' firmware-pit-4482.B
Ben Chan [Wed, 31 Jul 2013 17:39:02 +0000 (10:39 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: I102d7f36902771afb595df023e8385133da69218

16 months agohuawei: reset disconnect_pending to NULL when ^NDISSTATQRY fails
Ben Chan [Wed, 31 Jul 2013 07:59:26 +0000 (00:59 -0700)]
huawei: reset disconnect_pending to NULL when ^NDISSTATQRY fails

16 months agoserial: add logging to serial port open failures
Dan Williams [Tue, 23 Jul 2013 15:00:23 +0000 (10:00 -0500)]
serial: add logging to serial port open failures

16 months agobuild: fix dbus activation file generation
Aleksander Morgado [Tue, 23 Jul 2013 09:04:29 +0000 (11:04 +0200)]
build: fix dbus activation file generation

https://bugzilla.gnome.org/show_bug.cgi?id=704711

17 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master' factory-pit-4471.B stabilize-4443.B
Ben Chan [Fri, 19 Jul 2013 16:35:29 +0000 (09:35 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: Ieeaaeddd561df5110ac1c6a0d9fb5840c1e37a0e

17 months agobuild: post release version bump to 1.1.0 (development)
Aleksander Morgado [Fri, 19 Jul 2013 09:14:09 +0000 (11:14 +0200)]
build: post release version bump to 1.1.0 (development)

17 months agorelease: bump version to 1.0.0
Aleksander Morgado [Fri, 19 Jul 2013 08:00:01 +0000 (10:00 +0200)]
release: bump version to 1.0.0

17 months agorelease: update NEWS
Aleksander Morgado [Fri, 19 Jul 2013 07:59:50 +0000 (09:59 +0200)]
release: update NEWS

17 months agodocs: update migration reference version number
Aleksander Morgado [Fri, 19 Jul 2013 07:59:41 +0000 (09:59 +0200)]
docs: update migration reference version number

17 months agoapi,introspection: update interface version number
Aleksander Morgado [Fri, 19 Jul 2013 07:59:21 +0000 (09:59 +0200)]
api,introspection: update interface version number

17 months agobroadband-modem-qmi: plug memleak when listing SMS messages
Aleksander Morgado [Thu, 18 Jul 2013 20:43:55 +0000 (22:43 +0200)]
broadband-modem-qmi: plug memleak when listing SMS messages

17 months agolibmm-glib,firmware-properties: allow NULL when building dictionary
Aleksander Morgado [Thu, 18 Jul 2013 15:54:45 +0000 (17:54 +0200)]
libmm-glib,firmware-properties: allow NULL when building dictionary

17 months agosms: initialize 'validity' property always to a default
Aleksander Morgado [Wed, 17 Jul 2013 07:03:16 +0000 (09:03 +0200)]
sms: initialize 'validity' property always to a default

When we're exposing not-yet-completed multipart messages, we need to provide a
correct value for the validity property, or gdbus may crash, see e.g.:

https://bugzilla.gnome.org/show_bug.cgi?id=704319

17 months agoRevert "novatel-lte: prefer $NWMDN over +CNUM for determining own numbers" 25/61825/3
Ben Chan [Sat, 13 Jul 2013 22:54:23 +0000 (15:54 -0700)]
Revert "novatel-lte: prefer $NWMDN over +CNUM for determining own numbers"

This reverts commit 104afc0be47b8ca6006ddc85540b140b84277b4c.

shill now prcoesses the MDN returned by ModemManager and makes sure that
the right format of MDN is passed to the carrier-specific online payment
portal (CL:61823).

BUG=chrome-os-partner:20887
CQ-DEPEND=CL:61823
TEST=Tested the following on a system with the Novatel LTE E362 modem:
1. Verified that ModemManager uses AT+CNUM first to determine own numbers.
2. Run `connectivity show services` to verify that the 'Cellular.OlpUrl'
   property of a LTE cellular service includes a 10-digit MDN.
3. Verify that clicking the 'View account' button on the settings page
   of a connected LTE service launches the online account page of the
   mobile carrier.

Change-Id: I7a2cf228a8566db3180bdb87832fa8b90f91b5a6
Reviewed-on: https://gerrit.chromium.org/gerrit/61825
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

17 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master'
Ben Chan [Mon, 15 Jul 2013 21:42:44 +0000 (14:42 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: I40d34b527436057b929e8216e379e1124068769a

17 months agommcli,messaging: plug memleak
Aleksander Morgado [Mon, 15 Jul 2013 10:05:36 +0000 (12:05 +0200)]
mmcli,messaging: plug memleak

17 months agoaltair-lte: set serial port send delay to 0
Ben Chan [Mon, 15 Jul 2013 00:24:39 +0000 (17:24 -0700)]
altair-lte: set serial port send delay to 0

With a non-zero send delay, the communication over the ttyACM port of
the modem is not very stable when USB auto-suspend is enabled for the
modem. The send delay is not necessary and thus removed by this patch.

Ori Inbar <ori.inbar@altair-semi.com> reported the issue and suggested
this fix.

17 months agobuild: require libmbim by default, and explicitly log about --without-mbim
Aleksander Morgado [Sun, 14 Jul 2013 15:12:55 +0000 (17:12 +0200)]
build: require libmbim by default, and explicitly log about --without-mbim

17 months agobuild: explicitly log about --without-qmi when looking for libqmi fails
Aleksander Morgado [Sun, 14 Jul 2013 15:04:26 +0000 (17:04 +0200)]
build: explicitly log about --without-qmi when looking for libqmi fails

17 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master'
Ben Chan [Fri, 12 Jul 2013 19:26:19 +0000 (12:26 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: I15c36b9ff5585ef2871be4f456b9654a80a79465

17 months agosms-properties: fix introspection comment
Aleksander Morgado [Fri, 12 Jul 2013 10:56:27 +0000 (12:56 +0200)]
sms-properties: fix introspection comment

17 months agobuild: fix multiply defined EXTRA_DIST
Dan Williams [Thu, 11 Jul 2013 14:07:12 +0000 (09:07 -0500)]
build: fix multiply defined EXTRA_DIST

plugins/Makefile.am:375: warning: EXTRA_DIST multiply defined in condition TRUE ...
gtester.make:6: ... 'EXTRA_DIST' previously defined here
plugins/Makefile.am:1:   'gtester.make' included from here

17 months agohuawei: use ^NDISSTATQRY to check for connection status
Aleksander Morgado [Sat, 15 Jun 2013 11:05:32 +0000 (13:05 +0200)]
huawei: use ^NDISSTATQRY to check for connection status

Patch based on changes from Franko Fang <fangxiaozhi@huawei.com>.

17 months agohuawei: new helper to parse ^NDISSTATQRY responses
Aleksander Morgado [Sat, 15 Jun 2013 10:19:50 +0000 (12:19 +0200)]
huawei: new helper to parse ^NDISSTATQRY responses

17 months agobroadband-modem-qmi: fix incorrect conversions from double to gint32
Ben Chan [Thu, 11 Jul 2013 06:31:15 +0000 (23:31 -0700)]
broadband-modem-qmi: fix incorrect conversions from double to gint32

This patch fixes the following incorrect conversions from double to gint32:

mm-broadband-modem-qmi.c:4785:27: error: implicit conversion from 'double' to 'gint32' (aka 'int')
changes value from 2.225073858507201E-308 to 0 [-Werror,-Wliteral-conversion]
    gint32 bs_longitude = MM_LOCATION_LONGITUDE_UNKNOWN;
           ~~~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mm-broadband-modem-qmi.c:4786:26: error: implicit conversion from 'double' to 'gint32' (aka 'int')
changes value from 2.225073858507201E-308 to 0 [-Werror,-Wliteral-conversion]
    gint32 bs_latitude = MM_LOCATION_LATITUDE_UNKNOWN;
           ~~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

17 months agomodem-helpers-qmi: fix enumeration type mismatches
Ben Chan [Thu, 11 Jul 2013 03:36:56 +0000 (20:36 -0700)]
modem-helpers-qmi: fix enumeration type mismatches

This patch fixes the following enumeration type mismatches:

mm-modem-helpers-qmi.c:980:12: error: implicit conversion from
enumeration type 'QmiNasRatModePreference' to different
enumeration type 'QmiNasRadioTechnologyPreference' [-Werror,-Wenum-conversion]
    return qmi;
    ~~~~~~ ^~~

mm-modem-helpers-qmi.c:1082:12: error: implicit conversion from
enumeration type 'MMModemMode' to different
enumeration type 'QmiNasGsmWcdmaAcquisitionOrderPreference' [-Werror,-Wenum-conversion]
    return MM_MODEM_MODE_NONE;
    ~~~~~~ ^~~~~~~~~~~~~~~~~~

mm-modem-helpers-qmi.c:1096:16: error: implicit conversion from
enumeration type 'QmiNasRegistrationState' to different
enumeration type 'MMModem3gppRegistrationState' [-Werror,-Wenum-conversion]
    return QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED;
    ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

17 months agox22x: add support for Olivetti Olicard 200
Dan Williams [Wed, 10 Jul 2013 15:56:45 +0000 (10:56 -0500)]
x22x: add support for Olivetti Olicard 200

17 months agoMerge remote-tracking branch 'cros/upstream' into 'cros/master' factory-pit-4390.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-wolf-4389.24.B
Ben Chan [Mon, 8 Jul 2013 17:21:14 +0000 (10:21 -0700)]
Merge remote-tracking branch 'cros/upstream' into 'cros/master'

Change-Id: Ib39c9b454233e4b344006d15609fe8b576e63143

17 months agodocs,libmm-glib: update type information
Aleksander Morgado [Mon, 8 Jul 2013 11:10:51 +0000 (13:10 +0200)]
docs,libmm-glib: update type information