4 Replies Latest reply: Feb 29, 2012 5:11 AM by 917890 RSS

    ENVELOPE MENU SELECTION

    917890
      Hi,

      I want to realize the following (see ETSI TS 102 223 V4.3.0 (2002-07) Annex E (page 136)):

      ME----------------------------------------------------SIM

      TERMINAL PROFILE -------------------->
      <---------------------------------------------------- 91xx
      FETCH ------------------------------------------>
      <--------------------SET UP MENU (Help available)
      TERMINAL RESPONSE (OK) ------------->
      <---------------------------------------------------- 90 00
      ENVELOPE (MENU SELECTION)--------->
      <-----------------------------------------------------91 xx
      ...
      ...

      Communication is between a PC Card Reader and SIM.
      I send commands via javax.smartcardio.*

      I have succeeded: to send TERMINAL PROFILE, Fetch Proactive Command (get "SET UP MENU")

      But to sent a "ENVELOPE(MENU SELECTION)" Command returns 9000 instead of 91xx see my logs:

      sendTerminalResponse: A0 14 00 00 0C 81 03 01 25 00 82 02 82 81 83 01 00
      logResponseAPDU - 90 00
      sendEnvelope: A0 C2 00 00 09 D3 07 02 02 01 81 10 01 02
      logResponseAPDU - 90 00



      Did I do something wrong?

      Please your advice.
      Thank in advance.
        • 1. Re: ENVELOPE MENU SELECTION
          Umer
          It means your SIM is not proactive SIM.
          • 2. Re: ENVELOPE MENU SELECTION
            917890
            The first steps have worked.
            I have succeeded: to send TERMINAL PROFILE, Fetch Proactive Command (get "SET UP MENU").
            I can read the Menu Items.

            The logs before ENVELOPE MENU SELECTION:

            sendTeminalProfile SEND_TERMINAL_PROFILE_Nokia_6230: A0 10 00 00 09 5F 67 FF FF 11 00 00 14 44
            logResponseAPDU: 91 7C
            FETCH CMD_FETCH: A0 12 00 00 7C
            logResponseAPDU: D0 7A 81 03 01 25 00 82 02 81 82 .....

            Thus, it would be a proactive SIM.
            • 3. Re: ENVELOPE MENU SELECTION
              Umer
              Hmm. If it is so then there is no wrong with the status word of 0x9000 it means SIM don't have anything for the ME.
              • 4. Re: ENVELOPE MENU SELECTION
                917890
                I have found my error: sendEnvelope: A0 C2 00 00 09 D3 07 02 02 01 81 10 01 02
                The '02' at the end is a wrong "Identifier of item chosen".
                I had assumed that the Item id is 2 because it is in second position.
                That was wrong, because the id is 133 (in hex: 85)
                I have to take the 85 at the end instead of 02.

                And the Byte xx after (..09 D3 07) that is the "Device identities tag" should be 82 (instead of 02).
                Correct is: sendEnvelope: A0 C2 00 00 09 D3 07 82 02 01 81 10 01 85.