JCOP: How to close javacard applet operations?

I'm able to communicate with a JavaCard and Applet (authenticating to card, selecting applet, sending apdu to applet) but I don't know what to do after this?

May I deselect the applet or "logout" from the card?

Now, after completed operations I send an "ATR" to the card by 'JCTerminal.waitForCard();' but I don't know if it's the right way.

I also use 'terminal.waitForCard(1000)' for polling the (tcl:10) card reader if there is a suitable JavaCard in it. However, it means if there is a card there it's reseted in every second. (I couldn't stop polling after card is detected because I also must detect card removing.)

[656 byte] By [viktor.tamasa] at [2007-11-26 14:13:14]
# 1

Refer to the Java Card Runtime Environment Spec. . There are various ways how to deselect an Applet:

- Power Loss / Reset

- Selecting another Applet/ISD/SSD on the same logical channel

- MANAGE CHANNEL --> close (P1='80'), if your card supports supplementary logical channels (JCOP supports only the base channel)

You cannot logout from the card. A smart card is polled. So to be sure, just reset the card.

You cannot send an ATR to the card: Answer To Reset is a string that must be sent on power-up FROM the card to the card acceptance device.

lexdabeara at 2007-7-8 2:02:13 > top of Java-index,Java Mobility Forums,Consumer and Commerce...