Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 2/4] Add: test scripts online-modem and offline-modem
@ 2010-05-25 21:14 Pekka Pessi
  2010-05-25 21:14 ` [PATCH 3/4] Add: set_online and post_online methods to isimodem driver Pekka Pessi
  0 siblings, 1 reply; 16+ messages in thread
From: Pekka Pessi @ 2010-05-25 21:14 UTC (permalink / raw)
  To: ofono

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

---
 test/offline-modem |   17 +++++++++++++++++
 test/online-modem  |   17 +++++++++++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100755 test/offline-modem
 create mode 100755 test/online-modem

diff --git a/test/offline-modem b/test/offline-modem
new file mode 100755
index 0000000..16325ad
--- /dev/null
+++ b/test/offline-modem
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+import dbus, 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')
+	properties = manager.GetProperties()
+	path = properties["Modems"][0]
+
+print "Setting modem %s offline..." % path
+modem = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.Modem')
+modem.SetProperty("Online", dbus.Boolean(0))
diff --git a/test/online-modem b/test/online-modem
new file mode 100755
index 0000000..db0b9f5
--- /dev/null
+++ b/test/online-modem
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+import dbus, 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')
+	properties = manager.GetProperties()
+	path = properties["Modems"][0]
+
+print "Setting modem %s online..." % path
+modem = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.Modem')
+modem.SetProperty("Online", dbus.Boolean(1))
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-05-27 19:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1274885889-11479-2-git-send-email-Pekka.Pessi@nokia.com>
2010-05-26 14:58 ` [PATCH 3/4] Add: set_online and post_online methods to isimodem driver Pekka Pessi
2010-05-27  2:08   ` Denis Kenzior
2010-05-27  6:48     ` Aki Niemi
2010-05-27 11:44       ` Denis Kenzior
2010-05-27 12:34     ` Pekka Pessi
2010-05-27 12:48       ` Denis Kenzior
2010-05-27 16:12         ` [PATCH 1/6] Use ofono_bool_t instead of bool in modem API Pekka Pessi
2010-05-27 16:12           ` [PATCH 2/6] Use ofono_bool_t with D-Bus API Pekka Pessi
2010-05-27 16:12             ` [PATCH 3/6] Eliminated bool, true and false from gisi Pekka Pessi
2010-05-27 16:12               ` [PATCH 4/6] Eliminated bool, true and false from isimodem Pekka Pessi
2010-05-27 16:12                 ` [PATCH 5/6] Fixed style issues in isimodem voicecall Pekka Pessi
2010-05-27 16:12                   ` [PATCH 6/6] Add: set_online and post_online methods to isimodem driver Pekka Pessi
2010-05-27 19:36               ` [PATCH 3/6] Eliminated bool, true and false from gisi Denis Kenzior
2010-05-27 18:02             ` [PATCH 2/6] Use ofono_bool_t with D-Bus API Denis Kenzior
2010-05-27 18:01           ` [PATCH 1/6] Use ofono_bool_t instead of bool in modem API Denis Kenzior
2010-05-25 21:14 [PATCH 2/4] Add: test scripts online-modem and offline-modem Pekka Pessi
2010-05-25 21:14 ` [PATCH 3/4] Add: set_online and post_online methods to isimodem driver Pekka Pessi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox