modem: move GetInfo from GsmCard -> Modem interface
It's generic, everything implements some variant of +GMM, +GMR, and +GMI.
This commit is contained in:
@@ -71,9 +71,6 @@ def inspect_gsm(proxy):
|
||||
pass
|
||||
print "IMSI: %s" % card.GetImsi()
|
||||
|
||||
info = card.GetInfo()
|
||||
print "Vendor: '%s' Model: '%s' Version: '%s'" % info
|
||||
|
||||
# Gsm.Network interface
|
||||
net = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM_GSM_NETWORK)
|
||||
print "Signal quality: %d" % net.GetSignalQuality()
|
||||
@@ -130,6 +127,11 @@ for m in modems:
|
||||
modem = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM)
|
||||
modem.Enable(True)
|
||||
|
||||
info = modem.GetInfo()
|
||||
print "Vendor: %s" % info[0]
|
||||
print "Model: %s" % info[1]
|
||||
print "Version: %s" % info[2]
|
||||
|
||||
if type == 1:
|
||||
inspect_gsm(proxy)
|
||||
elif type == 2:
|
||||
|
Reference in New Issue
Block a user