diff options
Diffstat (limited to 'pySim')
-rw-r--r-- | pySim/cards.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pySim/cards.py b/pySim/cards.py index 7a61b68..850d084 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -424,6 +424,19 @@ class IsimCard(Card): data, sw = self._scc.update_record(EF_ISIM_ADF_map['IMPU'], 1, impu_tlv) return sw + def read_iari(self): + rec_cnt = self._scc.record_count(EF_ISIM_ADF_map['UICCIARI']) + uiari_recs = "" + for i in range(0, rec_cnt): + (res, sw) = self._scc.read_record(EF_ISIM_ADF_map['UICCIARI'], i + 1) + if sw == '9000': + # Skip the inital tag value ('80') byte and get length of contents + length = int(res[2:4], 16) + content = h2s(res[4:4+(length*2)]) + uiari_recs += "\t%s\n" % (len(content) and content or 'Not available') + else: + uiari_recs += "UICC IARI: Can't read, response code = %s\n" % (sw) + return uiari_recs class _MagicSimBase(Card): """ |