apduConn = (APDUConnection) Connector.open(connection_string);
Utilities.log("XXXX " + Thread.currentThread().getName() + " ISO 7816-4 command: APDUConnection opened");
screen.setUserMessage("Selected AID OK");
// Send the APDU and wait for a response - expect an error here unless your applet supports the command that was sent
Utilities.log("XXXX " + Thread.currentThread().getName() + " ISO 7816-4 command: sending APDU");
byte[] ret = apduConn.exchangeAPDU(command);
String resp_string = ByteArrayUtilities.byteArrayToHex(ret);
Utilities.log("XXXX " + Thread.currentThread().getName() + " ISO 7816-4 command: response=" + resp_string);
screen.setUserMessage("APDU response=" + resp_string);
// Close the logical channel connection
apduConn.close();