mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-24 06:18:33 +03:00
Add support for ADF_USIM/EF_EHPLMN
If the EF.EHPLMN exists, it contains the "Equivalent Home PLMN List". The odd part of that list is that it is not just a list of additional PLMN identities, but if the first digits of the IMSI are *not* listed in EF.EHPLMN, then the MCC/MNC of the IMSI prefix is suddently no longer considered the home network, but the subscriber is roaming. See TS 23.122: "If the HPLMN code derived from the IMSI is not present in the EHPLMN list, then it shall be treated as a Visited PLMN for PLMN selection purposes." Change-Id: I22d96ab4a424ec5bc1fb02f5e80165c646a748d3
This commit is contained in:
@@ -100,6 +100,17 @@ class SimCardCommands(object):
|
||||
def sel_ctrl(self, value):
|
||||
self._sel_ctrl = value
|
||||
|
||||
def try_select_file(self, dir_list):
|
||||
rv = []
|
||||
if type(dir_list) is not list:
|
||||
dir_list = [dir_list]
|
||||
for i in dir_list:
|
||||
data, sw = self._tp.send_apdu(self.cla_byte + "a4" + self.sel_ctrl + "02" + i)
|
||||
rv.append((data, sw))
|
||||
if sw != '9000':
|
||||
return rv
|
||||
return rv
|
||||
|
||||
def select_file(self, dir_list):
|
||||
rv = []
|
||||
if type(dir_list) is not list:
|
||||
|
||||
Reference in New Issue
Block a user