A 69 82 response to READ BINARY or UPDATE BINARY means the file’s access rule for that operation is not satisfied, or the card could not determine it. The response does not identify which PIN or ADM key is required. Start with the security attributes in the file control parameters (FCP), described in ETSI TS 102 221 §9.2.0–§9.2.1, before sending a VERIFY command.
69 82 and related file-access and PIN status words
ETSI TS 102 221 puts 69 82, “Security status not satisfied”, in the command-not-allowed group. READ BINARY requires the selected EF’s READ condition to be satisfied (§11.1.3.1). Check the SELECT response first, so you don’t mistake a failed selection for a denied read.
The meanings below come from ETSI TS 102 221 V17.4.0 and 3GPP TS 51.011 V4.15.0. The “Next check” column is where to look first when file access fails.
| SW | Meaning | What the response tells you | Next check | Source |
|---|---|---|---|---|
6982 | Security status not satisfied | Access rule unmet or undetermined | FCP and referenced ARR record | TS 102 221 §9.2.0, Table 10.13 |
6983 | Authentication/PIN method blocked | Further PIN guesses cannot succeed | Correct unblocking procedure | TS 102 221 Table 10.13, §11.1.9 |
6984 | Referenced data invalidated | Referenced data is unusable | Data and file state | TS 102 221 Table 10.13 |
6985 | Conditions of use not satisfied | A command prerequisite failed | Command’s specified conditions | TS 102 221 Table 10.13 |
6986 | No EF selected | No current EF for the operation | SELECT response | TS 102 221 Table 10.13 |
63CX | Retry counter for PIN commands | Wrong supplied PIN, or an empty counter query | Command data and retries left | TS 102 221 Table 10.9, §11.1.9 |
6A82 | File not found | Selection failed | FID and current directory | TS 102 221 Table 10.14 |
9804 | Classic SIM access/verification failure | Access denied; also wrong CHV or UNBLOCK CHV with retries left, or failed authentication | Command and CHV status | TS 51.011 §9.4.5 |
9840 | Classic SIM CHV/UNBLOCK CHV exhausted or blocked | No attempt left | Issuer’s recovery procedure | TS 51.011 §9.4.5 |
On a classic GSM SIM using class byte A0, a denied read can look like A0 B0 00 00 09 → 98 04 (TS 51.011 §9.2, §9.4.5). The APDU decoder accepts the command and status word in separate fields.
Find the access rule in the SELECT response
Use SELECT with P2 04 to request FCP; P2 0C requests no response data. The FCP’s security attribute uses one of three formats (TS 102 221 Table 11.2, §9.2.1).
Tag 8C contains a compact rule, with an access-mode (AM) byte followed by one security-condition (SC) byte for each set bit in AM bits b7–b1. The two examples in §9.2.5 are:
8C 02 01 00 READ always
8C 03 03 10 00 UPDATE requires user PIN verification; READ always
In the second example, AM 03 has two set bits and therefore two SC bytes. It does not describe a PIN-protected READ. Operations omitted from the AM byte default to NEVER (§9.2.2).
Tag AB contains expanded rules. An access-mode data object (AM_DO) is followed by security-condition data objects. Tag 80 identifies an AM_DO containing an AM byte (§9.2.6).
Tag 8B references EF_ARR. Its value contains a two-byte file identifier and a record number, or that file identifier followed by security-environment-ID/record-number pairs (§9.2.7). For example, 8B 03 6F 06 01 points to record 1 of 6F06. EF_ARR at MF level is 2F06; the USIM ADF’s EF_ARR is 6F06. Both are linear fixed with READ ALW. Select the referenced file and use READ RECORD for that record, then reselect the original EF before retrying its operation. (TS 102 221 §11.1.5, §13.4; TS 31.102 §4.2.55.)
Within an ARR record, 80 01 01 90 00 grants READ always (TS 102 221 Annex G, Table G.1, record 01). Here 90 00 is a security-condition TLV, not a response status word. A rule can specify a PIN reference in a control reference template like this:
A4 06 83 01 01 95 01 08
-------- --------
key 01 user PIN verification
The six value bytes contain two three-byte TLVs: 83 01 01 names key reference 01; 95 01 08 specifies user PIN verification. Interpret it with the preceding AM_DO to find which operation requires that key. (TS 102 221 §9.5.1, Table 9.3.)
In pySim-shell, select prints decoded FCP fields such as security_attrib_compact. See the pySim-shell manual, select.
Map the key reference to the PIN or ADM key
Go by the key reference in the rule. Verifying PIN1 does not guarantee access to the file. The ranges below are from TS 102 221 Table 9.3; global/specific reference coding is in Table 11.15. The command options are documented under verify_chv and verify_adm.
| Key reference | Meaning | Scope | pySim-shell option |
|---|---|---|---|
01–08 | PIN Appl 1–8 | Global | verify_chv --pin-nr 1 for 01 |
11 | Universal PIN | Global | verify_chv --pin-nr 0x11 |
0A–0E | ADM1–ADM5 | Global reference | verify_adm --adm-type ADM1 through ADM5 |
81–88 | Second PIN Appl 1–8 | Local | verify_chv --pin-nr 0x81 for 81 |
8A–8E | ADM6–ADM10 | Specific reference | verify_adm --adm-type ADM6 through ADM10 |
An application PIN grants access wherever the rules reference it. A local PIN belongs to its ADF or DF; another ADF can use the same reference number for a different PIN. Verification on one logical channel counts on the other channels, within that PIN’s scope. The universal PIN is shared across applications, and application activation or termination cannot reset its verification status. (TS 102 221 §9.4.1–§9.4.4.)
A disabled PIN makes its protected files accessible as ALWAYS unless a replacement global PIN applies (§11.1.11). Check the application/DF FCP’s PIN status template, tag C6, for enabled status and usage qualifiers (§9.5.2).
Security environment 00 applies when the application PIN is disabled and the universal PIN is either disabled or enabled and in use. Security environment 01 applies when the application PIN is enabled, or when it is disabled and the universal PIN is enabled but not in use. An 8B attribute can point to a different ARR record for each environment (§9.3, Table 9.0d).
Read EF_IMSI after verifying PIN1
In this constructed test-card example, ADF_USIM is already selected and EF_IMSI is present. PIN1 is enabled and unverified, with three retries remaining. Assume its READ rule references 01, for example through the A4 template above. The test PIN is 1234; substitute your card’s known value before sending anything.
00 A4 00 04 02 6F 07 00 → FCP … 90 00
00 B0 00 00 09 → 69 82
00 20 00 01 → 63 C3
00 20 00 01 08 31 32 33 34 FF FF FF FF → 90 00
00 B0 00 00 09 → 08 09 10 10 10 32 54 76 98 90 00
The SELECT includes Le 00 for the response. The trace shows completed APDU exchanges. On T=0, if SELECT returns 61 XX, retrieve the FCP with GET RESPONSE using the indicated length on the same channel (TS 102 221 §11.1.1.2, Annex C.1.4). The FCP is cut short here; its contents vary by card.
READ BINARY requests nine bytes from offset zero. Empty VERIFY has no Lc, data or Le; it reads the retry counter without spending an attempt. The next VERIFY has Lc 08 and eight data bytes. TS 31.101 V17.0.0 §9.6 specifies T.50 digits padded with FF for a 3GPP application’s PIN: 1234 becomes 31 32 33 34 FF FF FF FF. Classic CHV uses the same coding (TS 51.011 §9.3). UICC VERIFY’s command fields are specified in TS 102 221 §11.1.9.3.
Paste each command into the APDU decoder. For the final response, paste only 08 09 10 10 10 32 54 76 98, without 90 00, into the IMSI parser. It decodes the test IMSI 001010123456789: the length byte is 08, followed by eight identity bytes. This example assumes a two-digit MNC, 01; EF_AD records the MNC length. (TS 31.102 §4.2.2, §4.2.18.)
In a separate example with three retries remaining, a wrong PIN gives:
00 20 00 01 08 31 31 31 31 FF FF FF FF → 63 C2
That submits 1111 and spends one attempt (TS 102 221 §11.1.9.1.1).
Common files have different READ and UPDATE conditions
These are the specified access conditions for the listed EFs in TS 31.102 V17.8.0 and TS 102 221 V17.4.0. Read your card’s FCP or ARR to see which rule and key reference it uses. ALW means always; NEV means never.
| EF | FID | READ | UPDATE | Spec clause |
|---|---|---|---|---|
| ICCID | 2FE2 | ALW | NEV | TS 102 221 §13.2 |
| ARR at MF | 2F06 | ALW | ADM | TS 102 221 §13.4 |
| IMSI | 6F07 | PIN | ADM | TS 31.102 §4.2.2 |
| Keys | 6F08 | PIN | PIN | TS 31.102 §4.2.3 |
| UST | 6F38 | PIN | ADM | TS 31.102 §4.2.8 |
| SPN | 6F46 | ALW | ADM | TS 31.102 §4.2.12 |
| ACC | 6F78 | PIN | ADM | TS 31.102 §4.2.15 |
| FPLMN | 6F7B | PIN | PIN | TS 31.102 §4.2.16 |
| LOCI | 6F7E | PIN | PIN | TS 31.102 §4.2.17 |
| AD | 6FAD | ALW | ADM | TS 31.102 §4.2.18 |
The administrative authority sets the ADM requirements (TS 102 221 §9.5.1, Table 9.2). UPDATE of IMSI, AD, SPN, UST and ACC requires ADM. Ask the issuer, or the programmable test-card supplier, for the authorised credential and its scope.
For a READ rule of NEVER, entering another PIN cannot grant access (§9.2.2, Table 9.2). If you are looking for Ki or OPc, TS 31.102’s file definitions (§4) define no EF for either. The file-system reference lists access conditions for the EFs it covers.
When 69 82 persists after verification
Compare the verified reference with the failed operation’s ARR rule. PIN 01 does not satisfy a rule requiring second PIN 81; an ADM credential is useful only where the rule accepts it. Also check the selected application: a local PIN verified in another ADF can have the same reference number but a different value and status. (TS 102 221 §9.4.3, §9.5.1.)
Check whether the application session ended or the card was reset between commands. The application’s session-termination procedure updates the application PIN status, so an earlier successful VERIFY does not prove that the PIN is still verified (§8.5.3).
With pySim-shell, verify_adm without a value can look up ADM1 by ICCID in ~/.osmocom/pysim/card_data.csv. Check that entry against the inserted card. --pin-is-hex accepts a hex value; --adm-type selects the ADM number. See CardKeyProvider and verify_adm.
On classic SIMs, 98 04 also covers a wrong CHV with attempts left. Inspect the CHV counters in the DF SELECT response before trying again; the empty UICC VERIFY form above is not a classic-SIM CHV command. (TS 51.011 §9.2.1, §9.2.9, §9.4.5.)
Check retries before submitting a PIN or ADM value
A correct PIN resets its counter to three. Starting at three, consecutive wrong presentations return 63 C2, 63 C1, then 63 C0; the PIN is blocked at zero. Subsequent VERIFY commands supplying a PIN return 69 83. UNBLOCK PIN has its own ten-attempt counter: wrong values return 63 C9 down to 63 C0, after which further supplied values get 69 83. (TS 102 221 §11.1.9.1.1, §11.1.13.1.1.)
The pySim-shell manual warns that repeated wrong ADM1 values can permanently lock ADM1, and specifies three consecutive failures for sysmoUSIM/ISIM products. Do not test guessed ADM values.
For a UICC PIN, check the counter first with empty VERIFY, such as 00 20 00 01. Under TS 102 221 §11.1.9.1.2, a blocked PIN may answer that query with either 63 C0 or 69 83; stop in either case.