Invalidate TMSI, P-TMSI after changing IMSI

Now the ME doesn't try to send the TMSI anymore in the next Location
Updating Request, it directly sends the IMSI.
This commit is contained in:
Oliver Smith 2020-02-26 10:57:07 +01:00
parent 4ac43a2f1b
commit 134f41f5d1
1 changed files with 10 additions and 0 deletions

View File

@ -210,6 +210,8 @@ public class IMSIPseudo extends Applet implements ToolkitInterface, ToolkitConst
mi = MobileIdentity.str2mi(newIMSI_str, MobileIdentity.MI_IMSI, (byte)9);
writeIMSI(mi);
showMsg(changed);
invalidateTMSI((short)SIMView.FID_EF_LOCI);
invalidateTMSI((short)SIMView.FID_EF_LOCIGPRS);
refreshIMSI();
} catch (Exception e) {
showError((short)42);
@ -234,6 +236,14 @@ public class IMSIPseudo extends Applet implements ToolkitInterface, ToolkitConst
gsmFile.updateBinary((short)0, mi, (short)0, (short)mi.length);
}
private void invalidateTMSI(short fid)
{
byte[] TMSI = {(byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff};
gsmFile.select((short) SIMView.FID_DF_GSM);
gsmFile.select(fid);
gsmFile.updateBinary((short)0, TMSI, (short)0, (short)TMSI.length);
}
/*
* - command qualifiers for REFRESH,
* ETSI TS 101 267 / 3GPP TS 11.14 chapter 12.6 "Command details":