chromiumos/platform/cromo.git
13 months agoAllow chronos to invoke org.freedesktop.ModemManager.SetLogging 11/62711/2 factory-4455.B factory-pit-4471.B firmware-pit-4482.B master release-R30-4537.B stabilize-4443.B stabilize-4512.B
Ben Chan [Fri, 19 Jul 2013 21:56:26 +0000 (14:56 -0700)]
Allow chronos to invoke org.freedesktop.ModemManager.SetLogging

This CL changes the cromo DBus policy to allow the 'chronos' user to
invoke org.freedesktop.ModemManager.SetLogging, which is needed to allow
`modem set-logging` to work under crosh.

BUG=chrome-os-partner:19568
TEST=Run `modem set-logging debug` in crosh when cromo is running.

Change-Id: I384466575b1b10118ffe996b5aabfc05764d58f3
Reviewed-on: https://gerrit.chromium.org/gerrit/62711
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
13 months agocromo: fix small test issues found by asan. 45/62245/3
Yunlian Jiang [Tue, 16 Jul 2013 22:57:53 +0000 (15:57 -0700)]
cromo: fix small test issues found by asan.

This patch fixes the
global variable 'kExpected8bitData (sms_message_unittest.cc)'
overflow issue.

BUG=None
TEST=FEATURES="test" emerge-lumpy cromo passes.

Change-Id: Ia47bbf89f8b880ebaba2dd733a40c4c82292920c
Reviewed-on: https://gerrit.chromium.org/gerrit/62245
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
13 months agoAdd an array boundary check in utilities::Gsm7ToUtf8String. 87/61987/2
Ben Chan [Mon, 15 Jul 2013 22:02:33 +0000 (15:02 -0700)]
Add an array boundary check in utilities::Gsm7ToUtf8String.

BUG=chromium:259430
TEST=Build and run unit tests.

Change-Id: I51c4fb9eea3ba6c33c8eda5c893e45dfe2fc91e2
Reviewed-on: https://gerrit.chromium.org/gerrit/61987
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
13 months agocromo: Use vector instead of new[]. 74/61574/4 factory-pit-4390.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-wolf-4389.24.B
Yunlian Jiang [Thu, 11 Jul 2013 18:24:53 +0000 (11:24 -0700)]
cromo: Use vector instead of new[].

This patch uses vector instead of new[] to get rid of delete.

BUG=None
TEST=FEATURES=test emerge-lumpy cromo passes.

Change-Id: I1a577671e473b7716e0bae4e7c6a78fad4f12c67
Reviewed-on: https://gerrit.chromium.org/gerrit/61574
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
14 months agoRemove unnecessary call to the deprecated g_thread_init(). 79/59679/2
Ben Chan [Sat, 22 Jun 2013 12:58:03 +0000 (05:58 -0700)]
Remove unnecessary call to the deprecated g_thread_init().

g_thread_init() has been deprecated since glib 2.32. This CL removes the
unnecessary call to g_thread_init(), so that we can later migrate to
glib 2.34.

BUG=chromium:253025
TEST=Tested the following:
1. Build and run unit tests.
2. Run network_3GSmoke test on lumpy with a gobi3k modem.

Change-Id: I679c332b53896a55aef241fe9e606582d608ac6b
Reviewed-on: https://gerrit.chromium.org/gerrit/59679
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

18 months agoUpdate cromo to build against libchrome-180609 37/43337/2 factory-4128.B factory-4290.B factory-pit-4280.B factory-spring-3842.B factory-spring-4131.B factory-spring-4262.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B release-R27-3912.B release-R28-4100.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-spring-4100.53.B toolchainA toolchainB
Chris Masone [Thu, 14 Feb 2013 22:53:58 +0000 (14:53 -0800)]
Update cromo to build against libchrome-180609

Literally just a version number change in the makefile.

CQ-DEPEND=I75c72180fcbee6c5f99c2e77f9dde35e7ebce8dc

BUG=chromium-os:38934
TEST=FEATURES=test emerge-x86-mario
STATUS=Fixed

Change-Id: Iddebb37eabb0ed9673a4be1a5c0c8679c1893a75
Reviewed-on: https://gerrit.chromium.org/gerrit/43337
Commit-Queue: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
19 months agoRemove suspend delay code. 26/41026/2 release-R26-3701.B stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-bluetooth-smart toolchain-3701.42.B
Daniel Erat [Fri, 14 Dec 2012 18:49:39 +0000 (10:49 -0800)]
Remove suspend delay code.

Deletes deactivated-and-since-moved-to-shill code to
register a suspend delay with the power manager.

BUG=chromium-os:30587,chromium-os:36980
TEST=manual: modem still works after suspending and resuming
CQ-DEPEND=I65e01df5b9e2b9234098e98315e5eb6f583d0169

Change-Id: I2b9edfd46124dcd5386f96dd67cea43478ee2a1b
Reviewed-on: https://gerrit.chromium.org/gerrit/41026
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>

21 months agocromo: Modem reset fails when run as chronos. 48/37848/2 factory-3536.B release-R25-3428.B stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize2 toolchain-3428.65.B
Arman Uguray [Mon, 12 Nov 2012 22:23:36 +0000 (14:23 -0800)]
cromo: Modem reset fails when run as chronos.

Due to a missing policy description in org.chromium.ModemManager.conf,
calling modem reset (on a device equipped with a gobi modem) either via crosh
or through the shell as chronos returned an
org.freedesktop.DBus.Error.AccessDenied error. This patch adds the SoftReset
method on interface org.chromium.ModemManager.Modem.Gobi to the conf file.

BUG=chromium-os:36272
TEST=Was able to successfully run modem reset as chronos with this patch
applied.

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

21 months agoupdate OWNERS
Mike Frysinger [Wed, 31 Oct 2012 21:14:50 +0000 (17:14 -0400)]
update OWNERS

None of these people work on CrOS anymore :/

BUG=None
TEST=None

Change-Id: I602d95e6e31689df3f73425b08959a073ab28990
Reviewed-on: https://gerrit.chromium.org/gerrit/37055
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
22 months agoSkip suspend delay registration.
Ben Chan [Thu, 4 Oct 2012 07:44:18 +0000 (00:44 -0700)]
Skip suspend delay registration.

BUG=chromium-os:30587
TEST=Verify that cromo no longer registers suspend delay or disconnects
the cellular on suspend, which is instead handled by shill.

Change-Id: I6649796fb1cf037291fbad3ed4f1fda383edb506
Reviewed-on: https://gerrit.chromium.org/gerrit/34611
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoFix gcc 4.7 build problem for cromo unittest. factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B firmware-stout-2817.B stabilize stabilize-link
Han Shen [Mon, 27 Aug 2012 23:17:27 +0000 (16:17 -0700)]
Fix gcc 4.7 build problem for cromo unittest.

Disabled unused variable warnings for unittest, because gTest
framework defines "testinfo" varibale for every test case, which is
not usually read.

TEST=unittest passed.
BUG=None

Change-Id: If6bd3fb7b2dc7fdfc5f0164312e89af9f403e825
Reviewed-on: https://gerrit.chromium.org/gerrit/31520
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Han Shen <shenhan@chromium.org>
Commit-Ready: Han Shen <shenhan@chromium.org>

2 years agoMonitor power state change events from power manager.
Ben Chan [Thu, 23 Aug 2012 18:49:56 +0000 (11:49 -0700)]
Monitor power state change events from power manager.

This CL modifies cromo to monitor PowerStateChanged DBus signals emitted
by power manager and translate the signals into OnSuspended and
OnResumed events that trigger registered callbacks in modem plugins.

BUG=chromium-os:33839
TEST=Observe cromo log messages upon power state change events.

Change-Id: Ia73a02bce4d8bb690cc7d8835ea5d6d7fff127dc
Reviewed-on: https://gerrit.chromium.org/gerrit/31384
Reviewed-by: Thieu Le <thieule@chromium.org>
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoAdded possibility for debugd user to call ModemManager.SetLogging firmware-butterfly-2788.B
Yuri Gorshenin [Tue, 19 Jun 2012 11:50:38 +0000 (15:50 +0400)]
Added possibility for debugd user to call ModemManager.SetLogging
method. This method is called by DebugDaemon.SetDebugMode.

BUG=chromium-os:31368
TEST=manual tests on Alex device

Change-Id: I255809760e614ed7ab351073cd345af36c264099
Reviewed-on: https://gerrit.chromium.org/gerrit/25617
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: Yuri Gorshenin <ygorshenin@chromium.org>
Tested-by: Yuri Gorshenin <ygorshenin@chromium.org>
Commit-Ready: Yuri Gorshenin <ygorshenin@chromium.org>

2 years agoFix gcc 4.7 build for cromo. factory-2475.B factory-2569.B factory-2717.B factory-2723.14.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B
Han Shen [Wed, 20 Jun 2012 16:49:02 +0000 (09:49 -0700)]
Fix gcc 4.7 build for cromo.

Added explicit <unistd.h> inclusion.

TEST=manually, built using gcc 4.7
BUG=None

Change-Id: Icf5b12f02656765e810c9c9551b1cdb9bcce246f
Reviewed-on: https://gerrit.chromium.org/gerrit/25766
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Han Shen <shenhan@chromium.org>
Commit-Ready: Han Shen <shenhan@chromium.org>

2 years agoReplace glog/logging with base/logging factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B firmware-link-2348.B release-R20-2268.B release-R21-2465.B
Sameer Nanda [Wed, 18 Apr 2012 18:01:05 +0000 (11:01 -0700)]
Replace glog/logging with base/logging

glog/logging causes data to be written out to the backing store every
time a log message is sent to it.  This causes increased power draw
since as the disk wakes up more frequently than it otherwise would if
the data were to be written out lazily.

Replacing glog/logging with base/logging since the latter doesn't have
this issue.

BUG=chromium-os:29643
TEST=cros_run_unit_tests --board lumpy -p cromo
TEST="start cromo" on DUT and make sure it comes up fine and cromo's log
messages show up in /var/log/messages
TEST="cromo --plugins=gobi" on DUT and then look for "Loaded plugin" message
in /var/log/messages.  This message should show up only once and
indicate that the gobi plugin got loaded.

Change-Id: Ibbb244b0f4186a0288717c4c0db38c47221226b9
Reviewed-on: https://gerrit.chromium.org/gerrit/20472
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Sameer Nanda <snanda@chromium.org>
Tested-by: Sameer Nanda <snanda@chromium.org>
2 years agoPlaceholder change for readability review. release-R19-2046.B
Nathan Williams [Mon, 9 Jan 2012 21:18:35 +0000 (16:18 -0500)]
Placeholder change for readability review.

In addition to minor style issues, some calling conventions have been
changed to avoid returning vectors by value, and
SmsMessageFragment::CreateFragment() was entirely rewritten.

cromo.ver is updated to export the new namespace rather than
individual SMS-related methods.

BUG=None
TEST=unit tests
Change-Id: Ide2b9a21cb82d5dfc56ff5267a2eb6aba1744b04
Reviewed-on: https://gerrit.chromium.org/gerrit/13881
Reviewed-by: omoikane <omoikane@google.com>
Tested-by: omoikane <omoikane@google.com>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Nathan J. Williams <njw@chromium.org>

2 years agoclean up makefile and convert to SLOT-ed libbase factory-1987.B
Mike Frysinger [Fri, 9 Mar 2012 19:08:27 +0000 (14:08 -0500)]
clean up makefile and convert to SLOT-ed libbase

This includes a couple of fixes:
 - fixup CPPFLAGS handling
 - execute pkg-config twice total, and not once per compile
 - build against SLOT-ed libbase

BUG=chromium-os:16623
TEST=`emerge-x86-alex cromo` still works
TEST=`cros_run_unit_tests --board x86-alex -p cromo` passes

Change-Id: Ifa56a189d2798547630bf8eccc09ea02d3501431
Reviewed-on: https://gerrit.chromium.org/gerrit/17711
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years agoSupport non-intl SMSC addresses (as generated by default by the 8960).
Nathan Williams [Fri, 10 Feb 2012 16:42:22 +0000 (11:42 -0500)]
Support non-intl SMSC addresses (as generated by default by the 8960).

Decode SMSC addresses like other addresses and factor out the common
code. Remove the test for a particular SMSC type.

While here, fix a logging bug - uint8_t constants are emitted onto
streams as characters, not as integers (The bug was observed in the
similarly-structured logging for "Invalid SMSC address format" that
this CL removes).

Add a SmsMessage unit test for this SMSC format handling.

BUG=chromium-os:25589
TEST=NonIntlSMSC test in unit test, cellular_SmsReception autotest

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

2 years ago[cromo] fix SmsMessageFragment::CreateFragment export on 64bit systems
Mike Frysinger [Tue, 7 Feb 2012 22:37:37 +0000 (17:37 -0500)]
[cromo] fix SmsMessageFragment::CreateFragment export on 64bit systems

When I built up the list of symbols to export, I looked at `readelf -s`
passed through `c++filt` which doesn't tell the whole story.  In this
case, the signature for a function with a size_t was written as unsigned
int but 64bit has unsigned long, so it didn't get exported.

Ideally we'd use size_t in the linker script, but the linker doesn't
understand that type.  Not sure if bug or by design, but not that big
of a deal for our needs.

BUG=None
TEST=`emerge-amd64-generic cromo && readelf -s` shows exported symbol
TEST=`emerge-x86-generic cromo && readelf -s` shows exported symbol

Change-Id: I8ea07db7b6103dc756a790db152fe73eacceb2c0
Reviewed-on: https://gerrit.chromium.org/gerrit/15437
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years ago[cromo] use simpler version script
Mike Frysinger [Wed, 11 Jan 2012 22:04:27 +0000 (17:04 -0500)]
[cromo] use simpler version script

The GNU linker supports specifying symbols via their C++ names, so use
that syntax rather than the mangled C++ names and dynamically extracting
them from the object files.

BUG=chromium-os:24992
TEST=build cromo and compared exported symbol list via `readelf -s`

Change-Id: I7ae42cfb0a10e7fda74aca02d05c9c8c2daf4ccf
Reviewed-on: https://gerrit.chromium.org/gerrit/15331
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>

2 years ago[cromo] use libchromeos.pc release-R18-1660.B
Elly Jones [Wed, 11 Jan 2012 20:57:58 +0000 (15:57 -0500)]
[cromo] use libchromeos.pc

BUG=chromium-os:24959
TEST=build

Change-Id: If23a15a8a584fe73a61997deac5eb4cf5b64d82e
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13999
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/14510
Reviewed-by: Kees Cook <keescook@chromium.org>
2 years ago[cromo] use $(NM), not nm
Elly Jones [Thu, 19 Jan 2012 19:41:01 +0000 (14:41 -0500)]
[cromo] use $(NM), not nm

Technically, the ELF symbol table is architecture agnostic, so the host nm
should be fine, but to be consistent with the way we use the rest of the
cross-compilation binutils we should use $(NM) instead of nm.

BUG=None
TEST=build

Change-Id: I9ad63f1d10a65ac6606306f121d27ef7383f4594
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/14493
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2 years agoignore more generated files
Mike Frysinger [Tue, 17 Jan 2012 23:58:37 +0000 (18:58 -0500)]
ignore more generated files

BUG=None
TEST=`git status` no longer shows cromo or generated headers

Change-Id: I46de4a4afdc32c478642069a09a8b7cc63e76bf0
Reviewed-on: https://gerrit.chromium.org/gerrit/14339
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years agoRevert "[cromo] use libchromeos.pc"
Scott James Remnant [Fri, 13 Jan 2012 01:59:00 +0000 (17:59 -0800)]
Revert "[cromo] use libchromeos.pc"

This reverts commit 7f1ea71753539212053f9183aa3a8fc4effb0094

Change-Id: Ibc1e627e4bfbcb83a1c880a504c4da600ad9ac7b
Reviewed-on: https://gerrit.chromium.org/gerrit/14121
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
2 years ago[cromo] use libchromeos.pc
Elly Jones [Wed, 11 Jan 2012 20:57:58 +0000 (15:57 -0500)]
[cromo] use libchromeos.pc

BUG=chromium-os:24959
TEST=build

Change-Id: I000bec210a54902adafbd75877d6445c9b15ac8b
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13999
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2 years ago[cromo] use a local DBus.Properties, not the system one.
Elly Jones [Wed, 11 Jan 2012 16:21:05 +0000 (11:21 -0500)]
[cromo] use a local DBus.Properties, not the system one.

The system one is about to become the canonical org.freedesktop.DBus.Properties
interface. The ModemManager API depends on a fake version of that interface
which predates the standardization of the canonical one, so drop XML for the
fake one into the cromo source tree and use that instead of the system one.

BUILD=chromium-os:23839
TEST=build
emerge-$board cromo gobi-cromo-plugin

Change-Id: Iefeb401ecb95fcc277cbf785084176ab3a91121e
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13982
Reviewed-by: Nathan J. Williams <njw@chromium.org>
2 years ago[cromo] Allow debugd to use info methods.
Elly Jones [Thu, 5 Jan 2012 23:08:52 +0000 (18:08 -0500)]
[cromo] Allow debugd to use info methods.

BUG=chromium-os:23839
TEST=None yet

Change-Id: Iaf45f861418ff2f3f7a3d506c7c721b7af3c5019
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13751
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
2 years agocromo: firmware: Pull in interface factory-1412.B firmware-kiev-2.112.B firmware-uboot_v2-1299.B release-R17-1412.B
ttuttle [Wed, 5 Oct 2011 15:31:53 +0000 (11:31 -0400)]
cromo: firmware: Pull in interface

BUG=chromium-os:18056
TEST=Adhoc; still builds (can't really test without implementing for a modem)

Change-Id: If6e18aeaf7902f9515227345c28855217f88c27f
Reviewed-on: https://gerrit.chromium.org/gerrit/11412
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agocromo: add OWNERS.
Elly Jones [Mon, 7 Nov 2011 21:15:47 +0000 (16:15 -0500)]
cromo: add OWNERS.

Using emails instead of usernames in chromium style.

TEST=None
BUG=chromium-os:22007

Change-Id: I2509c9b0e6f3ad29934da073071f7bbb2507482b
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/11277
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: David Rochberg <rochberg@chromium.org>
2 years agomove libdir into a variable factory-1284.B
Mike Frysinger [Tue, 1 Nov 2011 21:42:49 +0000 (17:42 -0400)]
move libdir into a variable

Some ABI's want to use diff paths than /usr/lib, so move this hardcoded
path into a variable so the build system can override it as need be.

BUG=chromium-os:22378
TEST=`emerge-amd64-generic cromo` now installs into /usr/lib64
TEST=`emerge-x86-generic cromo` still installs into /usr/lib

Change-Id: I38a05c12fa8015cdb14403d1e293a5cbdcd557fc
Reviewed-on: https://gerrit.chromium.org/gerrit/10998
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years agoSupport for multipart messages. factory-1235.B
Nathan Williams [Mon, 17 Oct 2011 15:28:48 +0000 (11:28 -0400)]
Support for multipart messages.

Parse multipart headers from PDUs and store the information in
SmsMessageFragments; repurpose SmsMessage class to aggregates texts of
one or more messages together.

Create a SmsCache class that implements the multipart message logic
that modem plugins can call into if they provide some primitives.

Update message unit tests.

BUG=chromium-os:19162
TEST=Install matching Gobi plugin; Send long SMS messages from phone.

Change-Id: Ia44ab84b65575421d999b15e19f93465d454347d
Reviewed-on: https://gerrit.chromium.org/gerrit/10185
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Commit-Ready: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
2 years agoFix the bit-twiddling involved in decoding gsm7 text after a user data header.
Nathan Williams [Fri, 14 Oct 2011 18:28:24 +0000 (14:28 -0400)]
Fix the bit-twiddling involved in decoding gsm7 text after a user data header.

Fix the unit test that checks this and add another one based on data
seen in the wild.

TEST=./cros_run_unit_tests -p "cromo"
BUG=chromium-os:21686

Change-Id: Id50a6d6c491e2ab7c6dfe23324ecdd48aa4b40f4
Reviewed-on: http://gerrit.chromium.org/gerrit/10109
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
2 years agoAdd a target to build the tests specifically, for automated unit-test
Nathan Williams [Thu, 13 Oct 2011 23:10:13 +0000 (19:10 -0400)]
Add a target to build the tests specifically, for automated unit-test
execution.

TEST=./cros_run_unit_tests -p "cromo"
BUG=chromium-os:21684

Change-Id: I2c76c50c0d6dbfe50493f698de3c18ac1de8fed7
Reviewed-on: http://gerrit.chromium.org/gerrit/10056
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 agoMake 64-bit safe.
Matthew Dempsky [Mon, 3 Oct 2011 21:25:58 +0000 (14:25 -0700)]
Make 64-bit safe.

BUG=chromium-os:20672
TEST=compile for amd64-generic

Change-Id: Icdb6fc390f5a9de583781130a2b472966cbdf483
Reviewed-on: http://gerrit.chromium.org/gerrit/8664
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2 years agocromo: Add sandboxing skeleton.
Elly Jones [Mon, 3 Oct 2011 19:32:28 +0000 (15:32 -0400)]
cromo: Add sandboxing skeleton.

Right now, the sandbox only drops root uid/gid if it finds that it has them at
program startup. This will avoid producing builds where cromo starts as root
once <http://gerrit.chromium.org/gerrit/8650> lands.

BUG=chromium-os:21165
TESTED_ON=kaen
TEST=Adhoc
Built an image, booted, plugged a Gobi in. Saw that cromo was running as cromo.

Change-Id: Ifecb249173b8ed2ea8801482983fa37d35985919
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/8652
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
3 years agoAdd an implementation for SetLogging 0.14.811.B 0.15.877.B 780.B factory-1020.B factory-980.B firmware-881-u-boot-v1 firmware-u-boot-v1 release-1011.B test-982.B
Jason Glasgow [Mon, 11 Jul 2011 20:16:28 +0000 (16:16 -0400)]
Add an implementation for SetLogging

Add an implementation for SetLogging so that users can control the
amount of information logged in syslog at runtime.

BUG=none
TEST=dbus-send --print-reply --system --dest=org.chromium.ModemManager /org/chromium/ModemManager org.freedesktop.ModemManager.SetLogging string:debug

Change-Id: Icd6dec0ce8d54a9e2d4ff270f75c70079d1c398d
Reviewed-on: http://gerrit.chromium.org/gerrit/3889
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Jason Glasgow <jglasgow@chromium.org>
3 years agoFix several problems with parsing of SMS PDUs.
Eric Shienbrood [Wed, 6 Jul 2011 19:07:03 +0000 (15:07 -0400)]
Fix several problems with parsing of SMS PDUs.

Problems fixed:
- Handle PDUs that have user data headers. We currently ignore
  the contents of any user data header, but we have to take into
  account its presence in calculating where in the PDU the actual
  message body starts.
- Since having a user data header introduces the possibility that
  a GSM-7-encoded message body may not begin on an octet boundary,
  it was necessary to add support for converting non-octet-aligned
  GSM-7 strings.
- Prepend SMSC address with a '+' to be consistent with ModemManager.
- Fix an incorrect constant for a reserved data coding scheme value.
- When parsing the timestamp, treat the timezone offset as two BCD
  digits (after masking out bit 3) instead of as an integer.

BUG=none
TEST=Run the unit tests, including some newly added ones.

Change-Id: I8c2aac23df281cadd4c8a42691dd3d0af473cf15
Reviewed-on: http://gerrit.chromium.org/gerrit/3685
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
3 years agoRecognize coding group "F" in data coding scheme, and accept 8-bit data.
Eric Shienbrood [Mon, 27 Jun 2011 19:55:34 +0000 (15:55 -0400)]
Recognize coding group "F" in data coding scheme, and accept 8-bit data.

See GSM specs 03.38 and 03.40 Eight bit data is copied as-is to
the message body. We also now assume the default alphabet (GSM-7)
for all reserved coding values, as per the spec.

The referenced bug was seen using ModemManager, but existed in cromo as
well.

BUG=chrome-os-partner:4654
TEST=Added unit tests and ran them successfully.

Change-Id: I6514a415f2e0fed3e43d0b0fb85d37d7c2e1f730
Reviewed-on: http://gerrit.chromium.org/gerrit/3257
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
3 years agoAdd a stub SetLogging() method to satisfy the ModemManager interface.
Nathan Williams [Fri, 24 Jun 2011 23:05:05 +0000 (19:05 -0400)]
Add a stub SetLogging() method to satisfy the ModemManager interface.

BUG=chromium-os:15198
TEST=Patch in gerrit.chromium.org/3134 to get the ModemManager change, compile.

Change-Id: I28dfd8e731babcb2b62b085ed6b9817eb86b6a06
Reviewed-on: http://gerrit.chromium.org/gerrit/3202
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
3 years agocromo: add empty impl of ModemManager ScanDevice method to fix build
Vince Laviano [Thu, 16 Jun 2011 02:48:16 +0000 (19:48 -0700)]
cromo: add empty impl of ModemManager ScanDevice method to fix build

BUG=chromium-os:16625
TEST=emerge cromo

Change-Id: Ia7f7c81613ad50ac047b16b21e4e76a48668b4a1
Reviewed-on: http://gerrit.chromium.org/gerrit/2752
Tested-by: Vince Laviano <vlaviano@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
3 years agoCorrect dbus interface for SetCarrier.
ttuttle [Tue, 7 Jun 2011 20:32:01 +0000 (16:32 -0400)]
Correct dbus interface for SetCarrier.

BUG=None
TEST=Adhoc (modem_set_carrier now works as chronos)

Change-Id: I205e1c53e788e233dd37e77d88d816168ce748d1
Reviewed-on: http://gerrit.chromium.org/gerrit/2238
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
3 years agocromo: Fix compiler warning with gcc-4.6 by printing error message
Jason Glasgow [Thu, 2 Jun 2011 21:52:29 +0000 (17:52 -0400)]
cromo: Fix compiler warning with gcc-4.6 by printing error message

BUG=chromium-os:16052
TEST=none

Change-Id: Id452eaf65602e11acb151a15a7badcd2d5e56640
Reviewed-on: http://gerrit.chromium.org/gerrit/1992
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
3 years agoFix 0xf case in NibbleToChar.
ttuttle [Wed, 1 Jun 2011 18:28:30 +0000 (14:28 -0400)]
Fix 0xf case in NibbleToChar.

BUG=None
TEST=sms_message_unittest still works

Change-Id: If189f4a5a18f4eb52ac69fb1be9bfe6ef822f40e
Reviewed-on: http://gerrit.chromium.org/gerrit/1894
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
3 years agoRelax some checks in SmsMessage::CreateMessage.
ttuttle [Tue, 31 May 2011 18:29:21 +0000 (14:29 -0400)]
Relax some checks in SmsMessage::CreateMessage.

In particular:
1. Ignore PID.
2. Ignore TP-MMS bit.
3. Accept any number format for sender; assume BCD unless it's alphanumeric.

Also, properly prepend + to international sender addresses.

Add unit test cases for all of these cases.

BUG=chromium-os:15782
TEST=sms_message_unittest (pdu3*)
Change-Id: I55d6d83e2fc53cf71fef92ac9cf664c2bf8f55ca
Reviewed-on: http://gerrit.chromium.org/gerrit/1833
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
3 years agocromo: lock down dbus access
Elly Jones [Tue, 31 May 2011 21:47:54 +0000 (17:47 -0400)]
cromo: lock down dbus access

This will drastically reduce the exposed attack surface.

BUG=chromium-os:15884
TEST=Adhoc
Run the commands listed in the comments.

Change-Id: I4a99e859ecf5c3cf4b106e30773a32086ad4e23b
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1843
Reviewed-by: Jim Hebert <jimhebert@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
3 years ago[cromo] Roll forward to new libchrome 0.13.558.B 0.13.587.B
Chris Masone [Thu, 12 May 2011 20:38:44 +0000 (13:38 -0700)]
[cromo] Roll forward to new libchrome

BUG=chromium-os:14304
TEST=build, unit tests

Change-Id: I6e65a28596930c411d194f03b098a5f1a374b74a
Reviewed-on: http://gerrit.chromium.org/gerrit/813
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
3 years agoBump to pick up ABI-breaking dbus-c++ changes. 0.13.509.B
Elly Jones [Wed, 27 Apr 2011 21:55:00 +0000 (17:55 -0400)]
Bump to pick up ABI-breaking dbus-c++ changes.

Change-Id: I80bb7196d235a0a37f5ea985320416304f7e6028

BUG=None
TEST=None

Signed-off-by: Elly Jones <ellyjones@google.com>
Review URL: http://codereview.chromium.org/6880255

3 years agoHandle UCS-2 data coding scheme for SMS messsages. 0.12.362.B 0.12.369.B 0.12.392.B 0.12.433.B 0.12.433.B109 0.12.433.B62 0.13.434.B
Eric Shienbrood [Thu, 31 Mar 2011 21:45:26 +0000 (17:45 -0400)]
Handle UCS-2 data coding scheme for SMS messsages.

Also, handle alpha format for SMS sender "number". Turns out carriers
sometimes use this instead of E.164 when they originate a message.

BUG=chromium-os:13617
TEST=Unit tests using data taken from actual messages sent from
a Russian carrier to a Russian handset.

Change-Id: I78db5fff784f0d1dc0381e60768c177b58b6d800

R=njw@chromium.org

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

3 years agoAdded an SmsMessage class, and code for parsing a PDU to an SMS message.
Eric Shienbrood [Thu, 10 Mar 2011 21:14:24 +0000 (16:14 -0500)]
Added an SmsMessage class, and code for parsing a PDU to an SMS message.

This includes conversion of text encoded in the GSM-7 alphabet
into a UTF-8 string.

BUG=chromium-os:11302
TEST=Wrote unit tests for GSM-7 to UTF-8 conversion and for construction
of SMS message from PDU. Also did live testing with a version of the
gobi plugin that supports the ModemManager.Modem.Gsm.SMS.Get method,
by sending actual SMS messages over the air to the modem and retrieving
them using dbus-send to invoke the Get method.

Change-Id: I26bb8bc764a9e7f4a81200740532e4874812f455

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

3 years agocromo: Add ExtractUint32 function 0.11.257.B
Jason Glasgow [Tue, 1 Mar 2011 19:12:34 +0000 (14:12 -0500)]
cromo: Add ExtractUint32 function

BUG=chromium-os:11879
TEST=use 'modem status' to monitor activation state while activating.
Notice that cromo now reports state 1 --
MM_ACTIVATION_STATE_ACTIVATING

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

Change-Id: I2ab0da772638d0a7277c829ed01cd34e01d3fe9e

3 years agoAdd Modem base class.
Elly Jones [Tue, 1 Feb 2011 20:21:23 +0000 (15:21 -0500)]
Add Modem base class.

Carrier plugins need a way to ask the modem for arbitrary information about
itself, which means we need some kind of handles on all the DBus interfaces;
passing each interface separately is for chumps.

BUG=chromium-os:10952
TEST=Adhoc
built, installed, 3G activation.

Change-Id: Icb8b4652e95f5d2179149e909723202132539056

Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Eric Shienbrood <ers@chromium.org>
Review URL: http://codereview.chromium.org/6260039

3 years agocromo: Use standard DBus XML files from the modemmanager distribution.
Elly Jones [Wed, 26 Jan 2011 18:23:48 +0000 (13:23 -0500)]
cromo: Use standard DBus XML files from the modemmanager distribution.

BUG=chromium-os:11209
TEST=Adhoc
It builds!

Change-Id: I412d447814a5b676d5e5c7da616b92454b407e9b
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/6254017

3 years agoAdded "Generic UMTS" carrier entry.
Eric Shienbrood [Fri, 14 Jan 2011 02:27:46 +0000 (21:27 -0500)]
Added "Generic UMTS" carrier entry.

BUG=chromium-os:4667
TEST=Ran 'mm-set-carrier "Generic UMTS" and saw that everything
worked.

Change-Id: I6439669dd7e19e056bbb2a9b14025f51f7668e25

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

3 years agocromo: Add more stuff to libcromo.a for plugin unit-tests.
Elly Jones [Wed, 1 Dec 2010 20:47:43 +0000 (15:47 -0500)]
cromo: Add more stuff to libcromo.a for plugin unit-tests.

BUG=chromium-os:9118
TEST=None
Build changes only; nm /build/$board/usr/lib/libcromo.a

Change-Id: I37443ea15912966dbce14e7ea5958c487708747d
X-Where: locus chromeos-dogfood unit-tests
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: David Rochberg <rochberg@chromium.org>
Review URL: http://codereview.chromium.org/5338009

3 years agocromo: catch dbus-c++ exceptions in RegisterSuspendDelayCallback.
Elly Jones [Fri, 12 Nov 2010 20:42:58 +0000 (15:42 -0500)]
cromo: catch dbus-c++ exceptions in RegisterSuspendDelayCallback.

If pwoerd vanishes between us getting the NameOwnerChanged indicating its birth
and the NameOwnerChanged indicating its death, we'll try to send to a
nonexistent target on the bus, which dbus-c++ indicates with an exception. Catch
and ignore it - we'll see the queued NameOwnerChanged messages and do the right
thing.

BUG=chromium-os:9023
TEST=Adhoc
Inhibit powerd from starting, then add an unconditional call to PowerDaemonUp()
in CheckForPowerDaemon(). Without this change, cromo will abort; with it, you'll
get an error message in syslog and cromo will carry on.

Change-Id: I4733b9340466f9eb83b08afe4d40d4836b8f6cf1
X-Where: locus chromeos-dogfood vcsid-fix
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/4897001

3 years agocromo:
Elly Jones [Wed, 10 Nov 2010 21:28:59 +0000 (16:28 -0500)]
cromo:
cromo: Remove the VCSID hack.
X-Where: locus chromeos-dogfood git-cl-commit
Signed-off-by: Elly Jones <ellyjones@google.com>
This is going to be done in a more sensible place (namely the cros_workon
eclass).

BUG=chromium-os:6599
TEST=None

No functional change - this is a refactoring commit only.

Change-Id: I548ae30d5066aa3f565cb94452f54b6d6e400cea
Where: locus chromeos-dogfood vcsid-fix
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: David Rochberg <rochberg@chromium.org>
Review URL: http://codereview.chromium.org/4714001

3 years agocromo: never log to /tmp.
Elly Jones [Tue, 2 Nov 2010 17:57:09 +0000 (13:57 -0400)]
cromo: never log to /tmp.

The logging to /tmp:
a) Can leak personally-identifying information, which might be readable by the
'chronos' user account,
b) Is not subject to log rotation, and can get quite large, and
c) Is redundant, since the same data is logged to syslog already.

Rip it out altogether.

BUG=chromium-os-partner:1556
TEST=Adhoc
ls -l /tmp

Change-Id: I9bdc578ebc0d8dbb585ac4dc9d51cd093f7ff695
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: David Rochberg <rochberg@chromium.org>
Review URL: http://codereview.chromium.org/4289002

3 years agocromo: Invoke powerd on the main loop instead of in the handler.
Elly Jones [Mon, 1 Nov 2010 23:15:26 +0000 (19:15 -0400)]
cromo: Invoke powerd on the main loop instead of in the handler.

This fixes a nasty deadlock in dbus-c++ caused by reentering the message
dispatch loop - see chromium-os:8486 for more info.

BUG=chromium-os:8486
TEST=Adhoc
boot machine ; suspend, resume.

Change-Id: I077b9176b5c5b6e214af4bedbd94b6fe0f2e7c14
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: David Rochberg <rochberg@chromium.org>
Review URL: http://codereview.chromium.org/4253001

3 years agoConvenience for sending commands to cromo.
David Rochberg [Mon, 25 Oct 2010 16:25:27 +0000 (12:25 -0400)]
Convenience for sending commands to cromo.

More verbose and more general than the /usr/local/lib/flimflam/test/mm-* commands.

BUG=NONE
TEST=manual, under dash, with 0, 1, and N arguments

Change-Id: I40858a0d569fd097391644be2758b2b476f90de8

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

3 years agoLog exit, add pid to syslog
Jason Glasgow [Thu, 21 Oct 2010 23:03:22 +0000 (19:03 -0400)]
Log exit, add pid to syslog

Add the pid to the syslog.  This helps in noticing restarts of the cromo server and helps to see if cromo has two instances running concurrently.

When exiting, clean up objects.

Change-Id: I57220155c09d6dc6fbfacc99a574e44ecf923338

BUG=7756
TEST=examine /var/log/messages

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

3 years agocromo: Allow root to own org.chromium.ModemManager.
Elly Jones [Wed, 20 Oct 2010 18:41:59 +0000 (14:41 -0400)]
cromo: Allow root to own org.chromium.ModemManager.

We need this so that autotests (which run as root) can grab the DBus name.

BUG=chromium-os:7804
TEST=Adhoc
With this CL, running cromo as root ought to work.

Change-Id: I6eb943d414f0ef8fcc226864bad95632bd44576e
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/3954002

3 years agocromo: log RCSID when we start up.
Elly Jones [Mon, 18 Oct 2010 18:21:50 +0000 (14:21 -0400)]
cromo: log RCSID when we start up.

BUG=chromium-os:6599
TEST=Adhoc
gmerge cromo ; restart cromo ; grep cromo /var/log/messages

Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/3788005

Change-Id: I2a2496a64648b271083146fb4f2bb2fa3ca6bcfd

3 years agocromo: Log suspend time.
Elly Jones [Thu, 14 Oct 2010 22:17:01 +0000 (18:17 -0400)]
cromo: Log suspend time.

Change-Id: Ia93bc1d561812900ea905798ca8f445e4af15547

BUG=None
TEST=Adhoc
gmerge cromo ; shut laptop ; check about:histograms/Network

Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/3826004

3 years agoAdd error return value to Activate
David Rochberg [Mon, 11 Oct 2010 21:14:48 +0000 (17:14 -0400)]
Add error return value to Activate

BUG=6885
TEST=Inheritors build, work

Change-Id: I910bffc08be80a7e6ece1f5104a620697b4313d0

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

3 years agoBetter tests. Better comment for carrier-specific activate
David Rochberg [Wed, 6 Oct 2010 20:06:08 +0000 (16:06 -0400)]
Better tests. Better comment for carrier-specific activate

Change-Id: Ia886ac7b13ebbee4e3790c78787bf892ce86f81b

BUG=6885
TEST=Unit tests

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

3 years agoSplit utilities into a separate library, add functions
David Rochberg [Wed, 6 Oct 2010 18:18:08 +0000 (14:18 -0400)]
Split utilities into a separate library, add functions

Add ActivateManual, ActivateManualDebug Add CdmaCarrierSpecificActivate

BUG=6885
TEST=Ran against madison, ran unit tests

Change-Id: I1be531fcd7eef82206666b745ff07f5636a9e9b8

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

3 years agoMove cellular -> utilities. Add string getter and DBusPropertyMap to utilities Add...
David Rochberg [Mon, 4 Oct 2010 14:10:26 +0000 (10:10 -0400)]
Move cellular -> utilities. Add string getter and DBusPropertyMap to utilities Add no-op carrier

TEST=unit + manual
BUG=6975,6885
Change-Id: Ie69b2ebda9c1c894c76491eb5d0dce2c70679113

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

3 years agoFixed several cromo problems.
Eric Shienbrood [Wed, 29 Sep 2010 18:50:02 +0000 (14:50 -0400)]
Fixed several cromo problems.
- cromo would crash if it was interrupted with a SIGINT or SIGTERM
  because of confusion about the ownership of the MessageHandler object.
- a typo in the Makefile kept the HexEsnToDecimal function from being
  exported as a dynamic symbol.
- SIGINT wouldn't result in cromo exiting.

BUG=none
TEST=verified that all these problems went away and that cromo still
functions normally

Change-Id: I2b98ae40a936f483892947bf618074ed2b761234

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

3 years agocromo: Export all CromoServer symbols, not just carrier stuff.
Elly Jones [Mon, 27 Sep 2010 21:59:48 +0000 (17:59 -0400)]
cromo: Export all CromoServer symbols, not just carrier stuff.

Fixes a build break in internal code.

TEST=Adhoc
emerge-$board cromo

BUG=None

Change-Id: Ic1a9473a892e4634447ff2f46adca97e0d0dd18d
Signed-Off-By: Elly Jones <ellyjones@chromium.org>
(cherry picked from commit aa5fd4fab071df80990935a7503ca9021e8ec59a)

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

3 years agoMove cellular carrier data into cromo
David Rochberg [Mon, 27 Sep 2010 17:59:21 +0000 (13:59 -0400)]
Move cellular carrier data into cromo

BUG=6885
TEST=unit tests, tested gobi-cromo-plugin against this
Change-Id: Icc3fbfae2c3090265a0172f3a2e6f29f9303acfd

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

3 years agocromo: Add powerd integration.
Elly Jones [Mon, 27 Sep 2010 15:13:25 +0000 (11:13 -0400)]
cromo: Add powerd integration.

This adds the ability for cromo to monitor powerd's state using the
NameOwnerChanged DBus signal. It also provides hooks for modules to use to
handle powerd starts and stops (used primarily for registering for suspend
delays, as implemented in 3440007).

TEST=Adhoc
Add test hooks on powerd_up and powerd_down to a plugin of your choice; restart
powerd a couple of times and see that those hooks are called. Try restarting
cromo; notice that the poll for powerd is successful.

BUG=chromium-os:6879

Change-Id: I18347a597a3775a8c24c1175fad10b0a83a1ec8f
Signed-Off-By: Elly Jones <ellyjones@chromium.org>
Review URL: http://codereview.chromium.org/3380023

3 years agoAdd some cellular utility functions.
David Rochberg [Mon, 13 Sep 2010 20:29:44 +0000 (16:29 -0400)]
Add some cellular utility functions.

BUG=6058
TEST=unit test added

Change-Id: I4b8615955fced68020d9f18b22f4ae100d3cf950

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

3 years agocromo: Synchronous shutdown.
Elly Jones [Tue, 7 Sep 2010 19:51:53 +0000 (15:51 -0400)]
cromo: Synchronous shutdown.

Some carriers require that we disconnect cleanly from their network; this change (in combination with 3324005 and 3355006) causes the system to stay up until cromo has disconnected fully. This procedure will also time out after 10 seconds in case of slow or nonexistent uplinks.

To do this, we introduce two tables of hooks which are called a) when we begin shutting down, and b) to ask if we're done shutting down. The pre-exit hooks normally initiate a clean disconnect, with the exit-ok hooks allowing an exit if their device is in a disconnected state. The exit hooks are polled (ugh) at some short interval after the pre-exit hooks are called.

Note that because of the unpleasantness of interacting with glib in a signal-safe way, the signal-handling code here is *exceptionally* ugly - we block signals for all threads except a dedicated target thread, which continuously waits (synchronously) for signals to arrive and dispatches on them. I apologize for this hack; the alternatives were all worse.

There are corresponding changes to all plugins.

BUG=chromium-os:6392
TEST=None
It's difficult to test this without adding a debugging print inside cromo, and
even then, it's hard to tell whether we're /actually/ disconnected or not.

Signed-Off-By: Elly Jones <ellyjones@chromium.org>
Review URL: http://codereview.chromium.org/3291016

Change-Id: I8ab19526c943f220e85bef50c5b2e3308b27e945

3 years agocromo: Add Activate() method to dummy modem.
Elly Jones [Wed, 1 Sep 2010 13:44:03 +0000 (09:44 -0400)]
cromo: Add Activate() method to dummy modem.

BUG=chromium-os:6235
TEST=None

Signed-Off-By: Elly Jones <ellyjones@chromium.org>
Review URL: http://codereview.chromium.org/3278005

Change-Id: Ie90ec000b74bc9d399362a641b4715112821be26

4 years agoAdded call to g_thread_init and link with -lgthread.
Eric Shienbrood [Fri, 6 Aug 2010 17:37:49 +0000 (13:37 -0400)]
Added call to g_thread_init and link with -lgthread.
This allows glib functions to be used from multiple threads.

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

4 years agoAdd LICENSE file
J. Richard Barnette [Thu, 5 Aug 2010 21:13:48 +0000 (14:13 -0700)]
Add LICENSE file

4 years agoAllow cromo to claim the ModemManager interface.
Elly Jones [Wed, 4 Aug 2010 18:45:57 +0000 (14:45 -0400)]
Allow cromo to claim the ModemManager interface.

This is part of bug #3506 (the effort to make cromo run as non-root); this
particular change allows cromo to claim the org.chromium.ModemManager interface
when running as itself instead of root. Without this change, cromo enters an
infinite crash loop at start time.

TEST=None

BUG=None

Signed-Off-By: Elly Jones <ellyjones@chromium.org>
Signed-Off-By: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/3056046

4 years agoSwitched to using Glib main loop instead of the default one.
Eric Shienbrood [Fri, 25 Jun 2010 19:13:32 +0000 (15:13 -0400)]
Switched to using Glib main loop instead of the default one.

Needed to allow posting of timers and other event sources.
Also, got rid of the modems_ member of ModemHandler, since
it was not used for anything.

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

4 years agoAdd missing inherit-review-settings-ok file
Daniel Erat [Wed, 16 Jun 2010 15:42:19 +0000 (08:42 -0700)]
Add missing inherit-review-settings-ok file

BUG=none
TEST=none
TBR=anush

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

4 years agoUse glog
David Rochberg [Fri, 11 Jun 2010 18:46:12 +0000 (14:46 -0400)]
Use glog

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

4 years agoConvert to not throwing exceptions
Jason Glasgow [Thu, 10 Jun 2010 15:30:06 +0000 (11:30 -0400)]
Convert to not throwing exceptions

TEST=run cromo
BUG=none

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

4 years agoadd factory reset.
David Rochberg [Fri, 4 Jun 2010 18:55:40 +0000 (14:55 -0400)]
add factory reset.

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

4 years agoinstall should install programs and headers
Jason Glasgow [Tue, 18 May 2010 21:29:49 +0000 (17:29 -0400)]
install should install programs and headers

TEST=build
BUG=none

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

4 years agoRenamed classes and files to match the names used in the Cromo design doc.
Eric Shienbrood [Thu, 29 Apr 2010 20:23:55 +0000 (16:23 -0400)]
Renamed classes and files to match the names used in the Cromo design doc.
Also, the file that gives the list of dynamic symbols that the linker
should export is now auto-generated.

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

4 years agoMore style changes in response to review comments.
Eric Shienbrood [Mon, 26 Apr 2010 14:21:26 +0000 (10:21 -0400)]
More style changes in response to review comments.

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

4 years agoInitial checkin of cromo, the Chrome OS modem manager.
Eric Shienbrood [Fri, 23 Apr 2010 23:11:06 +0000 (19:11 -0400)]
Initial checkin of cromo, the Chrome OS modem manager.

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

4 years agoInitial push to seed the cromo repository.
Eric Shienbrood [Fri, 23 Apr 2010 15:40:05 +0000 (11:40 -0400)]
Initial push to seed the cromo repository.