Package org.nfctools.spi.tama.response

Examples of org.nfctools.spi.tama.response.InListPassiveTargetResp


    return result;
  }

  public void connectAsInitiator() throws IOException {
    while (true) {
      InListPassiveTargetResp inListPassiveTargetResp = sendMessage(new InListPassiveTargetReq((byte)1, (byte)0,
          new byte[0]));
      if (inListPassiveTargetResp.getNumberOfTargets() > 0) {
        log.info("TargetData: " + NfcUtils.convertBinToASCII(inListPassiveTargetResp.getTargetData()));
        if (inListPassiveTargetResp.isIsoDepSupported()) {
          log.info("IsoDep Supported");
          byte[] selectAidApdu = createSelectAidApdu(AID_ANDROID);
          DataExchangeResp resp = sendMessage(new DataExchangeReq(inListPassiveTargetResp.getTargetId(),
              false, selectAidApdu, 0, selectAidApdu.length));
          String dataIn = new String(resp.getDataOut());
          log.info("Received: " + dataIn);
          if (dataIn.startsWith("Hello")) {
            exchangeData(inListPassiveTargetResp);
View Full Code Here

TOP

Related Classes of org.nfctools.spi.tama.response.InListPassiveTargetResp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.