2

I have tried to start the 3DES protocol on a Mifare Ultralight C. In the product datasheet they specify that you have to start by sending the command 1A (and I found this post that everyone who asks is redirected to: Android: Authenticating with NXP MiFare Ultralight C).

So I tried to do something similar in the code below:

nfca.connect();
byte[] authData = new byte[] { 0x1A, 0x00};
encRndB = nfca.transceive(authData);

But I always get the following error at the transceive operation:

W/System.err: android.nfc.TagLostException: Tag was lost.

Am I doing something wrong or I should do it in some other way?

Michael Roland
  • 36,432
  • 10
  • 81
  • 168
  • The post that you referenced seems to be correct. Are you absolutely sure that your card really is Ultralight C (and not Ultralight, Ultralight EV1, or NTAG)? – Michael Roland Feb 01 '19 at 11:15
  • Yes sorry you're right the IC type is NTAG213. If you know somewhere where I can find information about this type of tag would be very helpful thanks. – Xavi Llubes Feb 01 '19 at 11:45
  • You can use the Android built-in NDEF-related functions, or use the TapLinx library provided by NXP to communicate with the tag (and with Ultralight C as well). – ErikM Feb 03 '19 at 14:31

1 Answers1

0

Getting a TagLostException in response to a command can mean two things:

  1. Communication with the tag was actually interrupted (by tearing the tag) or due to bad coupling between the reader and the tag.
  2. The tag does not support the command and "responded" with a passive NACK (i.e. it did not respond to generate a timeout). Type 2 tags may to this if they receive commands that they do not support.

Consequently, the second case is a clear indication that the tag did not support the MIFARE Ultralight C authentication command. This means that the tag probably is no MIFARE Ultralight C tag. You may check Distinguish different types of MIFARE Ultralight for a starting point on fingerprinting the actual tag type.

Michael Roland
  • 36,432
  • 10
  • 81
  • 168