public void run() {
while (!Thread.interrupted()) {
notifyStatus(TerminalStatus.WAITING);
try {
Card card = cardTerminal.connect("direct");
byte[] historicalBytes = card.getATR().getHistoricalBytes();
TagType tagType = AcsTagUtils.identifyTagType(historicalBytes);
ApduTagReaderWriter readerWriter = new ApduTagReaderWriter(new AcsDirectChannelTag(tagType,
historicalBytes, card));
try {
TamaNfcIpCommunicator nfcIpCommunicator = new TamaNfcIpCommunicator(readerWriter, readerWriter);
nfcIpCommunicator.setNfcId(LlcpConstants.nfcId3t);
nfcIpCommunicator.setFelicaParams(LlcpConstants.felicaParams);
nfcIpCommunicator.setMifareParams(LlcpConstants.mifareParams);
nfcIpCommunicator.setGeneralBytes(LlcpConstants.generalBytes);
NFCIPConnection nfcipConnection = nfcIpCommunicator.connectAsTarget();
handleNfcipConnection(nfcipConnection);
// tagListener.onTag(new AcsTag(tagType, historicalBytes, card));
}
catch (Exception e1) {
card.disconnect(true);
e1.printStackTrace();
try {
Thread.sleep(1000);
}
catch (InterruptedException e) {