Posted by zeitcontrol
(220.127.116.11) 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 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.