@Override
public void run() {
{*/
try {
MP65TerminalManager manager = new MP65TerminalManager();
manager.loadConfiguration(Main.getDefaultConfFolder(), "MP65Test");
List<GenericTerminal> terminals = manager.list();
terminals = manager.list();
terminals = manager.list();
if(0==terminals.size()){
System.out.println("MP65 terminal not detected.");
return;
}
MP65Terminal mp65 = (MP65Terminal) terminals.get(0);
terminals = manager.list();
mp65.addLogHandler(new ScardPrintStreamLogHandler(System.out));
System.out.println("Please insert a card in terminal "+ mp65.getName());
while(false==mp65.isCardPresent()){
try {
Thread.sleep(200);
} catch (InterruptedException ex) {
Logger.getLogger(MP65Terminal.class.getName()).log(Level.SEVERE, null, ex);
}
}
terminals = manager.list();
terminals = manager.list();
System.out.println("Try to connect to " + mp65.getName());
mp65.coldConnect();
/*Apdu apdu = new Apdu(0x00, 0x8A, 0x00, 0x44, 0x02);
mp65.sendApdu(apdu);*/
//manager.batchInterfaceTest();