mirror of git://git.sysmocom.de/ofono
test: Add CDMA MO Call Support scripts
This commit is contained in:
parent
58574e61bc
commit
99d10bfc2c
|
@ -455,7 +455,10 @@ test_scripts = test/backtrace \
|
|||
test/set-gsm-band \
|
||||
test/set-umts-band \
|
||||
test/lockdown-modem \
|
||||
test/set-call-forwarding
|
||||
test/set-call-forwarding \
|
||||
test/cdma-list-call \
|
||||
test/cdma-dial-number \
|
||||
test/cdma-hangup
|
||||
|
||||
if TEST
|
||||
testdir = $(pkglibdir)/test
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import dbus
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
|
||||
if len(sys.argv) > 2:
|
||||
path = sys.argv[1]
|
||||
number = sys.argv[2]
|
||||
else:
|
||||
modems = manager.GetModems()
|
||||
path, properties = modems[0]
|
||||
number = sys.argv[1]
|
||||
|
||||
print "Using modem %s" % path
|
||||
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', path),
|
||||
'org.ofono.cdma.VoiceCallManager')
|
||||
|
||||
manager.Dial(number)
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import dbus
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
|
||||
if len(sys.argv) > 2:
|
||||
path = sys.argv[1]
|
||||
else:
|
||||
modems = manager.GetModems()
|
||||
path, properties = modems[0]
|
||||
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', path),
|
||||
'org.ofono.cdma.VoiceCallManager')
|
||||
|
||||
manager.Hangup()
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import dbus
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
|
||||
modems = manager.GetModems()
|
||||
|
||||
for path, properties in modems:
|
||||
print "[ %s ]" % (path)
|
||||
|
||||
if "org.ofono.cdma.VoiceCallManager" not in properties["Interfaces"]:
|
||||
continue
|
||||
|
||||
mgr = dbus.Interface(bus.get_object('org.ofono', path),
|
||||
'org.ofono.cdma.VoiceCallManager')
|
||||
|
||||
properties = mgr.GetProperties()
|
||||
|
||||
for key in properties.keys():
|
||||
val = str(properties[key])
|
||||
print " %s = %s" % (key, val)
|
Loading…
Reference in New Issue