Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 1/6] test: add scripts for setting frequency band
@ 2010-12-09 16:43 Lucas De Marchi
  2010-12-09 16:43 ` [PATCH 2/6] huaweimodem: Add support for radio settings Lucas De Marchi
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Lucas De Marchi @ 2010-12-09 16:43 UTC (permalink / raw)
  To: ofono

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

---
 Makefile.am        |    4 +++-
 test/set-gsm-band  |   25 +++++++++++++++++++++++++
 test/set-umts-band |   25 +++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 1 deletions(-)
 create mode 100755 test/set-gsm-band
 create mode 100755 test/set-umts-band

diff --git a/Makefile.am b/Makefile.am
index cdb3166..881204a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -423,7 +423,9 @@ test_scripts = test/backtrace \
 		test/test-push-notification \
 		test/test-smart-messaging \
 		test/send-vcard \
-		test/set-tty
+		test/set-tty \
+		test/set-gsm-band \
+		test/set-umts-band
 
 if TEST
 testdir = $(pkglibdir)/test
diff --git a/test/set-gsm-band b/test/set-gsm-band
new file mode 100755
index 0000000..9586d81
--- /dev/null
+++ b/test/set-gsm-band
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 3:
+	path = sys.argv[1]
+	band = 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]
+	band = sys.argv[1]
+else:
+	print "%s [PATH] band" % (sys.argv[0])
+	exit(1)
+
+print "Setting gsm band for modem %s..." % path
+radiosettings = dbus.Interface(bus.get_object('org.ofono', path),
+						'org.ofono.RadioSettings')
+
+radiosettings.SetProperty("GsmBand", band);
diff --git a/test/set-umts-band b/test/set-umts-band
new file mode 100755
index 0000000..510a40b
--- /dev/null
+++ b/test/set-umts-band
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 3:
+	path = sys.argv[1]
+	band = 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]
+	band = sys.argv[1]
+else:
+	print "%s [PATH] band" % (sys.argv[0])
+	exit(1)
+
+print "Setting umts band for modem %s..." % path
+radiosettings = dbus.Interface(bus.get_object('org.ofono', path),
+						'org.ofono.RadioSettings')
+
+radiosettings.SetProperty("UmtsBand", band);
-- 
1.7.3.3


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

end of thread, other threads:[~2010-12-21 22:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-09 16:43 [PATCH 1/6] test: add scripts for setting frequency band Lucas De Marchi
2010-12-09 16:43 ` [PATCH 2/6] huaweimodem: Add support for radio settings Lucas De Marchi
2010-12-21 22:37   ` Denis Kenzior
2010-12-09 16:43 ` [PATCH 3/6] huawei: " Lucas De Marchi
2010-12-21 22:38   ` Denis Kenzior
2010-12-09 16:43 ` [PATCH 4/6] huaweimodem: cache mode in " Lucas De Marchi
2010-12-09 16:43 ` [PATCH 5/6] huaweimodem: always cache ^SYSCFG values when supported Lucas De Marchi
2010-12-09 16:43 ` [PATCH 6/6] huaweimodem: add frequency band selection support Lucas De Marchi
2010-12-21 22:37 ` [PATCH 1/6] test: add scripts for setting frequency band Denis Kenzior

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