From af4ecc3e6dce5a3ad6bad3f6276151a2d783f1ac Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 19 Jun 2009 13:55:00 -0400 Subject: cdma: implement GetServingSystem --- test/mm-test.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test/mm-test.py') 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): -- cgit v1.2.3-70-g09d2