diff options
author | Dan Williams <dcbw@redhat.com> | 2009-10-06 11:39:40 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2009-10-06 11:39:40 -0700 |
commit | d867b1fe6a11302c0efcd40bba2a898bc9080b1c (patch) | |
tree | 01aa2cdaa55d669c40b41e326289e76386095bd1 /test/mm-test.py | |
parent | 912b98723b2965b9aaf1f0328781a2730d7cc178 (diff) |
gsm: add cell access technology reporting to Scan()
Diffstat (limited to 'test/mm-test.py')
-rwxr-xr-x | test/mm-test.py | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/test/mm-test.py b/test/mm-test.py index 05075449..67769c57 100755 --- a/test/mm-test.py +++ b/test/mm-test.py @@ -146,7 +146,7 @@ def inspect_gsm(proxy, dump_private): print "Signal quality: %d" % net.GetSignalQuality() print "Scanning..." - results = net.Scan(timeout=60) + results = net.Scan(timeout=120) for r in results: status = r['status'] if status == "1": @@ -158,10 +158,30 @@ def inspect_gsm(proxy, dump_private): else: status = "(Unknown)" + access_tech = "" + try: + access_tech_num = r['access-tech'] + if access_tech_num == "0": + access_tech = "(GSM)" + elif access_tech_num == "1": + access_tech = "(Compact GSM)" + elif access_tech_num == "2": + access_tech = "(UMTS)" + elif access_tech_num == "3": + access_tech = "(EDGE)" + elif access_tech_num == "4": + access_tech = "(HSDPA)" + elif access_tech_num == "5": + access_tech = "(HSUPA)" + elif access_tech_num == "6": + access_tech = "(HSPA)" + except KeyError: + pass + if len(r['operator-long']): - print "%s: %s" % (r['operator-long'], status) + print "%s: %s %s" % (r['operator-long'], status, access_tech) else: - print "%s: %s" % (r['operator-short'], status) + print "%s: %s %s" % (r['operator-short'], status, access_tech) dump_private = False |