Revision 4ac43a2f
Added by Neels Hofmeyr about 4 years ago
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 |
refreshIMSI(); |
|
213 | 214 |
} catch (Exception e) { |
214 | 215 |
showError((short)42); |
215 | 216 |
} |
... | ... | |
232 | 233 |
gsmFile.select((short) SIMView.FID_EF_IMSI); |
233 | 234 |
gsmFile.updateBinary((short)0, mi, (short)0, (short)mi.length); |
234 | 235 |
} |
236 |
|
|
237 |
/* |
|
238 |
* - command qualifiers for REFRESH, |
|
239 |
* ETSI TS 101 267 / 3GPP TS 11.14 chapter 12.6 "Command details": |
|
240 |
* '00' =SIM Initialization and Full File Change Notification; |
|
241 |
* '01' = File Change Notification; |
|
242 |
* '02' = SIM Initialization and File Change Notification; |
|
243 |
* '03' = SIM Initialization; |
|
244 |
* '04' = SIM Reset; |
|
245 |
* '05' to 'FF' = reserved values. |
|
246 |
*/ |
|
247 |
public static final byte SIM_REFRESH_SIM_INIT_FULL_FILE_CHANGE = 0x00; |
|
248 |
public static final byte SIM_REFRESH_FILE_CHANGE = 0x01; |
|
249 |
public static final byte SIM_REFRESH_SIM_INIT_FILE_CHANGE = 0x02; |
|
250 |
public static final byte SIM_REFRESH_SIM_INIT = 0x03; |
|
251 |
public static final byte SIM_REFRESH_SIM_RESET = 0x04; |
|
252 |
|
|
253 |
/* Run the Proactive SIM REFRESH command for the FID_EF_IMSI. */ |
|
254 |
private void refreshIMSI() |
|
255 |
{ |
|
256 |
/* See ETSI TS 101 267 / 3GPP TS 11.14 section 6.4.7.1 "EF IMSI changing procedure": |
|
257 |
* Valid qualifiers are SIM_REFRESH_SIM_INIT_FILE_CHANGE and SIM_REFRESH_SIM_INIT_FULL_FILE_CHANGE. |
|
258 |
*/ |
|
259 |
ProactiveHandler proHdlr = ProactiveHandler.getTheHandler(); |
|
260 |
proHdlr.init((byte)PRO_CMD_REFRESH, SIM_REFRESH_SIM_INIT_FULL_FILE_CHANGE, DEV_ID_ME); |
|
261 |
proHdlr.send(); |
|
262 |
} |
|
235 | 263 |
} |
Also available in: Unified diff
add SIM REFRESH command after IMSI change