PDA

View Full Version : APDU Command and Response


vittal1985
02-11-2008, 09:35
Hi all,
I have designed a SIM CARD Reader and testing it on FPGA board,
I have got ATR, PPS response(proper).
I am sending a command (A0 A4 00 00 02)(select file), but not getting a response at all from sim. I tried different commands but no response at all.
What might be the problem.
I wanted to know the exact algorithm to rd/wr from/into a SIM CARD.
Please help me.

TIA,
Vittal

vittal1985
02-11-2008, 09:40
After i send the Select file command. I am waiting for the response.
If i don't get the command within wait time.(wait time violation),
i am giving cold reset to the SIM CARD.
But I am not getting ATR (answer to reset) response from the SIM CARD.
First time when i give cold reset i am getting ATR.

Nuken
02-18-2008, 20:16
There are two types of Reset:
1) On the rasing
2) After falling
signal on RST line of Smart Card. You need to set up low RST line before Smart Card was inserted. After it was inserted it may be reseted by itself within 40 000 clock cycles, if not set up high RST line and try to read ATR between 400 and 40 000 clock cycles. If it is, hold RST line high all the session. If no ATR, set up low RST line and desactivate contacts.
Check parity bit, whether it is setted to right value, because if not Smart Card does not send any answer, BUT it shakes up I/O line for a time to "say" that parity error was.