summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest/set-mic-volume18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/set-mic-volume b/test/set-mic-volume
new file mode 100755
index 00000000..16922093
--- /dev/null
+++ b/test/set-mic-volume
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+
+properties = manager.GetProperties()
+
+path = properties["Modems"][0]
+
+cv = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.CallVolume')
+
+cv.SetProperty("MicrophoneVolume", dbus.Byte(int(sys.argv[1])))