Forum › MIFARE SDK › Problem authenticating a MIFARE Ultralight EV1 tag › Reply To: Problem authenticating a MIFARE Ultralight EV1 tag
Hi Jorge,
Thanks a lot for the detailed explanation. I'm using similar way to handling the exceptions as you do. And I'm using the native NFC API android.nfc.tech.MifareUltralight. However, it doesn't help:(. We'll get TagLostException in both scenarios.
Thanks,
Zhaoyu
Hi Support Team,
Anyways, thanks for clarification and quick response :)
Zhaoyu
Thanks a lot for the detailed explanation. I'm using similar way to handling the exceptions as you do. And I'm using the native NFC API android.nfc.tech.MifareUltralight. However, it doesn't help:(. We'll get TagLostException in both scenarios.
Thanks,
Zhaoyu
private void authenticate(MifareUltralight ultralight, byte[] password) {
try {
byte[] PWD_AUTH_CMD = new byte[password.length + 1];
//PWD_AUTH code 1Bh [Ref.1 p46]
PWD_AUTH_CMD[0] = 0x1B;
int i = 1;
for (byte b : password) {
PWD_AUTH_CMD = b;
i++;
}
ultralight.transceive(PWD_AUTH_CMD);
} catch (TagLostException e) {
Log.e("### error", "TagLostException while authenticating MifareUltralight message...", e);
errorTagLost();
} catch (IOException e) {
Log.e("### error", "IOException while authenticating tag...", e);
}
}
Hi Support Team,
Anyways, thanks for clarification and quick response :)
Zhaoyu
+ 0
|
- 0