FreeCalypso > hg > fc-pcsc-tools
annotate doc/PLMN-list-commands @ 202:3f6f50103dd3
fc-simtool: update-rec-prev separate command eliminated,
absorbed into regular update-rec
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 07 Mar 2021 04:06:39 +0000 |
parents | bca0f86d9efe |
children |
rev | line source |
---|---|
200
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 GSM SIM specs define EF_PLMNsel and EF_FPLMN as containing lists of preferred |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 and forbidden PLMNs, respectively. Both files are defined as writable by |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 ordinary users, requiring only CHV1 access for both reading and writing - and |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 both files are indeed user-writable on Grcard and Sysmocom SIMs. However, some |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 operator-issued SIMs (specifically T-Mobile USA) implement an underhanded trick: |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 whenever we try to write anything to either of these two files, the write |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 operation appears to succeed (SW 0x9000), but the byte content of the SIM file |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 remains unchanged. Therefore, writability of these files by ordinary end users |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 on regular operator-issued SIMs should be regarded as questionable. |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 fc-simtool provides high-level commands for both dumping (reading) and writing |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 both EF_PLMNsel and EF_FPLMN. Here are the commands for EF_PLMNsel: |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 plmnsel-dump |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 This command dumps the full content of EF_PLMNsel. |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 plmnsel-write index mcc-mnc |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 This command writes a single entry into EF_PLMNsel. The first argument is the |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 0-based index of the entry position to write into, and the second argument is |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 the PLMN code as in MCC-MNC. |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 plmnsel-write-list plmn-list-file |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 This command overwrites the entire EF_PLMNsel SIM file with a user-specified |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 PLMN list given in an ASCII data file. The file must contain PLMN codes |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 (MCC-MNC) separated by white space; any lines or line tails beginning with '#' |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 are treated as comments. Output from a previous plmnsel-dump is acceptable |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 input to plmnsel-write-list. PLMN codes are written into EF_PLMNsel from index |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 0 onward; any unused space at the end is filled with FF bytes. |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 plmnsel-erase start-index [end-index] |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 This command erases a single entry position or a range of entry positions in |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 EF_PLMNsel. Because EF_PLMNsel is a transparent EF (not record-based) at the |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 SIM protocol level, our numbering of entry positions in this file is 0-based, |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 rather than the 1-based convention used for record-based SIM files. Keyword |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 "end" may be specified instead of the final index, meaning erase to the end of |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 the file. |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 plmnsel-erase-all |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 This command overwrites the entire EF_PLMNsel SIM file with FF bytes, |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 corresponding to fully erased state. This command is more efficient than |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 'plmnsel-erase 0 end', as the operation is performed with a single UPDATE BINARY |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 SIM protocol command. |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 The commands for EF_FPLMN parallel those for EF_PLMNsel: simply replace |
bca0f86d9efe
doc/PLMN-list-commands article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 plmnsel-* with fplmn-*; all arguments are the same. |