mirror of git://git.sysmocom.de/ofono
Add test script for controlling speaker volume
This commit is contained in:
parent
b015cd655a
commit
92de0c4693
|
@ -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("SpeakerVolume", dbus.Byte(int(sys.argv[1])))
|
Loading…
Reference in New Issue