Reply To: DESFire EV1 – invalidResponse: No Such Key

Forum MIFARE SDK DESFire EV1 – invalidResponse: No Such Key Reply To: DESFire EV1 – invalidResponse: No Such Key

Re: DESFire EV1 – invalidResponse: No Such Key

4. June 2015 at 10:56
I've tried something like this
@Override
public void onDESFireCardDetected(DESFire desFire) {
super.onDESFireCardDetected(desFire);
try {
try {
desFire.connectL4();
} catch (IOException e) {
e.printStackTrace();
Log.d("TAG", "Problem with connection");
}
try {
desFire.authenticate(DESFire.AuthType.Native, 0, (byte) 0, 0, (byte) 0, null);
} catch (IOException e) {
e.printStackTrace();
Log.d("TAG", "Problem with authentication");
}
Log.d("TAG", "Checking if auth succesfull");

byte[] UID = desFire.getCardUID();
String rfid = com.nxp.nfclib.utils.Utilities.dumpBytes(UID);

desFire.closeL4();

Toast.makeText(context, "DESFire UID: " + rfid, Toast.LENGTH_SHORT).show();

} catch (DESFireException e) {
e.printStackTrace();
Toast.makeText(context, "Authentication failed.", Toast.LENGTH_SHORT).show();
} catch (SmartCardException e) {
e.printStackTrace();
} catch (GeneralSecurityException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}


And it gives me "Problem with authentication"
+ 0  |  - 0