how to get the value of status words SW1 SW2

Hello,

i am newbie in javacard and writing a SAT programm using javacard kit 2.1.2 and the SIM API 03.19.

how can i get the value of the status words?

For example, i use the command "select" and get the FCI saved in array. Now i want to request the status words e.g. 9F 0F , 90 00 etc.

I have searched the forum and fand no answer.

Thanks in advance.

MikeN

[399 byte] By [MikeNa] at [2007-11-27 5:56:42]
# 1

status word is always returned with APDU response.

APDU response is defined as:

--

|Data field | SW1 | SW2|

--

where data field is optional and SW1SW2 is mandatory.

So you get APDU response from the card as :

FCI template (tag '6F') | SW1SW2.

last 2 bytes are the response status.

Best regards,

Eve

Ievaa at 2007-7-12 16:27:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

thanks Eve.

Actually, i work on the processToolkit () method. A simple question: For example, I want to use "Display Text" command to show the status words on screen. That is SAT method and can be used in processToolkit (), and the status words are only in the method process () available. Am I right? Is there a way to use APDU methods if i use processToolkit ()? I tried to use a global array to store status words in process () and read it in processToolkit. No error by compiling and execution. But nothing happens.

Any idea or tips? Thanks a lot in advance.

BR

MikeN

MikeNa at 2007-7-12 16:27:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...