mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-25 23:08:34 +03:00
pySim-read.py: Use the method declared in cards.py to read ICCID
Change-Id: I0dcda1ea617f3febe246b360b95887c04e5d2629
This commit is contained in:
@@ -99,9 +99,9 @@ if __name__ == '__main__':
|
|||||||
card = card_detect("auto", scc) or Card(scc)
|
card = card_detect("auto", scc) or Card(scc)
|
||||||
|
|
||||||
# EF.ICCID
|
# EF.ICCID
|
||||||
(res, sw) = scc.read_binary(EF['ICCID'])
|
(res, sw) = card.read_iccid()
|
||||||
if sw == '9000':
|
if sw == '9000':
|
||||||
print("ICCID: %s" % (dec_iccid(res),))
|
print("ICCID: %s" % (res,))
|
||||||
else:
|
else:
|
||||||
print("ICCID: Can't read, response code = %s" % (sw,))
|
print("ICCID: Can't read, response code = %s" % (sw,))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user