All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/7] test: add CDMA Connection Manager support scripts
@ 2011-01-21 23:06 christian.lam
  0 siblings, 0 replies; only message in thread
From: christian.lam @ 2011-01-21 23:06 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]

From: Christian Lam <christian.lam@nokia.com>

---
 test/disable-cdma-connman |   20 ++++++++++++++++++++
 test/enable-cdma-connman  |   20 ++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100755 test/disable-cdma-connman
 create mode 100755 test/enable-cdma-connman

diff --git a/test/disable-cdma-connman b/test/disable-cdma-connman
new file mode 100755
index 0000000..a1c9568
--- /dev/null
+++ b/test/disable-cdma-connman
@@ -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 "Disconnecting 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(0))
diff --git a/test/enable-cdma-connman b/test/enable-cdma-connman
new file mode 100755
index 0000000..699240d
--- /dev/null
+++ b/test/enable-cdma-connman
@@ -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))
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-21 23:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-21 23:06 [PATCH 6/7] test: add CDMA Connection Manager support scripts christian.lam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.