diff options
Diffstat (limited to 'test/set-tech-preference')
-rwxr-xr-x | test/set-tech-preference | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/set-tech-preference b/test/set-tech-preference new file mode 100755 index 00000000..9f702d52 --- /dev/null +++ b/test/set-tech-preference @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import dbus +import sys + +bus = dbus.SystemBus() + +if len(sys.argv) == 3: + path = sys.argv[1] + tech = sys.argv[2] +elif len(sys.argv) == 2: + manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + properties = manager.GetProperties() + path = properties["Modems"][0] + tech = sys.argv[1] +else: + print "%s [PATH] technology" % (sys.argv[0]) + +print "Setting technology preference for modem %s..." % path +radiosettings = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.RadioSettings') + +radiosettings.SetProperty("TechnologyPreference", tech); |