contactTerminal.setFrequency(3000000);
contactTerminal.setVoltage(5000);
}
for (int i = 0; i < 10; i++) {
terminal.coldConnect();
Apdu apdu = new Apdu(0x00, 0x1A, 0x00, 0x00, 0x04);
terminal.sendApdu(apdu);
if (0x9000 != apdu.getSw()) {
throw new RuntimeException();
}
byte data[] = {(byte) 0x12, (byte) 0x34, (byte) 0x56, (byte) 0x78};
apdu = new Apdu(0x00, 0x1C, 0x00, 0x00, data);
terminal.sendApdu(apdu);
if (0x9000 != apdu.getSw()) {
throw new RuntimeException();
}
apdu = new Apdu(0x00, 0x1A, 0x00, 0x00, 0x04);
terminal.sendApdu(apdu);
if (0x9000 != apdu.getSw()) {
throw new RuntimeException();
}
}
terminal.logLine(ScardLogHandler.LOG_INFO, "speedTest duration: " + ATimeUtilities.getUserFriendlyTimeUs(System.nanoTime() - start));
}