I am trying to establish a connection between a Samsung Galaxy S3 and a smart card that supports NfcA
and IsoDep
(Mifare DESFire EV1). To do this, I turned on forgeground sending and started the task when a tag was detected. The code in the task is as follows:
IsoDep isoDep = IsoDep.get(tag);
byte[] selectCommand = {
(byte)0x00,
(byte)0xA4,
(byte)0x04,
(byte)0x00,
(byte)0x0A,
(byte)0x01,(byte)0x02,(byte)0x03,(byte)0x04,(byte)0x05,(byte)0x06,(byte)0x07,(byte)0x08,(byte)0x09,(byte)0xFF,
(byte)0x7F
};
try {
isoDep.connect();
byte[] response = isoDep.transceive(selectCommand);
String result = bytesToString(response);
isoDep.close();
return result;
} catch (Exception e) {
e.printStackTrace();
}
The transceiver method throws this exception:
java.io.IOException: Transceive failed
All other methods IsoDep
(for example, getTimeout()
) can be executed without errors. Increasing the timeout does not change the behavior. An applet with an AID in the selection command is present on the map. I also tried using a class NfcA
. But then I get the "tag lost" exception.
Can Galaxy S3 Problem?