Page 1 of 1

Application deselect

Posted: Fri May 18, 2018 2:39 am
by vikas
Can we deselect the currently running applet without selecting the other one?
If so,how i can perform this?

TIA.

Re: Application deselect

Posted: Fri May 18, 2018 3:39 am
by WhiteRabbit
This question is good, I also want to know. If from the terminal side, the only thing needs to do is send some APDUs(I am not sure, but it should be). But if in applet internal codes, how to do it?

Re: Application deselect

Posted: Fri May 18, 2018 4:10 am
by wumindejia
You can send the command of manage channel to close the channel of the application. The method of deselect is called when a SELECT APDU command or a Manage CHANNEL CLOSE APDU command is received by the Java Card runtime environment.

Re: Application deselect

Posted: Fri May 18, 2018 4:31 am
by WhiteRabbit
That means applet can call the method of deselect by itself...

Re: Application deselect

Posted: Fri May 18, 2018 5:48 am
by vikas
Directly calling the deselect() is not working for me and i also don't want to send any APDU command for either SELECT or MANAGE CHANNEL CLOSE.
Is there any other way to deselet the applet without sending APDU commands?

Re: Application deselect

Posted: Fri May 18, 2018 5:54 am
by wumindejia
vikas wrote:Directly calling the deselect() is not working for me and i also don't want to send any APDU command for either SELECT or MANAGE CHANNEL CLOSE.
Is there any other way to deselet the applet without sending APDU commands?

Cold reset or hot reset.

Re: Application deselect

Posted: Fri May 18, 2018 6:09 am
by vikas
wumindejia wrote:
vikas wrote:Directly calling the deselect() is not working for me and i also don't want to send any APDU command for either SELECT or MANAGE CHANNEL CLOSE.
Is there any other way to deselet the applet without sending APDU commands?

Cold reset or hot reset.


sorry i didn't get this.Can u elaborate.

Re: Application deselect

Posted: Fri May 18, 2018 7:28 am
by WhiteRabbit
I think his meaning may be is to unplug the card from the reader by hand or trigger a warm reset by software(disconnect parameter).
It's time to read the Java Card Run Time Environment specification again. Perhaps there is an answer in the reference implementation.

Re: Application deselect

Posted: Fri May 18, 2018 7:44 am
by vikas
no actually i am just implementing some code an i am not involved with any card rt now.
I just want to deselect the currently running Applet without sending any APDU's command.
so, i need some code or any logic to do this.

Re: Application deselect

Posted: Fri May 18, 2018 9:31 pm
by wumindejia
vikas wrote:no actually i am just implementing some code an i am not involved with any card rt now.
I just want to deselect the currently running Applet without sending any APDU's command.
so, i need some code or any logic to do this.

Sorry, i don't know.