summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
J. Richard Barnette [Thu, 5 Aug 2010 21:13:48 +0000 (14:13 -0700)]
Add LICENSE file
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
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
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
David Rochberg [Fri, 11 Jun 2010 18:46:12 +0000 (14:46 -0400)]
Use glog
Review URL: http://codereview.chromium.org/2786011
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
David Rochberg [Fri, 4 Jun 2010 18:55:40 +0000 (14:55 -0400)]
add factory reset.
Review URL: http://codereview.chromium.org/2643002
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
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
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
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
Eric Shienbrood [Fri, 23 Apr 2010 15:40:05 +0000 (11:40 -0400)]
Initial push to seed the cromo repository.