aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-06-19 13:55:00 -0400
committerDan Williams <dcbw@redhat.com>2009-06-19 13:55:00 -0400
commitaf4ecc3e6dce5a3ad6bad3f6276151a2d783f1ac (patch)
treea7313db4f7b0f348cc13c7af9891f979794cbd8d /test
parentf50a762763f7060cdd1c3417a4e68918bfef101b (diff)
cdma: implement GetServingSystem
Diffstat (limited to 'test')
-rwxr-xr-xtest/mm-test.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/mm-test.py b/test/mm-test.py
index df7f0e91..a5389672 100755
--- a/test/mm-test.py
+++ b/test/mm-test.py
@@ -12,13 +12,25 @@ MM_DBUS_INTERFACE_MODEM_CDMA='org.freedesktop.ModemManager.Modem.Cdma'
MM_DBUS_INTERFACE_MODEM_GSM_CARD='org.freedesktop.ModemManager.Modem.Gsm.Card'
MM_DBUS_INTERFACE_MODEM_GSM_NETWORK='org.freedesktop.ModemManager.Modem.Gsm.Network'
+def get_cdma_band_class(band_class):
+ if band_class == 1:
+ return "800MHz"
+ elif band_class == 2:
+ return "1900MHz"
+ else:
+ return "Unknown"
+
def inspect_cdma(proxy):
cdma = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM_CDMA)
try:
print "ESN: %s" % cdma.GetEsn()
except dbus.exceptions.DBusException:
pass
- return
+ print "-------------------"
+ info = cdma.GetServingSystem()
+ print "Class: %s" % get_cdma_band_class(info[0])
+ print "Band: %s" % info[1]
+ print "SID: %d" % info[2]
def get_gsm_network_mode(modem):