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).
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.
The traces I have taken start off with ATR then:
the SIM immediately issues a
A0 A4 00 00 (SELECT) of the 7F 20 (DF_GSM)
whereas
the USIM immediately issues a
00 A4 00 0C (SELECT) of the 3F 00 (MF)
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.
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?