title: Device detect SIM vs USIM
body: <p>I have a Nokia 301 connected to APDU snoop device. I have 2 SIM cards one older 2G (SIM) card and a newer 3G (USIM).</p>
  
  <p>My understanding is that the CLA (of the APDU) would be A0 in the SIM case and 00/80 in the USIM case. I would like to know how the device knows which CLA to use.</p>
  
  <p>The traces I have taken start off with ATR then: 
  the SIM immediately issues a 
  <strong>A0</strong> A4 00 00 (SELECT) of the 7F 20 (DF_GSM)<br>
  whereas 
  the USIM immediately issues a 
  <strong>00</strong> A4 00 0C (SELECT) of the 3F 00 (MF)</p>
  
  <p>This leads me to believe the ATR in some way enables the device to distinguish SIM/USIM? My understanding was that the ATR holds more interface information like voltages, frequencies and protocols etc. </p>
  
  <p>My question is, how does the phone know from the word go which CLA to use without querying EF_DIR or trying a CLA then failing?</p>