aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-10-25 17:41:08 -0500
committerDan Williams <dcbw@redhat.com>2010-10-25 17:41:08 -0500
commit1684d8b1734be69700a93a9995b99fac6ffb9763 (patch)
tree29b0fd07d0b864bddf23d036ab1c223ccf15a625 /test
parent46106660fe6aae1018f6f6c45281ccef837e78f8 (diff)
gsm: add SimIdentifier property
An obfuscated SimIdentifier that may be available before the PIN has been entered, for use in auto-unlocking a device. If this value is present, it should be used in preference to DeviceIdentifier as it is SIM-specific like the PIN code.
Diffstat (limited to 'test')
-rwxr-xr-xtest/info.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/info.py b/test/info.py
index 347f8fe8..6659a3a4 100755
--- a/test/info.py
+++ b/test/info.py
@@ -167,6 +167,13 @@ def gsm_inspect(proxy, props):
# Gsm.Card interface
card = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM_GSM_CARD)
+ simid = "<unavailable>"
+ try:
+ simid = props.Get(MM_DBUS_INTERFACE_MODEM_GSM_CARD, "SimIdentifier")
+ except dbus.exceptions.DBusException:
+ pass
+ print "SIM ID: %s" % simid
+
imei = "<unavailable>"
try:
imei = card.GetImei()
@@ -229,10 +236,10 @@ if mtype == 1:
elif mtype == 2:
print "Type: CDMA"
-print "Driver: '%s'" % (props.Get(MM_DBUS_INTERFACE_MODEM, 'Driver'))
-print "Modem device: '%s'" % (props.Get(MM_DBUS_INTERFACE_MODEM, 'MasterDevice'))
-print "Data device: '%s'" % (props.Get(MM_DBUS_INTERFACE_MODEM, 'Device'))
-print "Device ID: '%s'" % (props.Get(MM_DBUS_INTERFACE_MODEM, 'DeviceIdentifier'))
+print "Driver: %s" % (props.Get(MM_DBUS_INTERFACE_MODEM, 'Driver'))
+print "Modem device: %s" % (props.Get(MM_DBUS_INTERFACE_MODEM, 'MasterDevice'))
+print "Data device: %s" % (props.Get(MM_DBUS_INTERFACE_MODEM, 'Device'))
+print "Device ID: %s" % (props.Get(MM_DBUS_INTERFACE_MODEM, 'DeviceIdentifier'))
print ""
modem = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM)