This discussion is archived
2 Replies Latest reply: Nov 12, 2012 5:16 PM by safarmer RSS

Software Card Reset

966781 Newbie
Currently Being Moderated
Hi,

iam writing a host application to perform automated tests for my applets.

In this case i need to simulate a power reset and/or a pull and plug scenario. Are there any commands on the card i can do this ? JCSystem (or GPSystem) does not seem to provide any commands to do this.
  • 1. Re: Software Card Reset
    fgrieu Newbie
    Currently Being Moderated
    Deciding to reset is a task for the reader and its application, not the card.

    Under ISO/IEC 7816-3 (T=0 or T=1), the card can not just decide to reset without breaking the protocol. The best it could do under T=0 is stay mute until the reader decides to reset it (which the reader can decide to do in either of two ways: cold or warm).

    Ah, and I know no standard API for staying mute under Java Card. An infinite loop in an applet will typically NOT make the card mute.
  • 2. Re: Software Card Reset
    safarmer Expert
    Currently Being Moderated
    You can use the PC/SC winscard API's to reset on disconnect. If you use smartcardio for your host application the disconnect method can take a boolean. This may do what you need.

    - Shane

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points