Documentation



Java Card 3 Platform Programming Notes

Card Terminal Interaction

When a Java Card technology-enabled smart card is powered up, the card sends an ATR (Answer to Reset) to the terminal. The Card Accessor returns the value of the ATR to the client program (shown in Figure 3-1).

Figure 3-1 Smart Card Sends an ATR to the Terminal

A flow diagram showing the smart card sending an ATR to a terminal as described in the previous text.
Description of "Figure 3-1 Smart Card Sends an ATR to the Terminal"

When the PurseClient application calls the selectApplet method of JavaCardRMIConnect, it sends a SELECT APDU command to the card via the CardAccessor object. This results in a File Control Information (FCI) APDU response from the RMIService instance of PurseApplet on the card in a TLV (Tag Length Value) format that includes the initial reference remote object information (shown in Figure 3-2).

Figure 3-2 Terminal Sends a SELECT Command to the Smart Card, Which Returns FCI

A flow diagram showing the terminal sending a SELECT command to a smart card that returns an FCI APDU as described in the previous text.
Description of "Figure 3-2 Terminal Sends a SELECT Command to the Smart Card, Which Returns FCI"

Later, when the PurseClient application calls the debit method of the remote interface Purse, the PurseImpl_Stub object sends an INVOKE command to the card via the CardAccessor object, identifying the remote object reference, interface, method, and parameter data for method invocation. The RMIService instance of PurseApplet unmarshalls this information and invokes the debit method of the PurseImpl instance, and returns the return value in the response RETURN APDU (shown in Figure 3-3).

Figure 3-3 Terminal Sends an INVOKE Command to the Smart Card, Which Returns a Value

A flow diagram showing the terminal sending an INVOKE command to a smart card that sends a return value as described in the previous text.
Description of "Figure 3-3 Terminal Sends an INVOKE Command to the Smart Card, Which Returns a Value"
Close Window

Table of Contents

Java Card: 3 Platform Programming Notes

Expand | Collapse