Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9174623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:47:01+00:00 2026-06-17T16:47:01+00:00

Does anyone know how I can find out via the Android NFC API which

  • 0

Does anyone know how I can find out via the Android NFC API which NFC chip is used in a tag which I am reading? Ideally I like to get the both the chip model and the manufacturer.

Is that available somewhere in the Tag object?

For clarification, I don’t mean the reader chip in the phone, but the chip in the NFC tag.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:47:02+00:00Added an answer on June 17, 2026 at 4:47 pm

    I’m developing an application in Android for NFC read/write/authentication operations. Here are some code parts you would like.

    Android has 3 main types determined for cards, those are Mifare Classic, Mifare Ultralight and Isodep (this is the type of Desfire and Desfire EV1). So, as I get a tag touched, I run this operation:

    private String[] getTagInfo(Intent intent) {
        Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
        String prefix = "android.nfc.tech.";
        String[] info = new String[2];
    
        // UID
        byte[] uid = tag.getId();
        info[0] = "UID In Hex: " + Utils.convertByteArrayToHexString(uid) + "\n" +
                  "UID In Dec: " + Utils.convertByteArrayToDecimal(uid) + "\n\n";
    
        // Tech List
        String[] techList = tag.getTechList();
        String techListConcat = "Technologies: ";
        for(int i = 0; i < techList.length; i++) {
            techListConcat += techList[i].substring(prefix.length()) + ",";
        }
        info[0] += techListConcat.substring(0, techListConcat.length() - 1) + "\n\n";
    
        // Mifare Classic/UltraLight Info
        info[0] += "Card Type: ";
        String type = "Unknown";
        for(int i = 0; i < techList.length; i++) {
            if(techList[i].equals(MifareClassic.class.getName())) {
                info[1] = "Mifare Classic";
                MifareClassic mifareClassicTag = MifareClassic.get(tag);
    
                // Type Info
                switch (mifareClassicTag.getType()) {
                case MifareClassic.TYPE_CLASSIC:
                    type = "Classic";
                    break;
                case MifareClassic.TYPE_PLUS:
                    type = "Plus";
                    break;
                case MifareClassic.TYPE_PRO:
                    type = "Pro";
                    break;
                }
                info[0] += "Mifare " + type + "\n";
    
                // Size Info
                info[0] += "Size: " + mifareClassicTag.getSize() + " bytes \n" +
                        "Sector Count: " + mifareClassicTag.getSectorCount() + "\n" +
                        "Block Count: " + mifareClassicTag.getBlockCount() + "\n";
            } else if(techList[i].equals(MifareUltralight.class.getName())) {
                info[1] = "Mifare UltraLight";
                MifareUltralight mifareUlTag = MifareUltralight.get(tag);
    
                // Type Info
                switch (mifareUlTag.getType()) {
                case MifareUltralight.TYPE_ULTRALIGHT:
                    type = "Ultralight";
                    break;
                case MifareUltralight.TYPE_ULTRALIGHT_C:
                    type = "Ultralight C";
                    break;
                }
                info[0] += "Mifare " + type + "\n";
            } else if(techList[i].equals(IsoDep.class.getName())) {
                info[1] = "IsoDep";
                IsoDep isoDepTag = IsoDep.get(tag);
                info[0] += "IsoDep \n";
            } else if(techList[i].equals(Ndef.class.getName())) {
                Ndef ndefTag = Ndef.get(tag);
                info[0] += "Is Writable: " + ndefTag.isWritable() + "\n" +
                        "Can Make ReadOnly: " + ndefTag.canMakeReadOnly() + "\n";
            } else if(techList[i].equals(NdefFormatable.class.getName())) {
                NdefFormatable ndefFormatableTag = NdefFormatable.get(tag);
            }
        } 
    
        return info;
    }
    

    However, this doesn’t directly get the type of Desfire and Desfire EV1. For that you need to send some bytes to card:

    static final byte GET_MANUFACTURING_DATA = (byte) 0x60;
    
    public DesfireManufacturingData getManufacturingData() throws Exception {
        byte[] respBuffer = sendRequest(GET_MANUFACTURING_DATA);
        if (respBuffer.length != 28)
            throw new Exception("Invalid response");
        return new DesfireManufacturingData(respBuffer);
    }
    
    private byte[] sendRequest (byte command) throws Exception {
        return sendRequest(command, null);
    }
    
    private byte[] sendRequest (byte command, byte[] parameters) throws Exception {
        ByteArrayOutputStream output = new ByteArrayOutputStream();
    
        byte[] recvBuffer = mTagTech.transceive(Utils.wrapMessage(command, parameters));
    
        while (true) {
            if (recvBuffer[recvBuffer.length - 2] != (byte) 0x91)
                throw new Exception("Invalid response");
    
            output.write(recvBuffer, 0, recvBuffer.length - 2);
    
            byte status = recvBuffer[recvBuffer.length - 1];
            if (status == OPERATION_OK) {
                break;
            } else if (status == ADDITIONAL_FRAME) {
                recvBuffer = mTagTech.transceive(Utils.wrapMessage(GET_ADDITIONAL_FRAME, null));
    
    
            } else if (status == PERMISSION_DENIED) {
                throw new Exception("Permission denied");
            }else if (status == LENGTH_ERROR) {
                throw new Exception("Length Error");
            } 
            else if (status == AUTHENTICATION_ERROR) {
                throw new Exception("Authentication error");
            }else if (status == PARAMETER_ERROR) {
                throw new Exception("Parameter Error");
            }else if (status == DUPLICATE_ERROR) {
                throw new Exception("Duplicate Error");
            }else if (status == NO_SUCH_KEY) {
                throw new Exception("No such key");
            }else {
                throw new Exception("Unknown status code: " + Integer.toHexString(status & 0xFF));
            }
        }
    
        return output.toByteArray();
    }
    

    After you initialize the Manufacturing data, you can easily reach its parts. DesfireManufacturingData class is for evaluating the response from the tag into meaningful parts, but I’ll only give link of it: Desfire Manufacturing Data. Also, I must say this is the most all-around project I have found in the Internet with open source, but it only has reading operations for Desfire tags, not write and authenticate. Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know if I can find an emacs color syntax configuration which resembles
Does anyone know the way, or a place where I can find out how
Does anyone know how (if possible) I can find out how much capacity (mAh)
Does anyone know if you can find out if the print dialog's cancel was
Does anyone know a way to find out programatically which physical disk holds a
Does anyone know where can I find recent data on PHP4 vs PHP5 market
Does anyone know where I can find a good explanation/tutorial of what and how
Does anyone know where I can find a good video to explain version control
Does anyone know where i can find such a AMI? Oracle database Enterprise Edition
Does anyone know where I can find that algorithm? It takes a double and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.