projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
781f9cc
)
Add disable-modem script
author
Denis Kenzior
<denkenz@gmail.com>
Wed, 18 Nov 2009 22:28:47 +0000
(16:28 -0600)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 19 Nov 2009 00:07:10 +0000
(18:07 -0600)
test/disable-modem
[new file with mode: 0755]
patch
|
blob
diff --git a/test/disable-modem
b/test/disable-modem
new file mode 100755
(executable)
index 0000000..
dee34fd
--- /dev/null
+++ b/
test/disable-modem
@@ -0,0
+1,17
@@
+#!/usr/bin/python
+
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+
+properties = manager.GetProperties()
+
+path = properties["Modems"][0]
+
+modem = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.Modem')
+
+modem.SetProperty("Powered", dbus.Boolean(0))