Project

General

Profile

« Previous | Next » 

Revision 134f41f5

Added by osmith about 4 years ago

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.

View differences:

sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java
210 210
			mi = MobileIdentity.str2mi(newIMSI_str, MobileIdentity.MI_IMSI, (byte)9);
211 211
			writeIMSI(mi);
212 212
			showMsg(changed);
213
			invalidateTMSI((short)SIMView.FID_EF_LOCI);
214
			invalidateTMSI((short)SIMView.FID_EF_LOCIGPRS);
213 215
			refreshIMSI();
214 216
		} catch (Exception e) {
215 217
			showError((short)42);
......
234 236
		gsmFile.updateBinary((short)0, mi, (short)0, (short)mi.length);
235 237
	}
236 238

  
239
	private void invalidateTMSI(short fid)
240
	{
241
		byte[] TMSI = {(byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff};
242
		gsmFile.select((short) SIMView.FID_DF_GSM);
243
		gsmFile.select(fid);
244
		gsmFile.updateBinary((short)0, TMSI, (short)0, (short)TMSI.length);
245
	}
246

  
237 247
	/*
238 248
	 * - command qualifiers for REFRESH,
239 249
	 *   ETSI TS 101 267 / 3GPP TS 11.14 chapter 12.6 "Command details":

Also available in: Unified diff

Add picture from clipboard (Maximum size: 48.8 MB)