summaryrefslogtreecommitdiffstats
path: root/test/cdma-connman-enable
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-03-17 14:18:56 -0500
committerDenis Kenzior <denkenz@gmail.com>2011-03-17 14:18:56 -0500
commit73a99ed5cef47844d30e1d21ea50231ef286de04 (patch)
treeb3909e0ba1fb064bb0e07cd080101ca0c8f62006 /test/cdma-connman-enable
parent41df140eb8d1ba427e11e8e3251aa7b68e32275d (diff)
downloadofono-73a99ed5cef47844d30e1d21ea50231ef286de04.tar.bz2
test: Rename cdma connman scripts and add to build
Diffstat (limited to 'test/cdma-connman-enable')
-rwxr-xr-xtest/cdma-connman-enable20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/cdma-connman-enable b/test/cdma-connman-enable
new file mode 100755
index 00000000..699240d7
--- /dev/null
+++ b/test/cdma-connman-enable
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 2:
+ path = sys.argv[1]
+else:
+ manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
+
+print "Connecting CDMA Packet Data Service on modem %s..." % path
+cm = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.cdma.ConnectionManager')
+
+cm.SetProperty("Powered", dbus.Boolean(1))