Re: Response - Interpretation


[ Follow Ups ] [ BasicCard User Forum ]

Posted by zeitcontrol (212.144.46.65) on April 02, 2004 at 06:48:47:

In Reply to: Response - Interpretation posted by shash on April 01, 2004 at 02:04:04:

If you use a microcontroller to directly interface a smart card, then you must implement the communication layer.

As an short abstract about communication within a BasicCard environment:
- The top layer is the BasicCard command syntax like "Declare Command &H40 &H08 Test(Data$)
- Each command send to a BasicCard is translated to an ISO7816-3 compliant APDU (TPDU).
- Each APDU is transfered by use of the communication protocol which is either T=1 or T=0. For T=1 this means the APDU is transfered within one or more blocks.

The response comming from the BasicCard must be treated the same way in opposite direction by your microcontroller.

So "C0 00 00 00 00" as you use is the APDU. You must not directly send this data to the card but instead transfer it by use of the communication protocol (T=1). This would mean to pack it into blocks with additional header information.

The response you see ("00 81 00 81") is not an response on APDU layer but on communication protocol layer. Such this is a T=1 block, which in this case looks to be an R-Block showing an error condition, since you transfered an invalid block of data to the card.

I cannot explain the protocol in detail here , see "Reset command" thread within these forum for links to standards and specifications for the protocol.

Michael Petig
ZeitControl cardsystems GmbH


Follow Ups:


[ Follow Ups ] [ BasicCard User Forum ]