---
Makefile.am | 3 ++-
test/set-fast-dormancy | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletions(-)
create mode 100755 test/set-fast-dormancy
diff --git a/Makefile.am b/Makefile.am
index 17797ae..5a541c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -410,7 +410,8 @@ test_scripts = test/backtrace \
test/enable-gprs \
test/disable-gprs \
test/get-icon \
- test/deactivate-all
+ test/deactivate-all \
+ test/set-fast-dormancy
if TEST
testdir = $(pkglibdir)/test
diff --git a/test/set-fast-dormancy b/test/set-fast-dormancy
new file mode 100755
index 0000000..6951813
--- /dev/null
+++ b/test/set-fast-dormancy
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 3:
+ path = sys.argv[1]
+ enable = int(sys.argv[2])
+elif len(sys.argv) == 2:
+ manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
+ enable = int(sys.argv[1])
+else:
+ print "%s [PATH] {0|1}" % (sys.argv[0])
+ exit(1)
+
+print "Setting fast dormancy for modem %s..." % path
+radiosettings = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.RadioSettings')
+
+radiosettings.SetProperty("FastDormancy", dbus.Boolean(enable));
--
1.7.0.4
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono