chromiumos/third_party/modemmanager.git
2 years agoDebugd is allowed to call SetLogging method on org.freedesktop.ModemManager factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B factory-2475.B factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B factory-3536.B factory-spring-3842.B firmware-butterfly-2788.B firmware-link-2348.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-stout-2817.B master release-R20-2268.B release-R21-2465.B release-R22-2723.B release-R23-2913.B release-R25-3428.B release-R26-3701.B release-R27-3912.B stabilize stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-bluetooth-smart stabilize-daisy stabilize-link stabilize-link-2913.278 stabilize2 toolchain-3428.65.B toolchain-3701.42.B toolchainA
Yuri Gorshenin [Tue, 10 Apr 2012 11:13:08 +0000 (15:13 +0400)]
Debugd is allowed to call SetLogging method on org.freedesktop.ModemManager
interface via DBus

BUG=chromium-os:25701
TEST=No tests needed.

Change-Id: I9b51cbe406e82959562767ed8a2ab0df6f8b4076
Reviewed-on: https://gerrit.chromium.org/gerrit/19884
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Yuri Gorshenin <ygorshenin@chromium.org>
Commit-Ready: Yuri Gorshenin <ygorshenin@chromium.org>

2 years agosms: punt handling of 8-bit encoded SMSs to clients factory-1987.B release-R19-2046.B
Dan Williams [Mon, 9 Jan 2012 23:21:27 +0000 (17:21 -0600)]
sms: punt handling of 8-bit encoded SMSs to clients

There's no encoding information about 8-bit SMS messages,
and they are often binary things like ringtones or voicemail
indicator commands.  Since there's no point to our parsing
them just let clients deal with it.

BUG=chromium-os:22200
TEST=src/test-sms from build, run on device (a test with the 8960 is under development)

Change-Id: I1a6d0fbfbd3eb77a0a7a58b5b651cbe63d7a8df4
Reviewed-on: https://gerrit.chromium.org/gerrit/15692
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Nathan J. Williams <njw@chromium.org>

2 years agotime: implement in icera
Thomas Tuttle [Fri, 27 Jan 2012 18:24:30 +0000 (13:24 -0500)]
time: implement in icera

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
(cherry picked from commit 5fc4e866c2f6453dae546f9c78ef5aa32d67ef87)

BUG=chromium-os:10366
TEST=Adhoc; spits out PropertyChanged signal with timezone data
CQ-DEPEND=I8d802556b2be987240563db8bc2cd6f7110cb87d

Change-Id: Id4b0f09e85d695143bd3b0680530b44cc23c54c9
Reviewed-on: https://gerrit.chromium.org/gerrit/14085
Commit-Ready: ttuttle <ttuttle@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agotime: poll for timezone
Thomas Tuttle [Fri, 27 Jan 2012 18:24:13 +0000 (13:24 -0500)]
time: poll for timezone

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
(cherry picked from commit 0e246fb61db27e423539f400df4774c269929a7d)

BUG=chromium-os:10366
TEST=Still compiles
CQ-DEPEND=Ic15187330f7a94efe368b31267d25a5ec89459a1

Change-Id: I8d802556b2be987240563db8bc2cd6f7110cb87d
Reviewed-on: https://gerrit.chromium.org/gerrit/14084
Commit-Ready: ttuttle <ttuttle@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agotime: implement ModemTime in ModemBase
Thomas Tuttle [Fri, 27 Jan 2012 18:23:51 +0000 (13:23 -0500)]
time: implement ModemTime in ModemBase

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
(cherry picked from commit 8121b8e31922e89e5429b8ffa8c388d84f65c1f0)

Conflicts:

src/mm-modem-base.c

BUG=chromium-os:10366
TEST=Still compiles
CQ-DEPEND=I589d68cce9ff1b13b1713f832d3aac9585eefb12

Change-Id: Ic15187330f7a94efe368b31267d25a5ec89459a1
Reviewed-on: https://gerrit.chromium.org/gerrit/14083
Commit-Ready: ttuttle <ttuttle@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agoapi: add Modem.Time introspection XML
Thomas Tuttle [Fri, 20 Jan 2012 20:20:12 +0000 (15:20 -0500)]
api: add Modem.Time introspection XML

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
(cherry picked from commit accb3f0a58b6278788bc3e449ad97d5a4a80d96d)

BUG=chromium-os:10366
TEST=Still compiles
CQ-DEPEND=I4facc05bc70c5c9e6907d041d4dfd9fc1e283bd5

Change-Id: I589d68cce9ff1b13b1713f832d3aac9585eefb12
Reviewed-on: https://gerrit.chromium.org/gerrit/14081
Commit-Ready: ttuttle <ttuttle@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agotime: implement MMModemTime boilerplate
Thomas Tuttle [Fri, 20 Jan 2012 20:20:34 +0000 (15:20 -0500)]
time: implement MMModemTime boilerplate

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
(cherry picked from commit 7f122014942e0ed5c7480967fe53573eccb08101)

BUG=chromium-os:10366
TEST=Still compiles
CQ-DEPEND=I52bd554fffd48dbcd6ea8049ed30e65b7cf605c5

Change-Id: I4facc05bc70c5c9e6907d041d4dfd9fc1e283bd5
Reviewed-on: https://gerrit.chromium.org/gerrit/14082
Commit-Ready: ttuttle <ttuttle@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agoapi: add firmware interface XML file to introspection/Makefile.am release-R18-1660.B
Thomas Tuttle [Fri, 20 Jan 2012 20:20:01 +0000 (15:20 -0500)]
api: add firmware interface XML file to introspection/Makefile.am

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
(cherry picked from commit 835e14d8d55eff05865e348977d623bff13fb130)

BUG=None
TEST=None
CQ-DEPEND=I4520f762234b7b6da8b788a5a098ddfec89a7379

Change-Id: I52bd554fffd48dbcd6ea8049ed30e65b7cf605c5
Reviewed-on: https://gerrit.chromium.org/gerrit/14080
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agotrivial: sort introspection/Makefile.am and all.xml
Thomas Tuttle [Fri, 20 Jan 2012 20:19:49 +0000 (15:19 -0500)]
trivial: sort introspection/Makefile.am and all.xml

To make things neater, sort the files listed in instrospection's Makefile
alphabetically, and sort the files listed in all.xml alphabetically within
logical groups.

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
(cherry picked from commit a1682fe3e5edbc499f58a9013b53cc583e97a149)

BUG=None
TEST=None

Change-Id: I4520f762234b7b6da8b788a5a098ddfec89a7379
Reviewed-on: https://gerrit.chromium.org/gerrit/14079
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agoPick up some fixes from upstream for -Wshadow errors.
Nathan Williams [Fri, 13 Jan 2012 22:26:36 +0000 (17:26 -0500)]
Pick up some fixes from upstream for -Wshadow errors.

Pick up some fixes from upstream for -Wshadow errors. Previously,
these errors were not detected in our build, as the VCSID mechanics from
cros-workon.eclass caused configure to believe that our version of gcc
did not support -Wshadow. Once this was fixed, the error was exposed.

BUG=none
TEST=Build with https://gerrit.chromium.org/gerrit/#change,13807
patched in.

Change-Id: I3681e8fa05f04dcd86e7983dff45a63e7075a4aa
Reviewed-on: https://gerrit.chromium.org/gerrit/14177
Commit-Ready: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
2 years agodbus: don't install introspection XML we don't really own
Dan Williams [Mon, 9 Jan 2012 22:26:27 +0000 (16:26 -0600)]
dbus: don't install introspection XML we don't really own

MM implements the DBus properties interface and of course that
requires some XML on our side for dbus-glib.  But we shouldn't
install that along with our ModemManager-specific XML.
(cherry picked from commit 96210d1c5530aa623f49e1ef19eb44c88f137581)

Change-Id: If14c0e51b5a035722aeeec0705e27c4d847e6e3b
Reviewed-on: https://gerrit.chromium.org/gerrit/13935
Tested-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Commit-Ready: Elly Jones <ellyjones@chromium.org>

2 years agocore: allow getting the result from the MMCallbackInfo
Dan Williams [Mon, 25 Jul 2011 17:49:54 +0000 (12:49 -0500)]
core: allow getting the result from the MMCallbackInfo

BUG=none
TEST=compiled it

cherry-picked from b02dc7f50fd918075c43d93d91f4bc3879b91b4c upstream

Change-Id: Ibf7866c218533cae28106b0d9ffd1a7f234a6e25
Reviewed-on: https://gerrit.chromium.org/gerrit/13877
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>

2 years ago[modemmanager] Allow debugd to call info interfaces.
Elly Jones [Thu, 5 Jan 2012 23:12:13 +0000 (18:12 -0500)]
[modemmanager] Allow debugd to call info interfaces.

BUG=chromium-os:23839
TEST=None yet

Change-Id: If75bbb10ed2a714843eb154b0758b069b19d5296
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13753
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
2 years agoFix two bugs with multipart SMS handling: signals and listing. factory-1412.B release-R17-1412.B
Nathan Williams [Tue, 22 Nov 2011 22:55:34 +0000 (17:55 -0500)]
Fix two bugs with multipart SMS handling: signals and listing.

First, arrange for received/complete signals to be sent by calling
cmti_received_has_sms() with the message properties even if the
message isn't complete yet.

Second, make the operation of the List command's multipart message
handling independent of message order by doing one pass to insert the
messages into the cache and second pass to retrieve the complete messages.

BUG=chromium-os:22591
TEST=autotests: network_ModemManagerSMS, network_ModemManagerSMSSignal
     manual: send long SMS to device while logged in

Change-Id: I59d9bd0fc98baa09253fc14b05eb8998c365b5bb
Reviewed-on: https://gerrit.chromium.org/gerrit/12050
Commit-Ready: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
2 years agoserial: report port-not-open in queueing commands via callback instead of just returning.
Nathan Williams [Wed, 23 Nov 2011 21:16:20 +0000 (16:16 -0500)]
serial: report port-not-open in queueing commands via callback instead of just returning.

This permits routines like mm-generic-gsm.c:simple_get_status() to
work again, as their callbacks get the error they are expecting. To
make this work, adapt get_csq_done() to handle a NULL response when
error is set, and make sure that multiple errors don't step on each
other in the mm_callback_info_chain() sequence created by
simple_get_status().

BUG=chromium-os:23341
TEST=Disable mobile data, run "modem status"; it should not pause and
there should not be any errors logged in /var/log/messages

Change-Id: Ib73f78242f6607a617c6bf75e377912b1b5cd67f
Reviewed-on: https://gerrit.chromium.org/gerrit/12081
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
Commit-Ready: Nathan J. Williams <njw@chromium.org>

2 years agoserial: reject new commands when the port is closed. factory-1284.B firmware-kiev-2.112.B firmware-uboot_v2-1299.B
Nathan Williams [Thu, 3 Nov 2011 20:21:45 +0000 (16:21 -0400)]
serial: reject new commands when the port is closed.

Otherwise, we can schedule a main loop call to
mm_serial_port_queue_process() for an object that's about to
disappear, leading to a crash.

BUG=chromium-os:21169
TEST=Repeatedly run "start modemmanager" and "stop modemmanager" and
watch logs for a crash.
Change-Id: I433a76855c52536eb2b99a5ecf26ac71afe1f8bb
Reviewed-on: https://gerrit.chromium.org/gerrit/11217
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
Commit-Ready: Nathan J. Williams <njw@chromium.org>

2 years agogsm: finish all disable commands before returning
Nathan Williams [Thu, 3 Nov 2011 20:13:07 +0000 (16:13 -0400)]
gsm: finish all disable commands before returning

Rearrange the primary and secondary-port disable operations so that
there's a linear chain of callbacks rather than a second dangling
callback chain for the secondary port; it's possible for the primary
port operations to complete, and for the callback to finish and start
tearing down the entire device, before the secondary port commands
run.

BUG=chromium-os:21169
TEST=Repeatedly run "start modemmanager" and "stop modemmanager" and
watch logs for a crash.

Change-Id: Ia95a7eae574737cdec38b14d39786127be1b3184
Reviewed-on: https://gerrit.chromium.org/gerrit/11216
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
Commit-Ready: Nathan J. Williams <njw@chromium.org>

2 years agoUPSTREAM: gsm: fix parsing of unsolicited CREG/CGREG response with RAC
Dan Williams [Thu, 27 Oct 2011 21:38:11 +0000 (16:38 -0500)]
UPSTREAM: gsm: fix parsing of unsolicited CREG/CGREG response with RAC

BUG=chromium-os:22071
TEST=network_3GSafetyDance passes, or fails with other errors

Change-Id: I02c8beb1c9bf576f6f3a6dac62a1874fe6a28ae7
Reviewed-on: https://gerrit.chromium.org/gerrit/10821
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agoUPSTREAM: gsm: add regex for unsolicited CREG/CGREG response with RAC
Dan Williams [Thu, 27 Oct 2011 20:13:30 +0000 (15:13 -0500)]
UPSTREAM: gsm: add regex for unsolicited CREG/CGREG response with RAC

BUG=chromium-os:22071
TEST=network_3GSafetyDance passes, or fails with other errors

Change-Id: I1f5ed9cb292931689f63c9f3957428502af4c2e0
Reviewed-on: https://gerrit.chromium.org/gerrit/10820
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agoMultipart SMS support. factory-1235.B
Nathan Williams [Tue, 26 Jul 2011 21:40:58 +0000 (17:40 -0400)]
Multipart SMS support.

BUG=chromium-os:19162
TEST=Send long SMS from a phone. Run network_ModemManagerSMS autotest.

Change-Id: I7057edb75e9bbcd42122ccb1a17f7da0b1042ddd
Reviewed-on: http://gerrit.chromium.org/gerrit/7343
Commit-Ready: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
2 years agoCheck facility locks at init time, not at enable time.
Eric Shienbrood [Wed, 28 Sep 2011 22:34:23 +0000 (18:34 -0400)]
Check facility locks at init time, not at enable time.

This is a followup to my previous commit which added tracking of
facility locks. The code that initially checked the state of
facility locks was in the Enable code path. That meant that
when the system started up with a PIN-locked SIM, the state
of facility locks was unknown, and the property holding the
bit string that describes the enable/disable state of each
lock had a value of all zeroes. This change moves the facility
lock checks to the init code path, so that the value stored
in that property is always valid, even if the modem hasn't
been enabled.

BUG=chromium-os:14253
TEST=Boot a system containing a modem with a locked SIM. Do
list-devices, and see that the Cellular.SIMLockState.LockEnabled
value is True. Previously, it would have been False.

Change-Id: If65b7b735edb677016cc732ff5ea4e434006a288
Reviewed-on: http://gerrit.chromium.org/gerrit/8458
Tested-by: Eric Shienbrood <ers@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
2 years agoEnsure that GMatchInfo and GRegex objects are freed properly.
Nathan Williams [Mon, 26 Sep 2011 17:20:17 +0000 (13:20 -0400)]
Ensure that GMatchInfo and GRegex objects are freed properly.

In particular, g_regex_match() and g_regex_match_full() allocate a
match_info structure on both success and failure, so calling
g_match_info_free() only in the success case is insufficient.

BUG=None
TEST=Inspection

Change-Id: Iea76b5b5dc3ec48120e15601a5e2dd45322133d8
Reviewed-on: http://gerrit.chromium.org/gerrit/8283
Commit-Ready: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
2 years agoAdded new property to track which facility locks are enabled.
Eric Shienbrood [Thu, 11 Aug 2011 17:58:59 +0000 (13:58 -0400)]
Added new property to track which facility locks are enabled.

The property EnabledFacilityLocks on the .Modem.Gsm.Card interface
is a bit mask that indicates which of the various personalization
codes from 3GPP TS 22.022, plus the SIM PIN lock and SIM PIN2 lock,
are enabled. The set of facility locks supported by the modem is
determined at the time the modem is enabled, and the state of each
supported lock (enabled or disabled) is determined. When the state
of a lock changes, a property-change signal is sent out. Note that
ModemManager only supports enabling and disabling SIM-PIN, via the
EnablePin method on Modem.Gsm.Card.

This functionality still needs to be plumbed out through flimflam
so that chrome can make use of it.

BUG=chromium-os:14253
TEST=mm-status (or crosh command modem status) to observe the value
of the EnabledFacilityLocks property as the SIM PIN lock is enabled
and disabled. The value toggles between 1 and 0, since the bit field
for the SIM-PIN lock is 0x1. Also, run dbus-monitor to observe the
pair of property-change signals being sent when the value changes.
Excercised the other PIN-related operations to check for regressions.

Change-Id: Ifaf071133767f54b914c4a9f62becc4669c4252d
Reviewed-on: http://gerrit.chromium.org/gerrit/7889
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
2 years agosms_decode_text(): Sanitize 8-bit data so that it is UTF8-clean.
Nathan Williams [Fri, 23 Sep 2011 21:21:15 +0000 (17:21 -0400)]
sms_decode_text(): Sanitize 8-bit data so that it is UTF8-clean.

When receiving a SMS message with raw 8-bit data, sanitize it by
replacing non-ASCII characters with \xNN escape sequences. This
prevents a problem further down the line where the body of the message
is passed into DBus as a string, and DBus chokes because the string
isn't valid UTF-8.

Once the ModemManager SMS API can support non-string message bodies,
this should be revisited.

BUG=chrome-os-partner:5953
TEST=Run network_ModemManagerSMS.py with the PDU from this bug.

Change-Id: Ic33a365f9a065c49a325e047e4c3f5e81450fa1f
Reviewed-on: http://gerrit.chromium.org/gerrit/8232
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
Commit-Ready: Nathan J. Williams <njw@chromium.org>

2 years agomodem: add firmware interface
Thomas Tuttle [Thu, 1 Sep 2011 22:53:25 +0000 (18:53 -0400)]
modem: add firmware interface

Cherry-picked from upstream 953701a6f8273b2f70f19466ed1ada48f7369715.

BUG=chromium-os:18056
TEST=Adhoc; seems to work (suite_Cellular fails with or without this patch)

Change-Id: Id156a567f147fe3ca611e987099fbd38f2086d99
Reviewed-on: http://gerrit.chromium.org/gerrit/7506
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agoRemove extraneous whitespace in SMS commands. factory-1020.B factory-980.B test-982.B
Nathan Williams [Tue, 30 Aug 2011 15:00:53 +0000 (11:00 -0400)]
Remove extraneous whitespace in SMS commands.

BUG=None
TEST=Send SMS to device
Change-Id: I32d703f5bcd9db95ae33372a541fe105a4af5a60
Reviewed-on: http://gerrit.chromium.org/gerrit/6897
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
3 years agoicera: retry configuring PDP context if it fails.
Eric Shienbrood [Thu, 11 Aug 2011 20:58:34 +0000 (16:58 -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>
3 years agoPass up registration failure to the caller. 0.15.877.B firmware-881-u-boot-v1 firmware-u-boot-v1
Eric Shienbrood [Mon, 8 Aug 2011 14:54:15 +0000 (10:54 -0400)]
Pass up registration failure to the caller.

Don't drop registration errors on the floor, which leads to the
caller thinking the Register operation succeeded when it actually
failed.

BUG=chromium-os:14584
TEST=With an AT&T SIM in the modem, use the mm-register test script
to attempt to register on the T-Mobile network, MCCMNC=310260. This
should fail - for me the error is "Network not allowed - emergency
calls only". The error should be displayed by mm-register.

NOTE: This requires use of an updated version of mm-register that's
part of a separate flimflam CL.

Change-Id: I4f7816129d5fcfeaa3fa28f1fc5fd6f72a565cdc
Reviewed-on: http://gerrit.chromium.org/gerrit/5465
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
3 years agoCorrectly track the number of SIM PIN retries left. 0.14.811.B
Eric Shienbrood [Thu, 14 Jul 2011 23:11:54 +0000 (19:11 -0400)]
Correctly track the number of SIM PIN retries left.

There are other operations besides SendPin and SendPuk that
can result in the retry count being decremented. An EnablePin
or ChangePin in which an incorrect PIN is supplied will also
decrement the retry count, and will put the SIM into blocked
mode (requiring a PUK) if the retry count drops to zero. To
correctly track this, the retry count needs to be fetched after
each of these operations, and also initially when AT+CPIN? returns
READY.

BUG=chromium-os:15114
TEST=Try changing the PIN or enabling or disabling PIN locking,
but enter an incorrect PIN. The dialog box should display
"Incorrect PIN, please try again: Tries left: 2". Try it again
with an incorrect PIN, and the same message should be displayed,
except "Tries left" should be 1. Try it one more time, and this
time, it should display "Your SIM card will be permanently
blocked ..." followed by a prompt to enter the 8-digit PIN
unblocking key.

Change-Id: Idbcdedcf4acfb62d15c5f5feaca063e8efa61f7f
Reviewed-on: http://gerrit.chromium.org/gerrit/4329
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
3 years agosamsung: add product ID for the Y3400 module. 780.B
Eric Shienbrood [Tue, 28 Jun 2011 14:46:56 +0000 (10:46 -0400)]
samsung: add product ID for the Y3400 module.

The Y3400 is functionally nearly identical to the Y3300.

Cherry-picked from upstream repo.

BUG=none
TEST=The Y3400 is recognized by ModemManager and works correctly.

Change-Id: I59b6102399318556231ba57c05e08fcaf648e5c8
Reviewed-on: http://gerrit.chromium.org/gerrit/3944
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
3 years agoAllow SetLogging from the chronos user for crosh.
Nathan Williams [Fri, 8 Jul 2011 20:04:23 +0000 (16:04 -0400)]
Allow SetLogging from the chronos user for crosh.

BUG=chromium-os:15199
TEST=run 'network_logging cellular' from crosh and check for the
absence of an AccessDenied error.

Change-Id: I23572824fa78ca70dfbd5b74b28483b4dfe439c9
Reviewed-on: http://gerrit.chromium.org/gerrit/3802
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
3 years agoAdd a DBus interface for setting the log level.
Nathan Williams [Thu, 23 Jun 2011 21:33:30 +0000 (17:33 -0400)]
Add a DBus interface for setting the log level.

Lifted almost entirely from similar code in NetworkManager.

BUG=chromium-os:15197
TEST='dbus-send --print-reply --system --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager org.freedesktop.ModemManager.SetLogging string:DEBUG'
Also try valid log levels 'ERR', 'WARN', 'INFO', and an invalid log level, such as 'ABCDE'.

Change-Id: I5768f769a8a450b9e870f6dd1f0622a138a2d6a7
Reviewed-on: http://gerrit.chromium.org/gerrit/3134
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/3791
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
3 years agoSkip ChromeOS presubmit checks for ModemManager.
Nathan Williams [Mon, 27 Jun 2011 17:36:06 +0000 (13:36 -0400)]
Skip ChromeOS presubmit checks for ModemManager.

BUG=none
TEST=Upload a change without --no-verify
Change-Id: If4cd4d7122b67fba37684018a3f443c33eb484c2
Reviewed-on: http://gerrit.chromium.org/gerrit/3247
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Reviewed-by: Ryan Cui <rcui@chromium.org>
3 years agoCleanup: const'ify the test vector data.
Nathan Williams [Thu, 30 Jun 2011 01:35:20 +0000 (21:35 -0400)]
Cleanup: const'ify the test vector data.

BUG=none
TEST=none

Change-Id: I19220ce276a66bbdc9cef5e5193fe92ed8466c0d
Reviewed-on: http://gerrit.chromium.org/gerrit/3427
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
3 years agoCalculate user-data bit padding correctly.
Nathan Williams [Thu, 30 Jun 2011 01:33:37 +0000 (21:33 -0400)]
Calculate user-data bit padding correctly.

Deal correctly with the bit padding for the user data header for the
case where the correct amount of padding is 0. Prevents skipping the
first character of the message.

Add a unit test for this.

BUG=none
TEST=The included test_pdu_udhi.

Change-Id: I13adf5d4a6756be1d96955a410f08de438615261
Reviewed-on: http://gerrit.chromium.org/gerrit/3426
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
3 years agoRecognize more text encodings from GSM-03.38.
Nathan Williams [Thu, 30 Jun 2011 01:29:47 +0000 (21:29 -0400)]
Recognize more text encodings from GSM-03.38.

When parsing the DCS (data-coding scheme) field of a SMS message,
recognize coding group "F" and the message-waiting coding groups.
Presume GSM7 for otherwise-reserved encodings, as required.

BUG=chrome-os-partner:4564
TEST=Run unit test (test_pdu_dcsf1)

Change-Id: I068d0bc314708f7133d3aeedfb920cd6aefc0759
Reviewed-on: http://gerrit.chromium.org/gerrit/3425
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
3 years agoAdd SMS unit tests. Actual test data lifted from cromo.
Nathan Williams [Wed, 29 Jun 2011 20:52:01 +0000 (16:52 -0400)]
Add SMS unit tests. Actual test data lifted from cromo.

BUG=chrome-os-partner:4654
TEST=This unit test
Change-Id: I76fbf9b0a1c436bdfcbc8da7d5805712f7bbd955
Reviewed-on: http://gerrit.chromium.org/gerrit/3398
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
3 years agoSplit SMS parsing out into a separate file, in preparation
Nathan Williams [Sat, 25 Jun 2011 01:07:24 +0000 (21:07 -0400)]
Split SMS parsing out into a separate file, in preparation
for adding some tests.

BUG=chrome-os-partner:4654
TEST=none

Change-Id: Ie8346c7ee6c4a7ae4411630d2851f61289cb695d
Reviewed-on: http://gerrit.chromium.org/gerrit/3397
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
3 years agoget_spn_done(): Handle the case of an entirely empty SPN correctly.
Nathan Williams [Thu, 23 Jun 2011 22:01:46 +0000 (18:01 -0400)]
get_spn_done(): Handle the case of an entirely empty SPN correctly.

BUG=none
TEST=Insert a SIM with a present but empty (all 0xFF) SPN and check
the system log for a (lack of) assertion errors from mm_charset_gsm_unpacked_to_utf8().

Change-Id: Ia4a735cbe8d3200d08196f190804e1e61d2ee7e3
Reviewed-on: http://gerrit.chromium.org/gerrit/3139
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/3248
Reviewed-by: Nathan J. Williams <njw@chromium.org>
3 years agosms_get_done(): Check for the correct return value from sscanf().
Nathan Williams [Sat, 25 Jun 2011 01:12:00 +0000 (21:12 -0400)]
sms_get_done(): Check for the correct return value from sscanf().

Remove an unused variable so it's more obvious what the correct value is.
Fixes live (vs. list) SMS reception on ToT.

BUG=none
TEST=Send SMS to device, see that it shows up in Chrome.

Change-Id: I9c76fb15ef229fe83672e2eee8ae37d7e6ab7b9e
Reviewed-on: http://gerrit.chromium.org/gerrit/3216
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
3 years agoRevert "Add a DBus interface for setting the log level."
Vadim Bendebury [Fri, 24 Jun 2011 14:54:20 +0000 (07:54 -0700)]
Revert "Add a DBus interface for setting the log level."

This reverts commit 817fb3aae186cbd91691ad42480650aa5546e5be.

Change-Id: I5d49efd7c2e248f4f4a7b9fb9def2344fd8039d8
Reviewed-on: http://gerrit.chromium.org/gerrit/3164
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
3 years agoRevert "get_spn_done(): Handle the case of an entirely empty SPN correctly."
Vadim Bendebury [Fri, 24 Jun 2011 14:53:54 +0000 (07:53 -0700)]
Revert "get_spn_done(): Handle the case of an entirely empty SPN correctly."

This reverts commit 726e0fc1b9ac459e2ca93fb9ad69fb188cab403c.

Change-Id: Id22780f1304947918422c474bc65f059f768388d
Reviewed-on: http://gerrit.chromium.org/gerrit/3163
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
3 years agoget_spn_done(): Handle the case of an entirely empty SPN correctly.
Nathan Williams [Thu, 23 Jun 2011 22:01:46 +0000 (18:01 -0400)]
get_spn_done(): Handle the case of an entirely empty SPN correctly.

BUG=none
TEST=Insert a SIM with a present but empty (all 0xFF) SPN and check
the system log for a (lack of) assertion errors from mm_charset_gsm_unpacked_to_utf8().

Change-Id: I1250494b9757c9bfdce56402a4471c598f41223f
Reviewed-on: http://gerrit.chromium.org/gerrit/3139
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
3 years agoAdd a DBus interface for setting the log level.
Nathan Williams [Thu, 23 Jun 2011 21:33:30 +0000 (17:33 -0400)]
Add a DBus interface for setting the log level.

Lifted almost entirely from similar code in NetworkManager.

BUG=chromium-os:15197
TEST='dbus-send --print-reply --system --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager org.freedesktop.ModemManager.SetLogging string:DEBUG'
Also try valid log levels 'ERR', 'WARN', 'INFO', and an invalid log level, such as 'ABCDE'.

Change-Id: I2bddcd0319f4966dd293b119f68e7cc1697949b7
Reviewed-on: http://gerrit.chromium.org/gerrit/3134
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
3 years agoAdded GetMsIsdn method to return the phone number.
Eric Shienbrood [Fri, 17 Jun 2011 20:59:25 +0000 (16:59 -0400)]
Added GetMsIsdn method to return the phone number.

This is useful even on a data-only device, where you need
a phone number in order to send SMS messages to the device.

This is a new version of the earlier CL, based off of the
result of rebasing to upstream ModemManager.

BUG=chromium-os:15277
TEST=Use dbus-send to issue a GetMsIsdn method call, and observe
that the correct phone number is reported. Command is

sudo dbus-send --system --print-reply --dest=org.freedesktop.ModemManager \
  /org/freedesktop/ModemManager/Modems/0 \
    org.freedesktop.ModemManager.Modem.Gsm.Card.GetMsIsdn

Change-Id: I99027a9a1a1e88bc62f03bb7d5b76eae968dcb73
Reviewed-on: http://gerrit.chromium.org/gerrit/2919
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
3 years agoFix cut-and-paste error in dbus configuration file.
Eric Shienbrood [Tue, 21 Jun 2011 00:27:34 +0000 (20:27 -0400)]
Fix cut-and-paste error in dbus configuration file.

In the section in which user chronos is given permission to send various
requests to ModemManager, the "allow" elements for SMS specify
org.chromium.ModemManager as the destination, instead of
org.freedesktop.ModemManager.

BUG=none
TEST=Before-and-after testing with dbus-send.

Change-Id: Iff71e4e02964ecaed0cb1ed8ea58830a2105daba
Reviewed-on: http://gerrit.chromium.org/gerrit/2913
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
3 years agoIncrease connect timeout for Icera modems.
Eric Shienbrood [Wed, 15 Jun 2011 18:45:46 +0000 (14:45 -0400)]
Increase connect timeout for Icera modems.

I've observed connect times of longer than 30 seconds for the
Samsung Y3300 modem. I'm still investigating why this happens
(it doesn't seem to occur on the Gobi 2000), but meanwhile, I'm
increasing the timeout to 60 seconds so that the APN cycling logic
in flimflam will work.

BUG=none
TEST=Using a special version of the serviceproviders.bfd file that
lists a couple of bogus APNs ahead of the valid one, try to connect.
Before this change, it was often timing out trying one of the APNs,
which would abort the APN cycling logic in flimflam. With the longer
timeout, it seems to work consistently.

Change-Id: I41951731d039e96ecc0fa94f6029c018e0aca8b7

3 years agomodemmanager: Lock down dbus access.
Elly Jones [Tue, 31 May 2011 21:50:32 +0000 (17:50 -0400)]
modemmanager: Lock down dbus access.

Change to a whitelist for dbus access, which reduces the attack surface we
expose over DBus.

BUG=chromium-os:15884
TEST=Adhoc
Run the affected commands.

Change-Id: I2f0f66b14187b0e560348cea36dd80b6da9ce04a
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1845

3 years agoRe-add Modem.Cdma.ActivateManualDebug.
Eric Shienbrood [Sat, 5 Feb 2011 20:40:01 +0000 (15:40 -0500)]
Re-add Modem.Cdma.ActivateManualDebug.

BUG=chromium-os:11714
TEST=Before-and-after test in which a dbus-send to invoke
ActivateManualDebug failed before the change, and succeeded
after the change.

Change-Id: I9e9a15a61ed8987ff3508c082872931df1062e1e

Review URL: http://codereview.chromium.org/6286130

3 years agoicera: report connected access technology when connected
Eric Shienbrood [Mon, 13 Jun 2011 15:30:11 +0000 (10:30 -0500)]
icera: report connected access technology when connected

The NWSTATE field reports both available access technology and the
actual access technology in-use when a PS connection is active, so
report the actual access tech when it's available.

3 years agocore: trivial whitespace cleanup
Dan Williams [Thu, 9 Jun 2011 21:53:05 +0000 (16:53 -0500)]
core: trivial whitespace cleanup

Tabs -> spaces

3 years agocore: handle udev 'change' events
Nathan Williams [Wed, 8 Jun 2011 19:52:08 +0000 (15:52 -0400)]
core: handle udev 'change' events

That's what the udev replay gives us these days (as of udev-152).

3 years agoicera: request specific network error codes on connect errors
Eric Shienbrood [Thu, 9 Jun 2011 21:44:10 +0000 (16:44 -0500)]
icera: request specific network error codes on connect errors

For connection failures, get additional error detail. Currently,
the only error codes that are mapped are the 3GPP TS 24.008 codes
for "Unknown or missing access point name" and "Requested service
option not subscribed" (which is sometimes returned for an invalid
APN).

(random fixes and cleanups by dcbw)

3 years agobuild: ensure Samsung plugin includes common Icera code
Eric Shienbrood [Thu, 9 Jun 2011 21:41:09 +0000 (16:41 -0500)]
build: ensure Samsung plugin includes common Icera code

Otherwise make can't find build-time dependencies.

3 years agoicera: add more access technology strings
Eric Shienbrood [Thu, 9 Jun 2011 21:40:11 +0000 (16:40 -0500)]
icera: add more access technology strings

3 years agosamsung: disable should use CFUN=4
Eric Shienbrood [Thu, 9 Jun 2011 21:37:20 +0000 (16:37 -0500)]
samsung: disable should use CFUN=4

CFUN=4 disables the radios but still allows useful operations
like getting PIN lock status.  So use that instead.

3 years agogsm: fix memory leak when grabbing a new port
Dan Williams [Thu, 9 Jun 2011 20:01:20 +0000 (15:01 -0500)]
gsm: fix memory leak when grabbing a new port

3 years agoussd: fix leaked callback info in error cases
Dan Williams [Thu, 9 Jun 2011 19:46:03 +0000 (14:46 -0500)]
ussd: fix leaked callback info in error cases

3 years agoplugins: propagate cached probing result to supports task
Aleksander Morgado [Thu, 2 Jun 2011 10:33:09 +0000 (12:33 +0200)]
plugins: propagate cached probing result to supports task

We need to ensure that the supports task always has the results of the probing,
no matter if the probing was just launched by the plugin grabbing the port, or
by a previous plugin. We do this during supports_port(), by propagating to the
supports task any possible previously cached probing results.

3 years agocinterion: set modem disabled if 3 consecutive AT commands get timed out
Aleksander Morgado [Thu, 12 May 2011 15:01:57 +0000 (17:01 +0200)]
cinterion: set modem disabled if 3 consecutive AT commands get timed out

3 years agocinterion: enable reprobing on ports without cached capabilities
Aleksander Morgado [Tue, 10 May 2011 09:42:04 +0000 (11:42 +0200)]
cinterion: enable reprobing on ports without cached capabilities

3 years agocinterion: always sort last the plugin
Aleksander Morgado [Thu, 5 May 2011 11:20:02 +0000 (13:20 +0200)]
cinterion: always sort last the plugin

This is because the cinterion plugin can handle RS232 modes, and checking
support for them needs to have the vendor ID probed with AT commands, so
probing is almost always issued in this plugin. By sorting last, we let
other plugins check support first.

3 years agocinterion: handle RS232 modems
Aleksander Morgado [Thu, 5 May 2011 08:41:07 +0000 (10:41 +0200)]
cinterion: handle RS232 modems

3 years agobase: disable the modem if up to N consecutive commands get timed out
Aleksander Morgado [Wed, 11 May 2011 14:40:45 +0000 (16:40 +0200)]
base: disable the modem if up to N consecutive commands get timed out

This feature is initially disabled for all modems, but plugins can enable it by
setting a value greater than 0 for the "max-timeouts" property when creating the
modem object.

3 years agomanager: protect ScanDevices() d-bus method with manager control policy rule
Aleksander Morgado [Tue, 10 May 2011 14:06:29 +0000 (16:06 +0200)]
manager: protect ScanDevices() d-bus method with manager control policy rule

3 years agopolicy: new policy for manager control actions
Aleksander Morgado [Tue, 10 May 2011 14:03:02 +0000 (16:03 +0200)]
policy: new policy for manager control actions

3 years agomanager: new ScanDevices() d-bus method to request a new device scan loop
Aleksander Morgado [Tue, 10 May 2011 07:48:59 +0000 (09:48 +0200)]
manager: new ScanDevices() d-bus method to request a new device scan loop

3 years agoplugin base: let plugins decide if they should be sorted last
Aleksander Morgado [Thu, 5 May 2011 11:19:32 +0000 (13:19 +0200)]
plugin base: let plugins decide if they should be sorted last

Note that even if a plugin says it wants to be sorted last, the generic plugin
will always be the last one. Also, there is no order guaranteed between two
plugins that request to be sorted last.

3 years agoplugin base: include vendor ID and product ID retrieval during AT port probing
Aleksander Morgado [Thu, 5 May 2011 08:32:48 +0000 (10:32 +0200)]
plugin base: include vendor ID and product ID retrieval during AT port probing

Port probing is extended to also query for Vendor ID and Product ID. This allows
plugins to check whether the reported IDs are expected, and thus we enable
plugins to handle modems connected via RS232 ports (where udev doesn't give any
vendor ID) or modems connected via a USB adapter (where udev gives the vendor ID
of the adapter).

Note that this effectively means that a plugin which expects these kind of modem
connections will end up always launching port probing as they won't only rely on
the vendor ID reported by udev.

3 years agocinterion: override CMER enabling command
Aleksander Morgado [Mon, 16 May 2011 14:12:12 +0000 (16:12 +0200)]
cinterion: override CMER enabling command

3 years agocinterion: override SMS indications setup commands
Aleksander Morgado [Mon, 16 May 2011 13:50:37 +0000 (15:50 +0200)]
cinterion: override SMS indications setup commands

3 years agocinterion: if modem removed don't process response
Aleksander Morgado [Wed, 11 May 2011 11:47:34 +0000 (13:47 +0200)]
cinterion: if modem removed don't process response

3 years agocinterion: set and get bands
Aleksander Morgado [Thu, 14 Apr 2011 17:49:30 +0000 (19:49 +0200)]
cinterion: set and get bands

3 years agocinterion: set and get allowed mode
Aleksander Morgado [Mon, 25 Apr 2011 11:58:26 +0000 (13:58 +0200)]
cinterion: set and get allowed mode

The 2G-preferred and 3G-preferred modes are not supported on dual
2G/3G cinterion modems.

3 years agocinterion: query supported networks to detect if 2G or 3G device
Aleksander Morgado [Mon, 25 Apr 2011 10:42:12 +0000 (12:42 +0200)]
cinterion: query supported networks to detect if 2G or 3G device

3 years agocinterion: query network technology capabilities
Aleksander Morgado [Thu, 14 Apr 2011 13:46:11 +0000 (15:46 +0200)]
cinterion: query network technology capabilities

We try to look for 'psinfo' indication in AT^SIND? output (available in 3G
devices from Cinterion), and if that is not available, we try to use the
AT^SMONG GPRS monitor (available in 2G devices from Cinterion).

3 years agocinterion: add initial dummy plugin
Aleksander Morgado [Wed, 13 Apr 2011 14:26:51 +0000 (16:26 +0200)]
cinterion: add initial dummy plugin

3 years agocharsets: new utf8_to_hex() method
Aleksander Morgado [Wed, 27 Apr 2011 15:13:43 +0000 (17:13 +0200)]
charsets: new utf8_to_hex() method

3 years agogsm: let plugins use their own command for CMER enabling
Aleksander Morgado [Mon, 16 May 2011 14:07:49 +0000 (16:07 +0200)]
gsm: let plugins use their own command for CMER enabling

3 years agogsm: let plugins use their own commands for SMS indications and storage configuration
Aleksander Morgado [Mon, 16 May 2011 13:22:23 +0000 (15:22 +0200)]
gsm: let plugins use their own commands for SMS indications and storage configuration

3 years agointrospection: indentation fixes
Aleksander Morgado [Tue, 10 May 2011 10:13:06 +0000 (12:13 +0200)]
introspection: indentation fixes

3 years agox22x: add support for the Alcatel X200
Dan Williams [Mon, 6 Jun 2011 01:57:15 +0000 (20:57 -0500)]
x22x: add support for the Alcatel X200

Same USB IDs as the X060s which is driven by Longcheer, but uses the
X22X command set so we have to do a little dance and make sure we
don't claim the X060s here.

3 years agolongcheer: ensure the Alcatel X200 is not claimed
Dan Williams [Mon, 6 Jun 2011 01:23:51 +0000 (20:23 -0500)]
longcheer: ensure the Alcatel X200 is not claimed

The X200 shares the same USB VID and PID as the X060s but the X200
does not use the same AT command set; it uses the X22X plugin
instead.  Since both modems also report the same +GMM and +GMI
responses, we have to fall back to using +GMR even though that's
a pretty sketchy way to tell them apart if the firmware ever changes.

3 years agocore: allow plugins to stop probing and not support a modem
Dan Williams [Mon, 6 Jun 2011 01:21:52 +0000 (20:21 -0500)]
core: allow plugins to stop probing and not support a modem

Previously plugins could only stop probing, *or* stop probing and
indicate support for a device.  For the Alcatel X200/X060s debacle
we need to stop probing and indicate that the plugin does not
support the device at all.

3 years agox22x: support access technology reporting
Dan Williams [Sun, 5 Jun 2011 23:29:00 +0000 (18:29 -0500)]
x22x: support access technology reporting

3 years agoplugins: use MMCallbackInfo instead of custom DisableInfo
Aleksander Morgado [Tue, 17 May 2011 07:35:23 +0000 (09:35 +0200)]
plugins: use MMCallbackInfo instead of custom DisableInfo

Implemented using a custom invoke method which doesn't call the callback, and
instead calls parent disable passing the callback as argument.

This fix ensures that if a modem gets removed, no invalid modem reference is
passed to the parent disable, as info->modem would be set to NULL and we can
detect it in the custom invoke method.

3 years agocore: ensure ERROR_REMOVED error is used in MMCallbackInfo when detecting modem removal
Aleksander Morgado [Mon, 16 May 2011 16:58:43 +0000 (18:58 +0200)]
core: ensure ERROR_REMOVED error is used in MMCallbackInfo when detecting modem removal

3 years agocore, plugins: if modem removed don't process response
Aleksander Morgado [Mon, 16 May 2011 10:16:04 +0000 (12:16 +0200)]
core, plugins: if modem removed don't process response

We try to avoid a memory leak when info->error is reset, as well as a second
re-schedule of the info.

3 years agogsm: free the string allocated by utils_hexstr2bin().
Nathan Williams [Fri, 20 May 2011 18:42:16 +0000 (14:42 -0400)]
gsm: free the string allocated by utils_hexstr2bin().

Change-Id: I1f7dabc8209d9757b573a59abb788a2346f72ad5

3 years agoSpec out and implement a command to get a GSM SIM SPN value.
Nathan Williams [Fri, 20 May 2011 21:31:34 +0000 (17:31 -0400)]
Spec out and implement a command to get a GSM SIM SPN value.

Using a SIM with a SPN, run the following command:
dbus-send --system --dest=org.freedesktop.ModemManager --print-reply /org/freedesktop/ModemManager/Modems/0 org.freedesktop.ModemManager.Modem.Gsm.Card.GetSpn

Change-Id: I8f36c8432f40fa4e3cb3f8c6ceef16b2bdadf2a1
Reviewed-on: http://gerrit.chromium.org/gerrit/1464
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
3 years agosms_decode_address(): Add a leading "+" on international numbers.
Nathan Williams [Tue, 31 May 2011 17:50:17 +0000 (13:50 -0400)]
sms_decode_address(): Add a leading "+" on international numbers.

BUG=chromium-os-partner:4278
TEST=Send SMS from phone (to get +... format) and from AIM-SMS gateway
(to get raw-digit format).

Change-Id: I36eb9f1432a432435578180dfdb315b0e7ee5744

3 years agoserial-parser: allow 0 or more whitespaces before error code in regular expresions
Aleksander Morgado [Thu, 2 Jun 2011 14:43:02 +0000 (16:43 +0200)]
serial-parser: allow 0 or more whitespaces before error code in regular expresions

3 years agosms: use correct start and length for alphanumeric data
Nathan Williams [Wed, 25 May 2011 21:08:15 +0000 (17:08 -0400)]
sms: use correct start and length for alphanumeric data

sms_parse_pdu(): Protocol ID doesn't actually affect decoding, so
don't fret about its value.

ChromeOS:
Change-Id: Ia4cb20c415aed1026bb7b8dd4daa8ae53dd749e8

3 years agosimtech: tag ports on Prolink PH-300
Dan Williams [Fri, 27 May 2011 14:57:47 +0000 (09:57 -0500)]
simtech: tag ports on Prolink PH-300

3 years agogsm: correctly set registration status when disabling
Nathan Williams [Thu, 19 May 2011 00:37:49 +0000 (20:37 -0400)]
gsm: correctly set registration status when disabling

Chromium:
Change-Id: I0629706985f273832ac3662acb260388d0e6ed83

3 years agosamsung: split initialization sequence to ensure echo is off
Nathan Williams [Thu, 12 May 2011 19:23:33 +0000 (15:23 -0400)]
samsung: split initialization sequence to ensure echo is off

Split the Samsung initialization sequence from "ATZ E0 V1" to "ATZ"
and "ATE0 V1" - the modem is allowed to ignore the rest of the line
after Z, so echoing was not being turned off, leading to getting
"AT+CIMI\n\n" as part of the IMSI when it is retrieved at startup.

Chromium:
Change-Id: Icfd767174e779e472f8cde419acb163128e4715d

3 years agoussd: formatting and spacing cleanups
Dan Williams [Thu, 19 May 2011 15:44:03 +0000 (10:44 -0500)]
ussd: formatting and spacing cleanups

3 years agoapi: proposed new interface for MM 0.6 and later
Dan Williams [Thu, 19 May 2011 02:59:42 +0000 (21:59 -0500)]
api: proposed new interface for MM 0.6 and later

Main changes are cleaning up the API and allowing for multi-mode
devices that support two or more of CDMA/EVDO, GSM/UMTS, and LTE
at the same time.  This provides a starting discussion point for
the new MM 0.6 API.

3 years agoqcdm: add some more CDMA band classes
Dan Williams [Mon, 16 May 2011 23:44:11 +0000 (18:44 -0500)]
qcdm: add some more CDMA band classes

3 years agosms: suppress duplicate SMS received notifications
Nathan Williams [Thu, 12 May 2011 02:44:16 +0000 (21:44 -0500)]
sms: suppress duplicate SMS received notifications

If the modem sends the same notification on more than one port,
make sure we don't send a signal out to clients more than once.