<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><p style="white-space: pre-wrap; word-wrap: break-word;">(1 comment)</p><p style="white-space: pre-wrap; word-wrap: break-word;">I am not sure this is the right way to go about this.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The Class 0x00 / 0x80 are _not_ a feature of the USIM/ISIM application (and their ADF), but a feature of the TS 102 221 UICC.  So if you have an UICC in front of you, then you can use those class values.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Only the classic SIM card will require you to use 0xA0.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I have also seen UICC/USIM cards that do _not_ have a SIM application and that hence will reject any A0 APDUs in the MF or anywhere else.  The reason is simple: IF an operator never had a 2G access network, he does not need the 2G SIM function.  Classic 2G phones will not even attempt to ever register as they will not even be able to read the SIM card.  You need at least a 3G phone to access the USIM on the UICC.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So I think the only reliable way to go about this is to try either way and then decide.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I am a bit confused by this. I have a LycaMobile sim here that starts up fine with 2G APDUs but does not allow UICC APDUs until I have selected at least ADF.USIM and I have to do the select of ADF.USIM also with UICC APDUs. I wonder how this works in real life. Maybe I should take some traces to learn how real phones figure this out.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/25804">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/25804">change 25804</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/25804"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I985261a1bddae60ffeaccb9c8d8d1b8a2ae4d0fc </div>
<div style="display:none"> Gerrit-Change-Number: 25804 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 18 Oct 2021 12:37:39 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>