Marat K Marat K - 5 months ago 31
Android Question

How to read NFC type A card pages?

I have an Android app that is reading Mifare Ultralight card content. Previously all cards had Ultralight in

android.nfc.tech
and I was using
readPages()
to get the data with no problems.

Now I encountered new types of card that do not have Ultralight in
android.nfc.tech
and I can't use
readPages()
anymore. However I encounter that TagInfo app by NXP does read pages. How can I achieve same result? Should I use
tranceive()
command? What command should I generate?

Answer

You could have a look at MifareUltralight source and try to reproduce code for your tag:

public byte[] readPages(int pageOffset) throws IOException {
    validatePageIndex(pageOffset);
    checkConnected();
    byte[] cmd = { 0x30, (byte) pageOffset};
    return transceive(cmd, false);
}