summaryrefslogtreecommitdiffstats
path: root/test/cdma-connman-disable
diff options
context:
space:
mode:
Diffstat (limited to 'test/cdma-connman-disable')
-rwxr-xr-xtest/cdma-connman-disable20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/cdma-connman-disable b/test/cdma-connman-disable
new file mode 100755
index 00000000..a1c95685
--- /dev/null
+++ b/test/cdma-connman-disable
@@ -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))