title: How to send ATR command to reset nfc secure element using android?
body: <p>i am building android application which connect to nfc secure element and get data to the android device.for building secure element i used java card API.In the jcop tools send ATR command to reset the java card.This is the sending commands.</p>
  
  <pre><code>/card -a a000000003000000 -c com.ibm.jc.CardManager
  resetCard with timeout: 0 (ms)
  --Waiting for card...
  ATR=3B F8 18 00 FF 81 31 FE 45 4A 43 4F 50 76 32 34    ;.....1.EJCOPv24
      31 43                                              1C
  ATR: T=1, FI=1/DI=8 (31clk/etu), N=-1, IFSC=254, BWI=4/CWI=5, Hist="JCOPv241"
   =&gt; 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00 
  </code></pre>
  
  <p>i am using jcop tools for that.Secure element part is complete.but my android application need to send more request to secure element at one second.I used create a tag and send data this way.</p>
  
  <pre><code>byte[] GET_STRING = { 
          (byte) 0x80, // CLA Class        
          0x04, // INS Instruction
          0x00, // P1  Parameter 1
          0x00, // P2  Parameter 2
          0x10  // LE  maximal number of bytes expected in result
      };
  
  result = tag.transceive(GET_STRING);
  int len = result.length;
  if (!(result[len-2]==(byte)0x90&amp;&amp;result[len-1]==(byte) 0x00))
     throw new RuntimeException("could not retrieve msisdn");
  
  byte[] data = new byte[len-2];
  System.arraycopy(result, 0, data, 0, len-2);
  String str = new String(data).trim();
  
  tag.close()
  </code></pre>
  
  <p>But I need to know how to send ATR command using android isoDep connection. if it is not possible how to reset the java card after getting data.</p>
  
  <p>Thanks
  Sajith</p>